A216488 Numbers k such that the last 9 digits of the k-th Lucas number are 1-9 pandigital.
3352, 3837, 7239, 18503, 19344, 22628, 29363, 30994, 37514, 47058, 48201, 50371, 51702, 51857, 53586, 55469, 56248, 56668, 60560, 65206, 70610, 72171, 76554, 78310, 78380, 82628, 82952, 82993, 93615, 99751, 101179, 104469, 105347, 105379, 106327, 113251, 114970, 116751, 117313
Offset: 1
Links
- V. Raman, Table of n, a(n) for n = 1..10000
- Project Euler, Problem 104: Pandigital Fibonacci ends.
Crossrefs
Programs
-
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 *)
-
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