← RoseCode

ROSECODE 509

Higher order recursive sequence

liuguangxi · Math ·

Define a sequence an as below: a1=17,an+1=an4+6an2+14an(an2+1)(n1). Then a2=10657/2465, a3=2134495165562497/1571545212141185,...Obviously all numbers in this sequence are rational.

For a prime p and a fully reduced fraction a/b, define Q(a/b,p) to be the smallest positive q for which abq(modp). For example Q(3/5,109)=66, because 566=3303(mod109) and 66 is the smallest positive such number.

You are given Q(a2,1000000007)=877890477, Q(a10,1000000007)=16332768.

Find the sum of Q(a1234567891011121314,p) over all primes p between 2000000000 and 2000100000.


Thanks to czp for the idea.