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.

Showing 1-10 of 16 results. Next

A060994 Duplicate of A031146.

Original entry on oeis.org

0, 10, 42, 43, 79, 88, 100, 102, 189, 198, 242, 250, 252, 263, 305, 262, 370, 306, 368
Offset: 0

Views

Author

Keywords

A086544 Duplicate of A031146.

Original entry on oeis.org

0, 10, 42, 43, 79, 88, 100, 102, 189, 198, 242, 250, 252, 263, 305, 262, 370, 306, 368
Offset: 0

Views

Author

Keywords

A027870 Number of zero digits in 2^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 3, 1, 1, 1, 1, 1, 0, 1, 0, 2, 3, 2, 2, 2, 1, 1, 2, 2, 3, 2, 2, 2, 1, 1, 0, 1, 3, 3, 1, 0, 1, 1, 1, 0, 0, 2, 4, 2, 0, 2, 3, 1, 1, 0, 3, 5, 3, 3, 4, 2, 3, 4, 1, 1, 4, 5, 5, 6, 6, 7, 5, 5
Offset: 0

Views

Author

Keywords

Comments

I conjecture that any value x = 0, 1, 2, ... occurs only a finite number of times N(x) = 36, 41, 31, 34, 25, 32, 37, 23, 43, 47, 33, ... in this sequence, for the last time at well defined indices i(x) = 86, 229, 231, 359, 283, 357, 475, 476, 649, 733, 648, ... - M. F. Hasler, Jul 09 2025

Examples

			2^31 = 2147483648 so a(31) = 0 and 2^42 = 4398046511104 so a(42) = 2.
		

Crossrefs

Cf. A000079 (powers of 2), A007377 (2^n has no zeros).
Similar for other digits: A065712 (1's), A065710 (2's), A065714 (3's), A065715 (4's), A065716 (5's), A065717 (6's), A065718 (7's), A065719 (8's), A065744 (9's).
Cf. A031146 (index of first appearance of n in this sequence), A094776 (index of last occurrence of digit n in powers of 2).
Cf. A305932 (table with n in row a(n)).

Programs

  • Haskell
    a027870 = a055641 . a000079  -- Reinhard Zumkeller, Apr 30 2013
    
  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 0], {n, 0, 100} ]
    DigitCount[2^Range[0,110],10,0] (* Harvey P. Dale, Nov 20 2011 *)
  • PARI
    A027870(n)=#select(d->!d,digits(2^n)) \\ M. F. Hasler, Jun 14 2018
    
  • Python
    def A027870(n):
        return str(2**n).count('0') # Chai Wah Wu, Feb 14 2020

Formula

a(n) = A055641(A000079(n)). - Reinhard Zumkeller, Apr 30 2013
a(A007377(n)) = 0; A224782(n) <= a(n). - Reinhard Zumkeller, Apr 30 2013

Extensions

Edited by M. F. Hasler, Jul 09 2025

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

A063555 Smallest k such that 3^k has exactly n 0's in its decimal representation.

Original entry on oeis.org

0, 10, 22, 21, 35, 57, 55, 54, 107, 137, 126, 170, 188, 159, 191, 225, 259, 297, 262, 253, 340, 296, 380, 369, 403, 395, 383, 407, 429, 514, 446, 486, 431, 545, 589, 510, 546, 542, 666, 733, 540, 621, 709, 715, 549, 694, 804, 820, 847, 865, 710
Offset: 0

Views

Author

Robert G. Wilson v, Aug 10 2001

Keywords

Crossrefs

Cf. A000244.
Cf. A031146 (analog for 2^k), A063575 (analog for 4^k).

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    A:= Array(0..N,-1):
    p:= 1: A[0]:= 0:
    count:= 1:
    for k from 1 while count <= N do
      p:= 3*p;
      m:= numboccur(0, convert(p,base,10));
      if m <= N and A[m] < 0 then A[m]:= k; count:= count+1 fi
    od:
    seq(A[i],i=0..N); # Robert Israel, Dec 21 2016
  • Mathematica
    a = {}; Do[k = 1; While[ Count[ IntegerDigits[3^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
    Module[{l3=Table[{n,DigitCount[3^n,10,0]},{n,900}]},Transpose[Table[ SelectFirst[ l3,#[[2]]==i&],{i,0,50}]][[1]]] (* Harvey P. Dale, Dec 08 2014 *)
  • PARI
    A063555(n)=for(k=0,oo,#select(d->!d,digits(3^k))==n&&return(k)) \\ M. F. Hasler, Jun 14 2018

Extensions

a(0) corrected by Zak Seidov, Jun 14 2018

A063575 Smallest k such that 4^k has exactly n 0's in its decimal representation.

Original entry on oeis.org

0, 5, 21, 35, 47, 44, 50, 51, 103, 99, 121, 125, 126, 175, 166, 131, 185, 153, 184, 223, 272, 232, 248, 336, 233, 306, 315, 384, 314, 327, 333, 373, 393, 399, 454, 457, 504, 453, 484, 506, 621, 494, 510, 639, 522, 557, 560, 559, 716, 609, 629
Offset: 0

Views

Author

Robert G. Wilson v, Aug 10 2001

Keywords

Crossrefs

Cf. A031146 (analog for 2^k), A063555 (for 3^k), A063585 (for 5^k), A063596 (for 6^k), A063606 (for 7^k), A063616 (for 8^k).

Programs

  • Mathematica
    a = {}; Do[k = 0; While[ Count[ IntegerDigits[4^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
    Module[{nn=750,p4},p4=Table[{n,DigitCount[4^n,10,0]},{n,nn}];Transpose[ Table[ SelectFirst[p4,#[[2]]==i&],{i,0,50}]][[1]]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, May 20 2016 *)
  • PARI
    Count(x, d)= { local(c,f); c=0; while (x>9, f=x-10*(x\10); if (f==d, c++); x\=10); if (x==d, c++); return(c) } { for (n=0, 150, a=0; while (Count(4^a, 0) != n, a++); write("b063575.txt", n, " ", a) ) } \\  Harry J. Smith, Aug 26 2009
    
  • PARI
    A063575(n)=for(k=n,oo,#select(d->!d,digits(4^k))==n&&return(k)) \\ M. F. Hasler, Jun 14 2018

Extensions

a(0) changed to 0 as in A031146, A063555, ... by M. F. Hasler, Jun 14 2018

A063596 Least k >= 0 such that 6^k has exactly n 0's in its decimal representation.

Original entry on oeis.org

0, 10, 9, 13, 19, 43, 56, 41, 94, 79, 113, 100, 88, 112, 124, 127, 138, 176, 144, 175, 174, 168, 170, 210, 245, 228, 182, 237, 287, 260, 312, 321, 294, 347, 389, 365, 401, 386, 390, 419, 460, 425, 438, 426, 488, 490, 520, 458, 489, 521, 513
Offset: 0

Views

Author

Robert G. Wilson v, Aug 10 2001

Keywords

Crossrefs

Cf. A031146 (analog for 2^k), A063555 (for 3^k), A063575 (for 4^k), A063585 (for 5^k), A063606 (for 7^k), A063616 (for 8^k), A063626 (for 9^k).

Programs

  • Mathematica
    a = {}; Do[k = 0; While[ Count[ IntegerDigits[6^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
    With[{pwr6=Table[{n,DigitCount[6^n,10,0]},{n,1000}]},Join[{0},Transpose[ Table[ SelectFirst[pwr6,#[[2]]==i&],{i,60}]][[1]]]] (* Harvey P. Dale, Dec 15 2014 *)
  • PARI
    A063596(n)=for(k=0, oo, #select(d->!d, digits(6^k))==n&&return(k)) \\ M. F. Hasler, Jun 14 2018

Extensions

a(0) changed to 0 (as in A031146, A063555, ...) and better title from M. F. Hasler, Jun 14 2018

A305932 Irregular table: row n >= 0 lists all k >= 0 such that the decimal representation of 2^k has n digits '0' (conjectured).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 16, 18, 19, 24, 25, 27, 28, 31, 32, 33, 34, 35, 36, 37, 39, 49, 51, 67, 72, 76, 77, 81, 86, 10, 11, 12, 17, 20, 21, 22, 23, 26, 29, 30, 38, 40, 41, 44, 45, 46, 47, 48, 50, 57, 58, 65, 66, 68, 71, 73, 74, 75, 84, 85, 95, 96, 122, 124, 129, 130, 149, 151, 184, 43, 53, 61, 69, 70
Offset: 0

Views

Author

M. F. Hasler, Jun 14 2018

Keywords

Comments

A partition of the nonnegative integers (the rows being the subsets).
Although it remains an open problem to provide a proof that the rows are complete (as are all terms of A020665), we can assume it for the purpose of this sequence.
Read as a flattened sequence, a permutation of the nonnegative integers.

Examples

			The table reads:
n \ k's
0 : 0, 1, ..., 9, 13, 14, 15, 16, 18, 19, 24, 25, 27, (...), 81, 86 (cf. A007377)
1 : 10, 11, 12, 17, 20, 21, 22, 23, 26, 29, 30, 38, 40, 41, 44, (...), 151, 184
2 : 42, 52, 54, 55, 56, 59, 60, 62, 63, 64, 78, 80, 82, 92, 107, (...), 171, 231
3 : 43, 53, 61, 69, 70, 83, 87, 89, 90, 93, 109, 112, 114, 115, (...), 221, 359
4 : 79, 91, 94, 97, 106, 118, 126, 127, 137, 139, 157, 159, 170, (...), 241, 283
5 : 88, 98, 99, 103, 104, 113, 120, 143, 144, 146, 152, 158, 160, (...), 343, 357
...
Column 0 is A031146: least k such that 2^k has n digits '0' in base 10.
Row lengths = number of powers of 2 with exactly n '0's = (36, 41, 31, 34, 25, 32, 37, 23, 43, 47, 33, 35, 29, 27, 27, 39, 34, 34, 28, 29, ...): not in the OEIS.
Largest number in row n = (86, 229, 231, 359, 283, 357, 475, 476, 649, 733, 648, 696, 824, 634, 732, 890, 895, 848, 823, 929, 1092, ...): not in the OEIS.
Row number of n = Number of '0's in 2^n = A027870: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, ...).
Inverse permutation (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 36, 37, 38, 10, 11, 12, 13, 39, 14, 15, 40, 41, 42, 43, 16, 17, 44, 18, 19, 45, 46, 20, 21, ...) is not in the OEIS.
		

Crossrefs

Sequence A027870 yields the row number of a given integer.
Cf. A305933 (analog for 3^n), A305924 (for 4^n), ..., A305929 (for 9^n).

Programs

  • Mathematica
    mx = 1000; g[n_] := g[n] = DigitCount[2^n, 10, 0]; f[n_] := Select[Range@mx, g@# == n &]; Table[f@n, {n, 0, 4}] // Flatten (* Robert G. Wilson v, Jun 20 2018 *)
  • PARI
    apply( A305932_row(n,M=200*(n+1))=select(k->A027870(k)==n,[0..M]), [0..20]) \\ A027870(k)=#select(d->!d, digits(2^k))

Formula

Row n = { k >= 0 | A027870(k) = n }.

A063585 Least k >= 0 such that 5^k has exactly n 0's in its decimal representation.

Original entry on oeis.org

0, 8, 13, 34, 40, 48, 52, 45, 64, 99, 143, 132, 100, 122, 117, 151, 205, 207, 201, 242, 230, 244, 231, 221, 295, 264, 266, 333, 248, 344, 346, 274, 391, 345, 356, 393, 433, 365, 472, 499, 488, 455, 516, 485, 511, 458, 520, 487, 459, 456, 457
Offset: 0

Views

Author

Robert G. Wilson v, Aug 10 2001

Keywords

Crossrefs

Cf. A031146 (analog for 2^k), A063555 (analog for 3^k), A063575 (analog for 4^k), A063596 (analog for 6^k).

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    A:= Array(0..N, -1):
    p:= 1: A[0]:= 0:
    count:= 1:
    for k from 1 while count <= N do
      p:= 5*p;
      m:= numboccur(0, convert(p, base, 10));
      if m <= N and A[m] < 0 then A[m]:= k; count:= count+1;
    od:
    convert(A,list); # Robert Israel, Dec 20 2018
  • Mathematica
    a = {}; Do[k = 0; While[ Count[ IntegerDigits[5^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
  • PARI
    A063585(n)=for(k=n,oo,#select(d->!d,digits(5^k))==n&&return(k)) \\ M. F. Hasler, Jun 14 2018

Extensions

a(0) changed to 0 (as in A031146, A063555, ...) and better title from M. F. Hasler, Jun 14 2018

A305942 Number of powers of 2 having exactly n digits '0' (in base 10), conjectured.

Original entry on oeis.org

36, 41, 31, 34, 25, 32, 37, 23, 43, 47, 33, 35, 29, 27, 27, 39, 34, 34, 28, 29, 31, 30, 38, 25, 35, 35, 36, 40, 32, 40, 43, 39, 32, 30, 30, 32, 36, 39, 23, 26, 31, 37, 27, 28, 33, 39, 28, 44, 34, 27, 43, 33, 27, 32, 31, 27, 27, 32, 35, 34, 36, 28, 32, 39, 38, 40, 28, 43, 38, 32, 22
Offset: 0

Views

Author

M. F. Hasler, Jun 21 2018

Keywords

Comments

a(0) = 36 is the number of terms in A007377 and in A238938, which includes the power 2^0 = 1.
These are the row lengths of A305932. It remains an open problem to provide a proof that these rows are complete (as for all terms of A020665), but the search has been pushed to many orders of magnitude beyond the largest known term, and the probability of finding an additional term is vanishing, cf. Khovanova link.
The average of the first 100000 terms is ~33.219 with a minimum of 12 and a maximum of 61. - Hans Havermann, Apr 26 2020

Crossrefs

Row lengths of A305932 (row n = exponents of 2^k with n '0's).
Cf. A007377 = {k | 2^k has no digit 0}; A238938: powers of 2 with no digit 0.
Cf. A298607: powers of 2 with the digit '0' in their decimal expansion.
Cf. A020665: largest k such that n^k has no digit 0 in base 10.
Cf. A031146: least k such that 2^k has n digits 0 in base 10.
Cf. A071531: least r such that n^r has a digit 0, in base 10.
Cf. A306112: largest k such that 2^k has n digits 0, in base 10.

Programs

  • PARI
    A305942(n,M=99*n+199)=sum(k=0,M,#select(d->!d,digits(2^k))==n)
    
  • PARI
    A305942_vec(nMax,M=99*nMax+199,a=vector(nMax+=2))={for(k=0,M,a[min(1+#select(d->!d,digits(2^k)),nMax)]++);a[^-1]}
Showing 1-10 of 16 results. Next