[go: up one dir, main page]

login
A115937
Numbers k such that the k-th Fibonacci number contains a pandigital substring.
6
130, 190, 309, 348, 374, 381, 382, 387, 394, 431, 447, 482, 496, 513, 516, 522, 540, 543, 562, 573, 590, 600, 603, 667, 672, 738, 761, 768, 827, 843, 849, 856, 873, 888, 907, 912, 923, 937, 958, 963, 982, 990, 993, 1009, 1021, 1027, 1054, 1087, 1090
OFFSET
1,1
LINKS
EXAMPLE
Fibonacci(130) = 65(9034621587)630041982498215.
MATHEMATICA
pandQ[n_]:=AnyTrue[Partition[IntegerDigits[Fibonacci[n]], 10, 1], Sort[#] == Range[ 0, 9]&]; Select[Range[1100], pandQ] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 24 2016 *)
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def fib(n): return n if n < 2 else fib(n-1) + fib(n-2)
def haspan(s): return any(len(set(s[i:i+10]))==10 for i in range(len(s)-9))
print([m for m in range(1111) if haspan(str(fib(m)))]) # Michael S. Branicky, Feb 28 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Giovanni Resta, Feb 06 2006
STATUS
approved