← Complete problem index

PROJECT EULER · #0492

Exploding Sequence

Statement only · UnsolvedOriginal problem ↗

Define the sequence a1,a2,a3, as:

  • a1=1
  • an+1=6an2+10an+3 for n1.

Examples:
a3=2359
a6=269221280981320216750489044576319
a6mod1000000007=203064689
a100mod1000000007=456482974

Define B(x,y,n) as (anmodp) for every prime p such that xpx+y.

Examples:
B(109,103,103)=23674718882
B(109,103,1015)=20731563854

Find B(109,107,1015).

Write-up coming later

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