← Complete problem index

PROJECT EULER · #0947

Fibonacci Residues

Statement only · UnsolvedOriginal problem ↗

The (a,b,m)-sequence, where 0a,b<m, is defined as

g(0)=ag(1)=bg(n)=(g(n1)+g(n2))modm

All (a,b,m)-sequences are periodic with period denoted by p(a,b,m).
The first few terms of the (0,1,8)-sequence are (0,1,1,2,3,5,0,5,5,2,7,1,0,1,1,2,) and so p(0,1,8)=12.

Let s(m)=a=0m1b=0m1p(a,b,m)2. For example, s(3)=513 and s(10)=225820.

Define S(M)=m=1Ms(m). You are given, S(3)=542 and S(10)=310897.

Find S(106). Give your answer modulo 999999893.

Write-up coming later

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