OFFSET
1,2
EXAMPLE
a(3) = 126, as 126^3 = 2000376 contains a digit (0) repeated n (3) times.
MATHEMATICA
a[n_] := Block[{k=1}, While[Mod[k, 10] == 0 || ! MemberQ[Length /@ Split[ IntegerDigits[ k^3]], n], k++]; k]; Array[a, 8] (* Giovanni Resta, Apr 10 2017 *)
PROG
(Python) import collections
import re
cur = 1
def repeat( num , reps ):
r = str(num)
n = 1
while n < reps:
r += str(num)
n += 1
return r;
while True:
k = 0
while k < 10:
rep = repeat(k, 9)
while re.search(rep, str(cur**3)) != None:
if re.search(rep + str(k), str(cur**3)) == None:
print(str(cur) + ", " + str(cur**3))
rep += str(k)
else:
rep += str(k)
k += 1
cur += 1
if cur % 10 == 0:
cur += 1 #note: this will display all cubes with a substring of 9 repeated digits. To change this to n repeats, replace repeat(k, 9) with repeat(k, n).
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Jason Wang, Apr 08 2017
EXTENSIONS
a(10)-a(15) from Giovanni Resta, Apr 10 2017
STATUS
approved