OFFSET
0,3
FORMULA
EXAMPLE
The 9th integer is 8 so a(9) = 8^(1/3) = 2.
MATHEMATICA
rcr[n_]:=Module[{crn=Power[n, (3)^-1]}, If[IntegerQ[crn], crn, n]]; Array[ rcr, 80, 0] (* Harvey P. Dale, Jan 28 2012 *)
PROG
(PARI) iscube(n) = { local(r); r = n^(1/3); if(floor(r+.5)^3== n, 1, 0) }
replcube(n) = { for(x=0, n, if(iscube(x), y=x^(1/3), y=x); print1(floor(y)", ")) }
(PARI) a(n)=ispower(n, 3, &n); n \\ Charles R Greathouse IV, Oct 27 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Cino Hilliard, Aug 23 2004
EXTENSIONS
Corrected by T. D. Noe, Oct 25 2006
STATUS
approved