cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A020345 Smallest Fibonacci number beginning with n.

This page as a plain text file.
%I A020345 #23 Jul 08 2022 11:52:57
%S A020345 0,1,2,3,4181,5,610,75025,8,987,10946,1134903170,121393,13,144,1597,
%T A020345 165580141,17711,1836311903,196418,20365011074,21,225851433717,233,
%U A020345 24157817,2584,267914296,27777890035288,28657,2971215073,308061521170129,317811
%N A020345 Smallest Fibonacci number beginning with n.
%C A020345 The graph of the indices A020344 is much more interesting. - _T. D. Noe_, Apr 02 2014
%C A020345 a(1382) is the first term with > 1000 digits (1004). - _Michael S. Branicky_, Jul 08 2022
%H A020345 Michael S. Branicky, <a href="/A020345/b020345.txt">Table of n, a(n) for n = 0..1389</a> (terms 1..400 from T. D. Noe)
%H A020345 Ron Knott, <a href="https://r-knott.surrey.ac.uk/Fibonacci/fibmaths.html#section8">Every number starts some Fibonacci Number</a>, The Mathematical Magic of the Fibonacci Numbers.
%F A020345 a(n) = A000045(A020344(n)).
%e A020345 a(4) = 4181 is a Fibonacci number starting with 4.
%t A020345 nn = 31; 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++]]; t = Join[{0}, t] (* _T. D. Noe_, Apr 02 2014 *)
%o A020345 (Python)
%o A020345 def aupton(nn):
%o A020345     ans, f, g, k = dict(), 0, 1, 0
%o A020345     while len(ans) < nn+1:
%o A020345         sf = str(f)
%o A020345         for i in range(1, len(sf)+1):
%o A020345             if int(sf[:i]) > nn:
%o A020345                 break
%o A020345             if sf[:i] not in ans:
%o A020345                 ans[sf[:i]] = f
%o A020345         f, g, k = g, f+g, k+1
%o A020345     return [int(ans[str(i)]) for i in range(nn+1)]
%o A020345 print(aupton(31)) # _Michael S. Branicky_, Jul 08 2022
%Y A020345 Cf. A000045, A020344, A023183, A023184.
%K A020345 nonn,base
%O A020345 0,3
%A A020345 _David W. Wilson_