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 11-20 of 20 results.

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

A126206 Number of 4's in the decimal expansion of 4^n.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 1, 3, 0, 1, 2, 2, 2, 1, 1, 3, 0, 3, 3, 3, 2, 2, 2, 3, 1, 2, 2, 3, 4, 3, 1, 3, 3, 4, 2, 4, 2, 4, 2, 2, 3, 4, 3, 3, 3, 3, 2, 2, 3, 5, 2, 4, 2, 4, 4, 3, 3, 3, 4, 4, 6, 5, 5, 4, 2, 9, 5, 2, 4, 6, 4, 7, 4, 2, 5, 4, 3, 4, 8, 4, 7, 9, 2, 8, 4, 7, 3, 10, 9, 5, 3, 5, 8, 8, 3, 10, 4
Offset: 0

Views

Author

Keywords

Examples

			a(11)=3 because 4^11 = 4194304 with three 4's.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,x,y,w,cont; y:=4; k:=y; for i from 0 by 1 to n do x:=y^i; cont:=0; while x>0 do w:=x-trunc(x/10)*10; if w=k then cont:=cont+1; fi; x:=trunc(x/10); od; print(cont); od; end: P(100);
    # Alternative:
    map(n -> numboccur(4, convert(4^n,base,10)), [$0..100]); # Robert Israel, Jul 18 2018
  • Mathematica
    DigitCount[4^#,10,4]&/@Range[0,150]  (* Harvey P. Dale, Feb 01 2011 *)

A126205 Number of 3's in decimal expansion of 3^n, with n>=0.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			a(21)=3 because 3^21=10460353203 with three 3's.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,x,y,w,cont; y:=3; k:=y; for i from 0 by 1 to n do x:=y^i; cont:=0; while x>0 do w:=x-trunc(x/10)*10; if w=k then cont:=cont+1; fi; x:=trunc(x/10); od; print(cont); od; end: P(100);
  • Mathematica
    DigitCount[3^Range[0,100],10,3] (* Harvey P. Dale, May 26 2015 *)

A126207 Number of 5's in decimal expansion of 5^n.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 3, 3, 3, 2, 2, 1, 2, 2, 3, 3, 3, 2, 2, 4, 2, 3, 5, 3, 2, 3, 3, 2, 5, 4, 3, 5, 2, 6, 5, 1, 2, 1, 6, 5, 6, 4, 4, 3, 2, 4, 9, 9, 9, 4, 4, 2, 5, 2, 4, 5, 5, 7, 8, 6, 5, 5, 5, 7, 6, 11, 7, 7, 5, 5, 6, 7, 6, 8, 8, 10, 5, 6, 7, 8, 9, 4, 10, 7, 4, 8, 10, 9, 6, 5, 6, 10, 6
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,x,y,w,cont; y:=5; k:=y; for i from 0 by 1 to n do x:=y^i; cont:=0; while x>0 do w:=x-trunc(x/10)*10; if w=k then cont:=cont+1; fi; x:=trunc(x/10); od; print(cont); od; end: P(100);

A126208 Number of 6's in decimal expansion of 6^n.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 3, 1, 3, 2, 4, 2, 2, 3, 3, 1, 1, 4, 4, 2, 4, 3, 3, 2, 3, 1, 1, 3, 3, 4, 1, 3, 4, 7, 3, 2, 2, 4, 6, 4, 4, 3, 3, 3, 2, 5, 6, 1, 2, 5, 8, 7, 6, 4, 3, 6, 5, 5, 9, 6, 7, 7, 7, 5, 13, 8, 4, 5, 5, 2, 7, 4, 6, 5, 5, 12, 11, 4, 10, 7, 5, 11, 14, 9, 9, 9, 9, 7, 8, 10, 6, 8, 9, 6, 6, 7, 12, 9, 12, 11
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,x,y,w,cont; y:=6; k:=y; for i from 0 by 1 to n do x:=y^i; cont:=0; while x>0 do w:=x-trunc(x/10)*10; if w=k then cont:=cont+1; fi; x:=trunc(x/10); od; print(cont); od; end: P(100);

A126209 Number of 7's in decimal expansion of 7^n.

Original entry on oeis.org

0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 3, 1, 1, 2, 2, 0, 2, 1, 1, 3, 1, 0, 3, 0, 1, 4, 1, 2, 5, 1, 4, 2, 7, 1, 4, 4, 4, 3, 0, 3, 3, 3, 3, 5, 4, 1, 2, 2, 6, 2, 3, 5, 6, 6, 5, 7, 6, 6, 7, 4, 7, 5, 5, 6, 6, 3, 8, 1, 3, 7, 6, 8, 6, 7, 7, 1, 5, 7, 5, 4, 9, 7, 6, 10, 7, 7, 7, 4, 14, 8, 5, 10, 8, 10, 13, 11, 6, 7, 6, 6
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,x,y,w,cont; y:=7; k:=y; for i from 0 by 1 to n do x:=y^i; cont:=0; while x>0 do w:=x-trunc(x/10)*10; if w=k then cont:=cont+1; fi; x:=trunc(x/10); od; print(cont); od; end: P(100);
  • Mathematica
    DigitCount[7^Range[0,100],10,7] (* Harvey P. Dale, Sep 03 2015 *)

A126210 Number of 8's in decimal expansion of 8^n.

Original entry on oeis.org

0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 1, 4, 1, 4, 1, 3, 4, 4, 1, 3, 3, 2, 2, 3, 0, 2, 4, 1, 3, 1, 1, 4, 3, 3, 3, 4, 5, 3, 4, 4, 5, 4, 4, 3, 5, 7, 4, 10, 5, 3, 7, 7, 4, 8, 3, 6, 7, 4, 10, 6, 5, 3, 5, 10, 8, 9, 7, 10, 5, 12, 6, 10, 5, 7, 2, 9, 11, 9, 11, 7, 7, 5, 2, 9, 6, 7, 5, 13, 12, 10, 8, 4, 9, 6, 6, 10, 10
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,x,y,w,cont; y:=8; k:=y; for i from 0 by 1 to n do x:=y^i; cont:=0; while x>0 do w:=x-trunc(x/10)*10; if w=k then cont:=cont+1; fi; x:=trunc(x/10); od; print(cont); od; end: P(100);
  • Mathematica
    DigitCount[8^Range[0,100],10,8] (* Harvey P. Dale, Jan 28 2013 *)

A126211 Number of 9's in decimal expansion of 9^n.

Original entry on oeis.org

0, 1, 0, 1, 0, 2, 0, 2, 0, 1, 0, 2, 1, 1, 2, 3, 0, 3, 5, 3, 2, 5, 2, 5, 2, 4, 3, 5, 0, 3, 2, 4, 3, 3, 2, 4, 4, 5, 3, 2, 3, 6, 2, 3, 4, 5, 2, 6, 2, 3, 1, 8, 6, 6, 5, 3, 7, 7, 2, 5, 8, 8, 6, 5, 5, 8, 10, 6, 3, 9, 7, 8, 5, 7, 6, 8, 6, 10, 7, 5, 6, 10, 10, 10, 8, 9, 7, 12, 14, 12, 7, 6, 8, 5, 10, 10, 2, 14, 6, 6
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,x,y,w,cont; y:=9; k:=y; for i from 0 by 1 to n do x:=y^i; cont:=0; while x>0 do w:=x-trunc(x/10)*10; if w=k then cont:=cont+1; fi; x:=trunc(x/10); od; print(cont); od; end: P(100);

A322849 Number of times 2^k (for k < 4) appears as a substring within 2^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 3, 3, 1, 3, 3, 2, 0, 3, 5, 5, 3, 3, 4, 4, 3, 3, 4, 6, 4, 3, 6, 7, 4, 4, 6, 3, 3, 5, 5, 6, 4, 5, 7, 5, 8, 8, 5, 7, 6, 7, 9, 9, 3, 5, 10, 5, 3, 11, 10, 7, 8, 6, 10, 7, 8, 11, 8, 9, 8, 7, 12, 15, 10, 8, 13, 7, 8, 15, 8, 9, 12, 14, 12, 6, 13
Offset: 0

Views

Author

Gaitz Soponski, Dec 28 2018

Keywords

Comments

It appears that the only 0 in this sequence is a(16).

Examples

			n =  0, a(n) = 1, 2^n =     1 - solution is 1;
n =  1, a(n) = 1, 2^n =     2 - solution is 2;
n =  2, a(n) = 1, 2^n =     4 - solution is 4;
n =  3, a(n) = 1, 2^n =     8 - solution is 8;
n =  4, a(n) = 1, 2^n =    16 - solution is 1;
n =  5, a(n) = 1, 2^n =    32 - solution is 2;
n =  6, a(n) = 1, 2^n =    64 - solution is 4;
n =  7, a(n) = 3, 2^n =   128 - solutions are 1,2,8;
n = 14, a(n) = 3, 2^n = 16384 - solutions are 1,4,8;
n = 15, a(n) = 2, 2^n = 32768 - solutions are 2,8;
n = 16, a(n) = 0, 2^n = 65536 - no solutions.
		

Crossrefs

Cf. A065712 (1), A065710 (2), A065715 (4), A065719 (8).
Cf. A322849.

Programs

  • Mathematica
    Array[Total@ DigitCount[2^#, 10, {1, 2, 4, 8}] &, 85, 0] (* Michael De Vlieger, Dec 31 2018 *)
  • PARI
    a(n) = #select(x->((x==1) || (x==2) || (x==4) || (x==8)), digits(2^n)); \\ Michel Marcus, Dec 30 2018

Formula

a(n) <= A322850(n), for n >= 4.
a(n) = A065712(n) + A065710(n) + A065715(n) + A065719(n). - Michel Marcus, Dec 30 2018

A322850 Number of times 2^k for k < n-1 appears as a substring within 2^n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 3, 1, 2, 3, 3, 1, 3, 4, 3, 0, 3, 5, 5, 3, 3, 4, 4, 5, 4, 5, 6, 4, 3, 6, 8, 4, 4, 6, 3, 3, 5, 5, 6, 5, 6, 7, 5, 9, 9, 6, 8, 6, 7, 9, 9, 3, 5, 10, 5, 3, 11, 10, 8, 8, 6, 11, 7, 10, 13, 10, 10, 8, 7, 13, 16, 12, 9, 13, 8, 9, 16, 8, 9, 12, 15, 14, 7, 14, 9
Offset: 0

Views

Author

Gaitz Soponski, Dec 28 2018

Keywords

Examples

			n =  0, a(n) = 0, 2^n =     1 - no solutions;
n =  1, a(n) = 0, 2^n =     2 - no solutions;
n =  2, a(n) = 0, 2^n =     4 - no solutions;
n =  3, a(n) = 0, 2^n =     8 - no solutions;
n =  4, a(n) = 1, 2^n =    16 - solution is 1;
n =  5, a(n) = 1, 2^n =    32 - solution is 2;
n =  6, a(n) = 1, 2^n =    64 - solution is 4;
n =  7, a(n) = 3, 2^n =   128 - solutions are 1,2,8;
n = 14, a(n) = 4, 2^n = 16384 - solutions are 1,4,8,16;
n = 15, a(n) = 3, 2^n = 32768 - solutions are 2,8,32;
n = 16, a(n) = 0, 2^n = 65536 - no solutions.
		

Crossrefs

Cf. A065712 (1), A065710 (2), A065715 (4), A065719 (8).
Cf. A322849.

Programs

  • Mathematica
    Array[If[# < 4, Total@ DigitCount[2^#, 10, 2^Range[0, Min[# - 1, 3]]], Total@ DigitCount[2^#, 10, {1, 2, 4, 8}]] &, 85, 0] (* Michael De Vlieger, Dec 31 2018 *)
  • PARI
    isp2(n) = (n==1) || (n==2) || (ispower(n,,&k) && (k==2));
    a(n) = {my(d=digits(2^n), nb = 0); for (i=1, #d-1, for (j=1, #d-i+1, my(nd = vector(i, k, d[j+k-1])); if (nd[1] != 0, nb += isp2(fromdigits(nd))););); nb;} \\ Michel Marcus, Dec 30 2018

Formula

a(n) >= A322849(n), for n >= 4.
Previous Showing 11-20 of 20 results.