A006889 Exponent of least power of 2 having n consecutive 0's in its decimal representation.
0, 10, 53, 242, 377, 1491, 1492, 6801, 14007, 100823, 559940, 1148303, 4036338, 4036339, 53619497, 119476156, 146226201, 918583174, 4627233991, 11089076233
Offset: 0
Examples
2^53619497 is the smallest power of 2 to contain a run of 14 consecutive zeros in its decimal form. 2^119476156 (a 35965907-digit number) contains the sequence ...40030000000000000008341... about one third of the way through. 2^4627233991 (a 1392936229-digit number) contains the sequence "813000000000000000000538" about 99.5% of the way through. The computation took about six months.
References
- Julian Havil, Impossible?: Surprising Solutions to Counterintuitive Conundrums, Princeton University Press 2008, chapter 15, p. 176ff
- Popular Computing (Calabasas, CA), Zeros in Powers of 2, Vol. 3 (No. 25, Apr 1975), page PC25-16 [Gives a(1)-a(8)]
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- E. Karst and U. Karst, The first power of 2 with 8 consecutive zeros, Math. Comp. 18 (1964), 508-508.
- Popular Computing (Calabasas, CA), Two Tables, Vol. 1, (No. 9, Dec 1973), page PC9-16.
Programs
-
Haskell
import Data.List (elemIndex) import Data.Maybe (fromJust) a006889 = fromJust . (`elemIndex` a224782_list) -- Reinhard Zumkeller, Apr 30 2013
-
Maple
A[0]:= 0: m:= 1: for n from 1 while m <= 9 do S:= convert(2^n,string); if StringTools:-Search(StringTools:-Fill("0",m),S) <> 0 then A[m]:= n; m:= m+1; fi od: seq(A[i],i=0..9); # Robert Israel, Jan 22 2016
-
Mathematica
a = ""; Do[ a = StringJoin[a, "0"]; k = 1; While[ StringPosition[ ToString[2^k], a] == {}, k++ ]; Print[k], {n, 1, 10} ] (* Robert G. Wilson v, edited by Clive Tooth, Jan 25 2016 *)
-
PARI
conseczerorec(n) = my(d=digits(n), i=0, r=0, x=#Str(n)); while(x > 0, while(d[x]==0, i++; x--); if(i > r, r=i); i=0; x--); r a(n) = my(k=0); while(conseczerorec(2^k) < n, k++); k \\ Felix Fröhlich, Sep 27 2016
Extensions
3 more terms from Clive Tooth, Jan 24 2001
One more term from Clive Tooth, Nov 28 2001
One more term from Sacha Roscoe (scarletmanuka(AT)iprimus.com.au), Dec 16 2002
a(17) from Sacha Roscoe (scarletmanuka(AT)iprimus.com.au), Feb 06 2007
a(18) from Clive Tooth, Sep 30 2012
Name clarified by Clive Tooth, Jan 22 2016
Definition clarified by Felix Fröhlich, Sep 27 2016
a(19) from Benjamin Chaffin, Jan 18 2017
Comments