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-14 of 14 results.

A131540 Exponent of least power of 2 having exactly n consecutive 6's in its decimal representation.

Original entry on oeis.org

0, 4, 46, 157, 222, 220, 2269, 11019, 18842, 192918, 192916, 271979, 1039316, 7193133, 14060686, 97428976
Offset: 0

Views

Author

Shyam Sunder Gupta, Aug 26 2007

Keywords

Examples

			a(3)=157 because 2^157(i.e. 182687704666362864775460604089535377456991567872) is the smallest power of 2 to contain a run of 3 consecutive sixes in its decimal form.
		

Crossrefs

Programs

  • Mathematica
    a = ""; Do[ a = StringJoin[a, "6"]; b = StringJoin[a, "6"]; k = 1; While[ StringPosition[ ToString[2^k], a] == {} || StringPosition[ ToString[2^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]

Extensions

Two more terms from Sean A. Irvine, May 31 2010
a(13)-a(14) from Lars Blomberg, Jan 24 2013
a(15) from Bert Dobbelaere, Mar 07 2019
a(0)=0 prepended by Paul Geneau de Lamarlière, Jul 20 2024

A131541 Exponent of least power of 2 having exactly n consecutive 7's in its decimal representation.

Original entry on oeis.org

0, 15, 27, 24, 181, 317, 2309, 972, 25264, 131979, 279275, 279269, 1727605, 6030752, 8760853, 77235364
Offset: 0

Views

Author

Shyam Sunder Gupta, Aug 26 2007

Keywords

Examples

			a(3)=24 because 2^24(i.e. 16777216) is the smallest power of 2 to contain a run of 3 consecutive sevens in its decimal form.
		

Crossrefs

Programs

  • Mathematica
    a = ""; Do[ a = StringJoin[a, "7"]; b = StringJoin[a, "7"]; k = 1; While[ StringPosition[ ToString[2^k], a] == {} || StringPosition[ ToString[2^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]

Extensions

a(11)-a(12) from Sean A. Irvine, May 31 2010
a(13)-a(14) from Lars Blomberg, Jan 24 2013
a(15) from Bert Dobbelaere, Mar 02 2019
a(0)=0 prepended by Paul Geneau de Lamarlière, Jul 20 2024

A329172 a(n) is the least positive exponent k such that the decimal expansion of 5^k contains n consecutive zeros.

Original entry on oeis.org

1, 8, 39, 67, 228, 1194, 3375, 10052, 19699, 26563, 26566, 922553
Offset: 0

Views

Author

Michel Marcus, Nov 07 2019

Keywords

Comments

From David A. Corneth, Nov 07 2019: (Start)
Let z(n) be the largest number of consecutive zeros in 5^n. Then we have |z(n+1) - z(n)| <= 1. So we needn't check every k if it's in the sequence. (End)

Examples

			5^1 = 5 is the first power of 5 that has no zero, so a(0) = 1.
5^8 = 390625 is the first power of 5 that has 1 zero, so a(1) = 8.
5^39 = 1818989403545856475830078125 is the first power of 5 that has 2 consecutive zeros, so a(2) = 39.
		

Crossrefs

Cf. A000351 (powers of 5), A006889, A052968 (another family of exponents), A195269, A329174.

Programs

  • Mathematica
    Print[1]; zero = {}; Do[zero = zero <> "0"; k = 1; While[StringPosition[ToString[5^k], zero] == {}, k++]; Print[k];, {n, 1, 10}] (* Vaclav Kotesovec, Nov 07 2019 *)
  • PARI
    isok(k, n) = {my(d = digits(5^k), pz = select(x->(x==0), d)); if (n<=1, return (#pz == n)); if (#pz < n, return (0)); my(c=0, ok=0, kc=0); for (i=1, #d, if (d[i] == 0, ok = 1; if (ok, c++), if (c > kc, kc=c); ok = 0; c = 0);); kc == n;}
    a(n) = my(k=1); while (!isok(k, n), k++); k;
    
  • PARI
    upto(n) = {my(p5 = 5, res = List()); for(i = 1, n, c = qconsecutivezeros(p5); for(j = #res, c, listput(res, i); print1(i", "); ); p5 *= 5 ); res }
    qconsecutivezeros(n) = { my(d = digits(n), streak = 0, res = 0); for(i = 1, #d, if(d[i] == 0, streak++ , res = max(streak, res); streak = 0 ) ); res } \\ David A. Corneth, Nov 07 2019

Extensions

a(9)-a(10) from David A. Corneth, Nov 07 2019
a(11) from Vaclav Kotesovec, Nov 08 2019

A329174 a(n) is the least positive exponent k such that the decimal expansion of 7^k contains n consecutive zeros.

Original entry on oeis.org

1, 4, 20, 74, 154, 499, 510, 4411, 6984, 33836, 61282, 709339, 1570651
Offset: 0

Views

Author

Vaclav Kotesovec, Nov 07 2019

Keywords

Examples

			7^20 = 79792266297612001 is the first power of 7 that has 2 consecutive zeros, so a(2) = 20.
7^74 = 344552147465294110719732986332367243247925798357929806000836849 is the first power of 7 that has 3 consecutive zeros, so a(3) = 74.
		

Crossrefs

Cf. A006889 (2^k), A195269 (3^k), A329172 (5^k).

Programs

  • Mathematica
    Print[1]; zero = {}; Do[zero = zero <> "0"; k = 1; While[StringPosition[ToString[7^k], zero] == {}, k++]; Print[k];, {n, 1, 10}]

Extensions

a(12) from Chai Wah Wu, Nov 13 2019
Previous Showing 11-14 of 14 results.