login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A020344
Fibonacci(a(n)) is the least Fibonacci number beginning with n.
9
0, 1, 3, 4, 19, 5, 15, 25, 6, 16, 21, 45, 26, 7, 12, 17, 41, 22, 46, 27, 51, 8, 56, 13, 37, 18, 42, 66, 23, 47, 71, 28, 52, 119, 9, 33, 57, 14, 148, 38, 62, 19, 86, 43, 67, 134, 24, 225, 48, 72, 139, 29, 230, 53, 254, 10, 278, 34, 302, 58, 259, 15, 283, 39, 240, 63, 197, 20, 154, 288
OFFSET
0,3
COMMENTS
Fixed points of this sequence are in A038546. - Alois P. Heinz, Jul 08 2022
LINKS
Ron Knott, Every number starts some Fibonacci Number, The Mathematical Magic of the Fibonacci Numbers.
FORMULA
A000045(a(n)) = A020345(n).
MATHEMATICA
nn = 100; t = tn = Table[0, {nn}]; found = 0; n = 0; While[found < nn, n++; f = Fibonacci[n]; d = IntegerDigits[f]; i = 1; While[i <= Length[d], k = FromDigits[Take[d, i]]; If[k > nn, Break[]]; If[t[[k]] == 0, t[[k]] = f; tn[[k]] = n; found++]; i++]]; tn = Join[{0}, tn] (* T. D. Noe, Apr 02 2014 *)
PROG
(Python)
def aupton(nn):
ans, f, g, k = dict(), 0, 1, 0
while len(ans) < nn+1:
sf = str(f)
for i in range(1, len(sf)+1):
if int(sf[:i]) > nn:
break
if sf[:i] not in ans:
ans[sf[:i]] = k
f, g, k = g, f+g, k+1
return [int(ans[str(i)]) for i in range(nn+1)]
print(aupton(70)) # Michael S. Branicky, Jul 08 2022
CROSSREFS
KEYWORD
nonn,look,base
STATUS
approved