OFFSET
1,1
LINKS
V. Raman, Table of n, a(n) for n = 1..10000
Project Euler, Problem 104: Pandigital Fibonacci ends.
MAPLE
b:= proc(n) b(n):= `if`(n<2, 2-n, irem(b(n-1)+b(n-2), 10^9)) end:
q:= n-> is({convert(b(n), base, 10)[]}={$1..9}):
select(q, [$1..120000])[]; # Alois P. Heinz, Jul 04 2021
MATHEMATICA
Select[Range[39, 120000], Sort[Take[IntegerDigits[LucasL[#]], -9]] == {1, 2, 3, 4, 5, 6, 7, 8, 9} &] (* Tanya Khovanova, Jul 04 2021 *)
PROG
(Python)
def afind(limit):
bkm1, bk = 2, 1
for k in range(2, limit+1):
bkm1, bk = bk, bkm1 + bk
if set(str(bk)[-9:]) == set("123456789"): print(k, end=", ")
afind(10**6) # Michael S. Branicky, Jul 04 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
V. Raman, Sep 07 2012
STATUS
approved