cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A006889 Exponent of least power of 2 having n consecutive 0's in its decimal representation.

Original entry on oeis.org

0, 10, 53, 242, 377, 1491, 1492, 6801, 14007, 100823, 559940, 1148303, 4036338, 4036339, 53619497, 119476156, 146226201, 918583174, 4627233991, 11089076233
Offset: 0

Views

Author

P. D. Mitchelmore (dh115(AT)city.ac.uk)

Keywords

Comments

A224782(a(n)) = n and A224782(m) <> n for m < a(n). - Reinhard Zumkeller, Apr 30 2013
The name of this sequence previously began "Least power of 2 having exactly n consecutive 0's...". The word "exactly" was unnecessary because the least power of 2 having at least n consecutive 0's in its decimal representation will always have exactly n consecutive 0's. The previous power of two will have had n-1 consecutive 0's with a "5" immediately to the left. - Clive Tooth, Jan 22 2016
a(20) is greater than 12*10^9. - Benjamin Chaffin, Jan 18 2017

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).

Crossrefs

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