← Complete problem index

PROJECT EULER · #0025

1000-digit Fibonacci Number

Statement only · SolvedOriginal problem ↗

The Fibonacci sequence is defined by the recurrence relation:

Fn=Fn1+Fn2, where F1=1 and F2=1.

Hence the first 12 terms will be:

F1=1F2=1F3=2F4=3F5=5F6=8F7=13F8=21F9=34F10=55F11=89F12=144

The 12th term, F12, is the first term to contain three digits.

What is the index of the first term in the Fibonacci sequence to contain 1000 digits?

Write-up coming later

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