|
|
A243295
|
|
Least number k > 0 such that 3^k contains an n-digit long substring of the infinite string "0123456789012345678901234567890123456..."
|
|
1
|
|
|
1, 8, 15, 57, 102, 332, 2345, 2345, 10110, 118745, 127188, 326758, 2258910, 6154926
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) is an increasing (but not necessarily strictly increasing) sequence.
a(7) = 4849 if all numbers were distinct.
|
|
LINKS
|
|
|
EXAMPLE
|
3^8 = 6561 contains a subsequence of the infinite string in the definition ('56'). Thus a(2) = 8.
|
|
PROG
|
(Python)
def a(n):
..for k in range(1, 10**5):
....for i in range(10):
......s = ''
......for j in range(i, i+n):
........dig=j%10
........s+=str(dig)
......if str(3**k).find(s) > -1:
........return k
n=1
while n < 10:
..print(a(n))
..n+=1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,hard,base,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|