login
A072313
a(n)-th Fibonacci number is the smallest Fibonacci number containing exactly n 9's.
1
11, 38, 52, 70, 83, 95, 172, 228, 189, 178, 342, 273, 415, 456, 319, 288, 458, 460, 498, 636, 624, 717, 746, 778, 673, 849, 852, 989, 918, 1085, 1018, 1122, 1129, 1117, 1041, 1063, 1282, 1376, 1402, 1252, 1236, 1430, 1438, 1743, 1510, 1661, 1702, 1715, 1630
OFFSET
1,1
EXAMPLE
a(2)=38 since 38th Fibonacci number i.e. 39088169 contains exactly two 9's.
MATHEMATICA
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 *)
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 *)
PROG
(PARI) okdigs(v, n, d) = {my(digs = digits(v)); sum(i=1, #digs, digs[i] == d) == n; }
a(n, d=9) = {my(i = 0); while (! okdigs(fibonacci(i), n, d), i++); i; } \\ Michel Marcus, Nov 29 2013
CROSSREFS
Sequence in context: A057664 A279770 A071853 * A063146 A139276 A010002
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, Jul 14 2002
EXTENSIONS
More terms from Michel Marcus, Nov 29 2013
STATUS
approved