yaworsw/euler-manager

View on GitHub
data/problems/104.yml

Summary

Maintainability
Test Coverage
---
:id: 104
:name: Pandigital Fibonacci ends
:url: https://projecteuler.net/problem=104
:content: |+
  The Fibonacci sequence is defined by the recurrence relation:

  > F<sub><i>n</i></sub> = F<sub><i>n</i>−1</sub> + F<sub><i>n</i>−2</sub>, where F<sub>1</sub> = 1 and F<sub>2</sub> = 1.

  It turns out that F<sub>541</sub>, which contains 113 digits, is the first Fibonacci number for which the last nine digits are 1-9 pandigital (contain all the digits 1 to 9, but not necessarily in order). And F<sub>2749</sub>, which contains 575 digits, is the first Fibonacci number for which the first nine digits are 1-9 pandigital.

  Given that F<sub><i>k</i></sub> is the first Fibonacci number for which the first nine digits AND the last nine digits are 1-9 pandigital, find _k_.