OFFSET
0,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 1..1000 from T. D. Noe)
FORMULA
a(n) = A018852(n)^3. - Seiichi Manyama, Jan 30 2017
MATHEMATICA
a[n_] := For[idn = IntegerDigits[n]; k = 1, True, k++, idk = IntegerDigits[k^3]; If[Length[idn] <= Length[idk], If[idk[[1 ;; Length[idn]]] == idn, Return[k^3]]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 1000}] (* Jean-François Alcover, Mar 13 2016 *)
id[n_]:=With[{idn=IntegerDigits[n]}, idn==Take[IntegerDigits[#], Length[ idn]]&]; With[{c=Range[0, 250]^3}, Table[SelectFirst[c, id[k]], {k, 0, 40}]]//Quiet (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 08 2018 *)
PROG
(Python)
for n in range(1, 10**3):
for k in range(10**3):
if str(k**3).startswith(str(n)):
print(k**3, end=', ')
break
n += 1 # Derek Orr, Aug 03 2014
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
EXTENSIONS
Added initial 0. - Seiichi Manyama, Jan 30 2017
STATUS
approved