login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A072313 a(n)-th Fibonacci number is the smallest Fibonacci number containing exactly n 9's. 1

%I #13 Oct 03 2018 12:37:43

%S 11,38,52,70,83,95,172,228,189,178,342,273,415,456,319,288,458,460,

%T 498,636,624,717,746,778,673,849,852,989,918,1085,1018,1122,1129,1117,

%U 1041,1063,1282,1376,1402,1252,1236,1430,1438,1743,1510,1661,1702,1715,1630

%N a(n)-th Fibonacci number is the smallest Fibonacci number containing exactly n 9's.

%H T. D. Noe, <a href="/A072313/b072313.txt">Table of n, a(n) for n = 1..1000</a>

%e a(2)=38 since 38th Fibonacci number i.e. 39088169 contains exactly two 9's.

%t nn = 50; t = Table[0, {nn}]; cnt = 0; n = 0; While[cnt < nn, n++; f = IntegerDigits[Fibonacci[n]]; c = Count[f, 9]; If[c <= nn && t[[c]] == 0, t[[c]] = n; cnt++]]; t (* _T. D. Noe_, Dec 04 2013 *)

%t With[{fs=Table[{n,Count[IntegerDigits[Fibonacci[n]],9]},{n,1800}]}, Table[ SelectFirst[fs,#[[2]]==k&],{k,50}]][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Oct 03 2018 *)

%o (PARI) okdigs(v, n, d) = {my(digs = digits(v)); sum(i=1, #digs, digs[i] == d) == n;}

%o a(n, d=9) = {my(i = 0); while (! okdigs(fibonacci(i), n, d), i++); i;} \\ _Michel Marcus_, Nov 29 2013

%Y Cf. A000045, A072314.

%K base,nonn

%O 1,1

%A _Shyam Sunder Gupta_, Jul 14 2002

%E More terms from _Michel Marcus_, Nov 29 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)