https://github.com/quentin18/ulam-sequences
Résolution du problème 167 du Projet Euler sur les suites de Ulam
https://github.com/quentin18/ulam-sequences
ulam
Last synced: 7 months ago
JSON representation
Résolution du problème 167 du Projet Euler sur les suites de Ulam
- Host: GitHub
- URL: https://github.com/quentin18/ulam-sequences
- Owner: Quentin18
- Created: 2021-02-24T18:28:44.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-25T10:50:21.000Z (almost 5 years ago)
- Last Synced: 2025-02-17T07:35:44.983Z (11 months ago)
- Topics: ulam
- Language: Python
- Homepage: https://projecteuler.net/problem=167
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Investigating Ulam sequences
Résolution du [problème 167](https://projecteuler.net/problem=167) du *Projet Euler* sur les suites de Ulam.
- Le fichier *ulam.py* contient deux fonctions pour calculer le n-ième terme d'une suite de Ulam.
- Le fichier *answer.py* contient les fonctions pour la résolution du problème.
## Résultats
La solution du problème est **3916160068885**. Voici le résultat de l'exécution de la fonction `answer` :
```
Period: 32
U(2, 5) = 393749999981
Period: 26
U(2, 7) = 484615384605
Period: 444
U(2, 9) = 400450450395
Period: 1628
U(2, 11) = 399877149781
Period: 5906
U(2, 13) = 399966136001
Period: 80
U(2, 15) = 637499999951
Period: 126960
U(2, 17) = 400001574629
Period: 380882
U(2, 19) = 399999473477
Period: 2097152
U(2, 21) = 399999900065
Result: 3916160068885
Runtime: 10.1290442943573 seconds
```
## Références
- [Wikipedia](https://en.wikipedia.org/wiki/Ulam_number)
- [WolframMathWorld](https://mathworld.wolfram.com/UlamSequence.html)
## Auteur
[Quentin Deschamps](mailto:quentindeschamps18@gmail.com)