OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (n = 1..1000 from Jens Kruse Andersen)
EXAMPLE
20, 21, 22, 23, 24, 25, and 26 are not cubes. 27 is a cube. Thus a(2) = 7.
MATHEMATICA
lnc[n_]:=Module[{k=1}, While[!IntegerQ[Surd[n*10^IntegerLength[k]+k, 3]], k++]; k]; Array[lnc, 60] (* Harvey P. Dale, Aug 08 2019 *)
PROG
(PARI)
a(n)=p=""; for(k=0, 10^6, p=concat(Str(n), Str(k)); if(ispower(eval(p))&&ispower(eval(p))%3==0, return(k)))
n=1; while(n<100, print1(a(n), ", "); n++)
(Python)
from sympy import integer_nthroot
def A245631(n):
m = 10*n
if integer_nthroot(m, 3)[1]: return 0
a = 1
while (k:=(integer_nthroot(a*(m+1)-1, 3)[0]+1)**3-m*a)>=10*a:
a *= 10
return k # Chai Wah Wu, Feb 15 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, Jul 27 2014
STATUS
approved