← Complete problem index

PROJECT EULER · #0853

Pisano Periods 1

Statement only · SolvedOriginal problem ↗

For every positive integer n the Fibonacci sequence modulo n is periodic. The period depends on the value of n. This period is called the Pisano period for n, often shortened to π(n).

There are three values of n for which π(n) equals 18: 19, 38 and 76. The sum of those smaller than 50 is 57.

Find the sum of the values of n smaller than 1000000000 for which π(n) equals 120.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.