login
a(n) is the smallest m for which the decimal representation of 2^m contains n consecutive identical digits.
26

%I #44 Sep 24 2024 11:22:10

%S 0,16,24,41,220,971,972,8554,42485,42486,271979,1039315,1727602,

%T 6855865,63416789,106892452,356677212

%N a(n) is the smallest m for which the decimal representation of 2^m contains n consecutive identical digits.

%C Next term is greater than 20000. - _David Wasserman_, Feb 16 2002

%C a(11) > 250000. - _Robert G. Wilson v_, Oct 21 2010

%C a(15) > 10297974. - _T. D. Noe_, Sep 08 2012

%C a(17) > 107000000. - _Paul Geneau de Lamarlière_, Feb 04 2024

%t a[n_] := Block[{k = 0}, While[ !MemberQ[ Length /@ Split@ IntegerDigits[2^k], n], k++ ]; k]; Table[a[n], {n, 6}] (* _Robert G. Wilson v_, Oct 21 2010 *)

%o (Python)

%o def A045875(n):

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

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

%o s = str(x)

%o for k in l:

%o if k in s:

%o return m

%o x *= 2

%o return 'search limit reached'

%o # _Chai Wah Wu_, Dec 17 2014

%Y Cf. A215732 (the digits).

%K base,nonn,hard,more,changed

%O 1,2

%A _Erich Friedman_

%E More terms from _David Wasserman_, Feb 16 2002

%E a(9) and a(10) from _Robert G. Wilson v_, Oct 21 2010

%E a(11)-a(13) added by _T. D. Noe_, Sep 04 2012

%E a(14) added by _T. D. Noe_, Sep 06 2012

%E Definition clarified by _Daran Gill_, Mar 24 2013

%E a(15) from _Bert Dobbelaere_, Feb 25 2019

%E a(16) from _Paul Geneau de Lamarlière_, Feb 04 2024

%E a(17) from _Paul Geneau de Lamarlière_, Sep 24 2024