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.

Previous Showing 21-30 of 32 results. Next

A065718 Number of 7's in decimal expansion of 2^n.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Examples

			2^15 = 32768 so a(15)=1.
		

Crossrefs

Cf. 0's A027870, 1's A065712, 2's A065710, 3's A065714, 4's A065715, 5's A065716, 6's A065717, 8's A065719, 9's A065744.

Programs

  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 7], {n, 0, 100} ]
  • PARI
    a(n) = #select(x->(x==7), digits(2^n)); \\ Michel Marcus, Jun 15 2018
    
  • Python
    def A065718(n):
        return str(2**n).count('7') # Chai Wah Wu, Feb 14 2020

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

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

A306112 Largest k such that 2^k has exactly n digits 0 (in base 10), conjectured.

Original entry on oeis.org

86, 229, 231, 359, 283, 357, 475, 476, 649, 733, 648, 696, 824, 634, 732, 890, 895, 848, 823, 929, 1092, 1091, 1239, 1201, 1224, 1210, 1141, 1339, 1240, 1282, 1395, 1449, 1416, 1408, 1616, 1524, 1727, 1725, 1553, 1942, 1907, 1945, 1870, 1724, 1972, 1965, 2075, 1983, 2114, 2257, 2256
Offset: 0

Views

Author

M. F. Hasler, Jun 22 2018

Keywords

Comments

a(0) is the largest term in A007377: exponents of powers of 2 without digit 0.
There is no proof for any of the terms, just as for any term of A020665 and many similar / related sequences. However, the search has been pushed to many magnitudes beyond the largest known term, and the probability of any of the terms being wrong is extremely small, cf., e.g., the Khovanova link.

Crossrefs

Cf. A031146: least k such that 2^k has n digits 0 in base 10.
Cf. A305942: number of k's such that 2^k has n digits 0.
Cf. A305932: row n lists exponents of 2^k with n digits 0.
Cf. A007377: { k | 2^k has no digit 0 } : row 0 of the above.
Cf. A238938: { 2^k having no digit 0 }.
Cf. A027870: number of 0's in 2^n (and A065712, A065710, A065714, A065715, A065716, A065717, A065718, A065719, A065744 for digits 1 .. 9).
Cf. A102483: 2^n contains no 0 in base 3.

Programs

  • PARI
    A306112_vec(nMax,M=99*nMax+199,x=2,a=vector(nMax+=2))={for(k=0,M,a[min(1+#select(d->!d,digits(x^k)),nMax)]=k);a[^-1]}

A224782 Length of longest run of consecutive zeros in decimal representation of 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, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 30 2013

Keywords

Comments

a(n) <= A027870(n);
a(A007377(n)) = 0;
a(A006889(n)) = n and a(m) <> n for m < A006889(n).

References

  • Julian Havil, Impossible?: Surprising Solutions to Counterintuitive Conundrums, Princeton University Press 2008, chapter 15, p. 176ff

Programs

  • Haskell
    import Data.List (group)
    a224782 n = a224782_list !! n
    a224782_list = map (foldl h 0 . group . show) a000079_list where
       h x zs@(z:_) = if z == '0' then max x $ length zs else x

A240962 Number of zeros in the decimal expansion of n^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 10, 1, 2, 2, 3, 2, 2, 1, 2, 1, 21, 1, 0, 5, 2, 3, 6, 3, 1, 1, 32, 6, 5, 7, 7, 3, 3, 6, 8, 6, 42, 5, 6, 10, 10, 5, 11, 4, 12, 11, 53, 5, 6, 12, 10, 8, 11, 15, 9, 5, 64, 12, 15, 14, 16, 13, 12, 13, 9, 16, 79, 12, 16, 15, 12, 14, 15
Offset: 1

Views

Author

Anthony Sand, Aug 05 2014

Keywords

Examples

			a(1) = zerocount(1^1) = zerocount(1) = 0.
a(8) = zerocount(8^8) = zerocount(16777216) = 0.
a(9) = zerocount(9^9) = zerocount(387420489) = 1.
a(10) = zerocount(10^10) = zerocount(10000000000) = 10.
		

Crossrefs

Programs

  • Maple
    seq(numboccur(0,convert(n^n,base,10)), n=1 .. 100); # Robert Israel, Aug 05 2014
  • Mathematica
    Map[Count[IntegerDigits[#^#], 0] &, Range[2, 100]] (* Michael De Vlieger, Aug 06 2014 *)
  • PARI
    a(n) = my(d = digits(n^n)); sum(i=1, #d, ! d[i]); \\ Michel Marcus, Aug 10 2014
  • Python
    for n in range(1,10**3):
      print(str(n**n).count('0'),end=', ') # Derek Orr, Aug 05 2014
    

Formula

a(n) = A055641(A000312(n)). - Michel Marcus, Aug 07 2014

A298607 Powers of 2 with the digit '0' in their decimal expansion.

Original entry on oeis.org

1024, 2048, 4096, 131072, 1048576, 2097152, 4194304, 8388608, 67108864, 536870912, 1073741824, 274877906944, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 1125899906842624
Offset: 1

Views

Author

Alonso del Arte, Jan 22 2018

Keywords

Comments

The complement, A238938, is conjectured to be finite. Furthermore, Khovanova (see link) believes 2^86 = 77371252455336267181195264 is the largest power of 2 not in this sequence.

Examples

			2^12 = 4096 contains one 0 in its decimal representation, hence 4096 is in the sequence.
2^13 = 8192 contains no 0's and is thus not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[2^Range[0, 63], DigitCount[#, 10, 0] > 0 &]
  • PARI
    lista(nn) = {for (n=0, nn, if (vecsearch(Set(digits(p=2^n)), 0), print1(p, ", ")););} \\ Michel Marcus, Mar 05 2018

A305930 Number of digits '0' in 3^n (in base 10).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jun 22 2018

Keywords

Examples

			3^10 = 59049 is the smallest power of 3 having a digit 0, so a(10) = 1 is the first nonzero term.
		

Crossrefs

Cf. A027870 (analog for 2^k), A030700 (indices of zeros).
Cf. A063555: index of first appearence of n in this sequence.
Cf. A305933: table with n in row a(n).

Programs

  • Haskell
    a305930 = a055641 . a000244
  • Mathematica
    Table[ Count[ IntegerDigits[3^n], 0], {n, 0, 100} ]
    DigitCount[3^Range[0,110],10,0]
  • PARI
    apply( A305930(n)=#select(d->!d,digits(3^n)), [0..99])
    

Formula

a(n) = A055641(A000244(n)).
a(A030700(n)) = 0; a(A305934(n)) = 1; a(A305931(n)) >= 1; a(A305933(n,k)) = n.

A252482 Exponents n such that the decimal expansion of the power 12^n contains no zeros.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 8, 10, 14, 20, 26
Offset: 1

Views

Author

M. F. Hasler, Dec 17 2014

Keywords

Comments

Conjectured to be finite.
See A245853 for the actual powers 12^a(n).

Crossrefs

For zeroless powers x^n, see A238938 (x=2), A238939, A238940, A195948, A238936, A195908, A245852, A240945 (k=9), A195946 (x=11), A245853, A195945; A195942, A195943, A103662.
For the corresponding exponents, see A007377, A030700, A030701, A008839, A030702, A030703, A030704, A030705, A030706, this sequence A252482, A195944.
For other related sequences, see A052382, A027870, A102483, A103663.

Programs

  • Mathematica
    Select[Range[0,30],DigitCount[12^#,10,0]==0&] (* Harvey P. Dale, Apr 06 2019 *)
  • PARI
    for(n=0,9e9,vecmin(digits(12^n))&&print1(n","))

A320601 Exponents of powers of two having a digit zero in decimal.

Original entry on oeis.org

10, 11, 12, 17, 20, 21, 22, 23, 26, 29, 30, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 73, 74, 75, 78, 79, 80, 82, 83, 84, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105
Offset: 1

Views

Author

M. F. Hasler, Oct 16 2018

Keywords

Comments

Complement of A007377. It is a long-standing open problem to show that this sequence contains all numbers > 86.

Examples

			The first term is a(1) = 10 since 2^10 = 1024 is the smallest power of 2 having a digit 0.
		

Crossrefs

Programs

  • PARI
    for(n=1,199,vecmin(digits(2^n))||print1(n","))

Formula

{ n | A027870(n) > 0}, where A027870 = A055641 o A000079.

A330024 a(n) = floor(n/z) where z is the number of zeros in the decimal expansion of 2^n, and a(n)=0 when z=0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 0, 0, 0, 0, 17, 0, 0, 20, 21, 22, 23, 0, 0, 26, 0, 0, 29, 30, 0, 0, 0, 0, 0, 0, 0, 38, 0, 40, 41, 21, 14, 44, 45, 46, 47, 48, 0, 50, 0, 26, 17, 27, 27, 28, 57, 58, 29, 30, 20, 31, 31, 32, 65, 66, 0, 68, 23, 23, 71, 0
Offset: 0

Views

Author

Metin Sariyar, Nov 27 2019

Keywords

Comments

Is a(229)=229 the largest term?
a(8949)=41; is 8949 the largest n such that a(n) >= 41?
Is 79391 the largest n such that a(n) <= 30?
Is 30 <= a(n) <= 36 true for all n >= 713789?
Conjecture: For every sequence which can be named as "digit k appears m times in the decimal expansion of 2^n", the sequences are finite for 0 <= k <= 9 and any given m >= 0. Every digit from 0 to 9 are inclined to appear an equal number of times in the decimal expansion of 2^n as n increases.

Examples

			a(11) = 11 because 2^11 = 2048, there is 1 zero in 2048 and the integer part of 11/1 is 11.
		

Crossrefs

Programs

  • Magma
    a:=[0]; for n in [1..72] do z:=Multiplicity(Intseq(2^n),0); if z ne 0 then  Append(~a,Floor(n/z)); else Append(~a,0); end if; end for; a; // Marius A. Burtea, Nov 27 2019
    
  • Maple
    f:= proc(n) local z;
      z:= numboccur(0,convert(2^n,base,10));
      if z = 0 then 0 else floor(n/z) fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 28 2019
  • Mathematica
    Do[z=DigitCount[2^n,10,0];an=IntegerPart[n/z];If[z==0,Print[0],Print[an]],{n,0,8000}]
  • PARI
    a(n) = my(z=#select(d->!d, digits(2^n))); if (z, n\z, 0); \\ Michel Marcus, Jan 07 2020
    
  • Python
    def A330024(n):
      z=str(2**n).count('0')
      return n//z if z else 0 # Pontus von Brömssen, Jul 24 2021

Formula

Conjecture: a(n) = 33 (= floor(10/log_10(2))) for all sufficiently large n. - Pontus von Brömssen, Jul 23 2021
Previous Showing 21-30 of 32 results. Next