← Complete problem index

PROJECT EULER · #0505

Bidirectional Recurrence

Statement only · UnsolvedOriginal problem ↗

Let:

x(0)=0x(1)=1x(2k)=(3x(k)+2x(k2)) mod 260 for k1, where   is the floor functionx(2k+1)=(2x(k)+3x(k2)) mod 260 for k1yn(k)={x(k)if kn2601max(yn(2k),yn(2k+1))if k<nA(n)=yn(1)

You are given:

x(2)=3x(3)=2x(4)=11y4(4)=11y4(3)=2609y4(2)=26012y4(1)=A(4)=8A(10)=26034A(103)=101881

Find A(1012).

Write-up coming later

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