OFFSET
0,3
LINKS
FORMULA
If n is a cube then a(n) = a(n^(1/3))^3, otherwise if the difference between n and the highest cube less than n is odd then a(n) = n+1, otherwise a(n) = (n-1)^3.
MATHEMATICA
a[n_] := a[n] = Which[r = n^(1/3); IntegerQ[r], a[r]^3, OddQ[n - Floor[r]^3], n+1, True, (n-1)^3]; a[0]=0; a[1]=1; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Aug 07 2012, after formula *)
CROSSREFS
KEYWORD
nice,nonn
AUTHOR
Henry Bottomley, Apr 27 2000
STATUS
approved