|
|
A054792
|
|
Earliest sequence with a(a(n)) = n^3.
|
|
1
|
|
|
0, 1, 3, 8, 5, 64, 7, 216, 27, 10, 729, 12, 1331, 14, 2197, 16, 3375, 18, 4913, 20, 6859, 22, 9261, 24, 12167, 26, 15625, 512, 29, 21952, 31, 27000, 33, 32768, 35, 39304, 37, 46656, 39, 54872, 41, 64000, 43, 74088, 45, 85184, 47, 97336, 49, 110592, 51
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|