

A129957


a(n) = n^3 if n is odd, n^3 + 1 otherwise.


2



1, 1, 9, 27, 65, 125, 217, 343, 513, 729, 1001, 1331, 1729, 2197, 2745, 3375, 4097, 4913, 5833, 6859, 8001, 9261, 10649, 12167, 13825, 15625, 17577, 19683, 21953, 24389, 27001, 29791, 32769, 35937, 39305, 42875, 46657, 50653, 54873, 59319
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

Suggested by a problem in stacking tetrahedra and cubes.


LINKS

Table of n, a(n) for n=0..39.
Index entries for linear recurrences with constant coefficients, signature (3,2,2,3,1).


FORMULA

G.f.: (12*x+8*x^2+4*x^3+x^4)/((1x)^4*(1+x)). [Colin Barker, May 09 2012]


MATHEMATICA

f[n_] := If[Mod[n, 2] == 0, n^3 + 1, n^3]; Table[f[n], {n, 0, 30}]


CROSSREFS

Sequence in context: A011923 A029875 A335671 * A328408 A198956 A110205
Adjacent sequences: A129954 A129955 A129956 * A129958 A129959 A129960


KEYWORD

nonn,easy


AUTHOR

Roger L. Bagula, Jun 10 2007


EXTENSIONS

Edited, corrected and extended by Stefan Steinerberger, Jul 21 2007


STATUS

approved



