|
|
A243304
|
|
Least number k > 0 such that 3^k contains at least an n-digit long substring of the infinite string "98765432109876543210987654...".
|
|
0
|
|
|
1, 5, 13, 50, 213, 536, 536, 536, 9354, 63202, 117150, 1314904, 2572181, 2572181
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n+1) >= a(n) for all n.
Note that this sequence is "..at least an n-digit long substring...", not "..exactly an n-digit long substring...". Thus a(6) = a(7) = a(8) = 536. However, if it were "..exactly an n-digit long substring...", a(6) would be 810 and a(7) would be 1772. - Derek Orr, Sep 26 2014
a(15) > 10^7. If the definition were "exactly an n-digit long" then a(13) would be 4019359. - Delbert L. Johnson, Apr 13 2024
|
|
LINKS
|
|
|
EXAMPLE
|
3^5 = 243 contains a 2-digit substring of the infinite string "98765432109876543210987654..." (in this case, "43"). So a(2) = 5.
|
|
PROG
|
(Python)
def Rev(n):
rev = ''
for i in str(n):
rev = i + rev
return rev
def a(n):
lst = []
for b in range(1, 10**n):
if len(str(3**b)) >= n:
lst.append(b)
break
for k in range(lst[0], 50000):
for i in range(10):
s = ''
s += str(i)
for j in range(i+1, i+n):
dig = j%10
s+=str(dig)
if str(3**k).find(Rev(s)) > -1:
return k
n = 1
while n < 100:
print(a(n), end=', ')
n += 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more,hard,less,changed
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|