A195269
Smallest n such that 3^n contains n consecutive 0's in its decimal representation.
Original entry on oeis.org
10, 35, 148, 332, 540, 540, 7722, 22793, 107189, 107189, 513335, 1847534, 5756981, 32023025, 82011444
Offset: 1
-
def A195269(n):
m, s = 1, '0'*n
for i in range(1,10**9):
m *= 3
if s in str(m):
return i
return "search limit reached." # Chai Wah Wu, Dec 11 2014
A131544
Least power of 3 having exactly n consecutive 9's in its decimal representation.
Original entry on oeis.org
2, 34, 35, 276, 1520, 2342, 8882, 32313, 164065, 265693, 1123487, 2421341, 6250773, 9995032, 68353789, 78927182
Offset: 1
a(3)=35 because 3^35 (i.e., 50031545098999707) is the smallest power of 3 to contain a run of 3 consecutive nines in its decimal form.
-
a = ""; Do[ a = StringJoin[a, "9"]; b = StringJoin[a, "9"]; k = 1; While[ StringPosition[ ToString[3^k], a] == {} || StringPosition[ ToString[3^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
-
def A131544(n):
m, s = 1, '9'*n
for i in range(1,10**9):
m *= 3
if s in str(m):
return i
return "search limit reached." # Chai Wah Wu, Dec 11 2014
A131552
Least positive power of 3 having exactly n consecutive 1's in its decimal representation.
Original entry on oeis.org
4, 19, 93, 334, 841, 3404, 7271, 7720, 44152, 406774, 993948, 2421339, 8786439, 11387707, 93548200
Offset: 1
a(3)=93 because 3^93 (i.e., 235655016338368235499067731945871638181119123) is the smallest power of 3 to contain a run of 3 consecutive ones in its decimal form.
-
a = ""; Do[ a = StringJoin[a, "1"]; b = StringJoin[a, "1"]; k = 1; While[ StringPosition[ ToString[3^k], a] == {} || StringPosition[ ToString[3^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
-
def A131552(n):
m, s = 1, '1'*n
for i in range(1, 10**9):
m *= 3
if s in str(m):
return i
return "search limit reached." # Chai Wah Wu, Dec 11 2014
A131545
Least k such that 3^k has exactly n consecutive 8's in its decimal representation.
Original entry on oeis.org
4, 23, 32, 215, 1261, 538, 4797, 17612, 32311, 375482, 512959, 1847532, 8295710, 8885853, 80798025
Offset: 1
a(3)=32 because 3^32 (i.e., 1853020188851841) is the smallest power of 3 to contain a run of 3 consecutive eights in its decimal form.
-
a = ""; Do[ a = StringJoin[a, "8"]; b = StringJoin[a, "8"]; k = 1; While[ StringPosition[ ToString[3^k], a] == {} || StringPosition[ ToString[3^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
A131547
Least power of 3 having exactly n consecutive 6's in its decimal representation.
Original entry on oeis.org
8, 33, 34, 275, 1385, 539, 8881, 22792, 90785, 107188, 704996, 1847533, 5756980, 9995031, 68353788
Offset: 1
a(3)=34 because 3^34(i.e. 16677181699666569) is the smallest power of 3 to contain a run of 3 consecutive sixes in its decimal form.
-
a = ""; Do[ a = StringJoin[a, "6"]; b = StringJoin[a, "6"]; k = 1; While[ StringPosition[ ToString[3^k], a] == {} || StringPosition[ ToString[3^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
A131548
Least power of 3 having a run of exactly n consecutive 5's in its decimal representation.
Original entry on oeis.org
8, 27, 33, 33, 274, 2076, 5173, 8880, 67390, 206131, 864271, 1291676, 5756979, 13654248, 73000220
Offset: 1
a(3) = 33 because 3^33 = 5559060566555523 is the smallest power of 3 that contains a run of exactly 3 consecutive 5's in its decimal form. (3^33 happens to contain also a run of exactly 4 consecutive 5's, so a(4) is also 33.)
A131549
Least exponent k such that 3^k has exactly n consecutive 4's in its decimal representation.
Original entry on oeis.org
5, 12, 55, 308, 510, 2340, 7286, 9670, 125406, 222961, 847169, 639226, 6250771, 14929721
Offset: 1
a(3)=55 because 3^55 (i.e., 174449211009120179071170507) is the smallest power of 3 to contain a run of 3 consecutive fours in its decimal form.
-
a = ""; Do[ a = StringJoin[a, "4"]; b = StringJoin[a, "4"]; k = 1; While[ StringPosition[ ToString[3^k], a] == {} || StringPosition[ ToString[3^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
-
def a(n):
target, antitarget = '4'*n, '4'*(n+1)
k, pow3 = 1, 3
while True:
t = str(pow3)
if target in t and antitarget not in t: return k
k, pow3 = k+1, pow3*3
print([a(n) for n in range(1, 9)]) # Michael S. Branicky, May 12 2021
A131550
a(n) is the least exponent e such that 3^e has exactly n consecutive 3's in its decimal representation.
Original entry on oeis.org
1, 31, 119, 185, 511, 2341, 9671, 7721, 67449, 364579, 513334, 639227, 6250772, 30377688, 82011443, 78927181
Offset: 1
a(3)=119 because 3^119 (i.e., 599003433304810403471059943169868346577158542512617035467) is the smallest power of 3 to contain a run of 3 consecutive threes in its decimal form.
-
a = ""; Do[ a = StringJoin[a, "3"]; b = StringJoin[a, "3"]; k = 1; While[ StringPosition[ ToString[3^k], a] == {} || StringPosition[ ToString[3^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
A131551
Least power of 3 having exactly n consecutive 2's in its decimal representation.
Original entry on oeis.org
3, 19, 148, 253, 330, 2380, 2124, 30598, 22791, 238582, 107187, 1521134, 10363119, 9995030, 68353787
Offset: 1
a(3)=148 because 3^148 (i.e. 41109831670569663658300086939077404909608122265524774868353822811305361) is the smallest power of 3 to contain a run of 3 consecutive twos in its decimal form.
-
a = ""; Do[ a = StringJoin[a, "2"]; b = StringJoin[a, "2"]; k = 1; While[ StringPosition[ ToString[3^k], a] == {} || StringPosition[ ToString[3^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
-
def a(n):
k, n2, np2 = 1, '2'*n, '2'*(n+1)
while True:
while not n2 in str(3**k): k += 1
if np2 not in str(3**k): return k
k += 1
print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Mar 19 2021
Showing 1-9 of 9 results.
Comments