947. Fibonacci Residues

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.

947. 斐波那契余数

对满足 0a,b<m 的整数 a,b,m,定义 (a,b,m)-序列如下:

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

所有 (a,b,m)-序列都是周期数列,记其周期为 p(a,b,m)。例如,(0,1,8)-序列的前若干项是 (0,1,1,2,3,5,0,5,5,2,7,1,0,1,1,2,),于是 p(0,1,8)=12

s(m)=a=0m1b=0m1p(a,b,m)2,例如,s(3)=513s(10)=225820

S(M)=m=1Ms(m)。已知 S(3)=542S(10)=310897

S(106)999999893 的值。


这个链接 回到源站。

这个链接 回到详细版题目目录。