← Complete problem index

PROJECT EULER · #0921

Golden Recurrence

Statement only · UnsolvedOriginal problem ↗

Consider the following recurrence relation: a0=5+12an+1=an(an4+10an2+5)5an4+10an2+1

Note that a0 is the golden ratio.

an can always be written in the form pn5+1qn, where pn and qn are positive integers.

Let s(n)=pn5+qn5. So, s(0)=15+25=33.

The Fibonacci sequence is defined as: F1=1, F2=1, Fn=Fn1+Fn2 for n>2.

Define S(m)=i=2ms(Fi).

Find S(1618034). Submit your answer modulo 398874989.

Write-up coming later

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