login
a(n) is the number of digits in the decimal representation of the smallest Fibonacci number that contains n consecutive identical digits.
1

%I #18 Feb 15 2024 13:03:37

%S 1,2,10,14,25,185,460,1357,13027,28264,73895,242950,1077514,1521516,

%T 7806974

%N a(n) is the number of digits in the decimal representation of the smallest Fibonacci number that contains n consecutive identical digits.

%C Number of digits in Fibonacci(k) is equal to floor(1 + k*log_10((1+sqrt(5))/2)-log_10(sqrt(5))).

%t k = 0; Join[{1}, Table[While[d = IntegerDigits[Fibonacci[k]]; ! MemberQ[Partition[Differences[d], n - 1, 1], Table[0, {n - 1}]], k++]; Length[d], {n, 2, 8}]] (* _T. D. Noe_, Oct 02 2012 *)

%o (Python)

%o def A217191(n):

%o ....if n == 1:

%o ........return 1

%o ....else:

%o ........l, y, x = [str(d)*n for d in range(10)], 0, 1

%o ........for m in range(1,10**9):

%o ............s = str(x)

%o ............for k in l:

%o ................if k in s:

%o ....................return len(s)

%o ............y, x = x, y+x

%o ........return 'search limit reached'

%o # _Chai Wah Wu_, Dec 17 2014

%Y Cf. A000045, A217165, A217175.

%K nonn,base,hard

%O 1,2

%A _V. Raman_, Sep 27 2012

%E a(10)-a(11) from _Chai Wah Wu_, Dec 17 2014

%E a(12)-a(15) from _Nick Hobson_, Feb 15 2024