login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
0,3
COMMENTS
Suggested by a problem in stacking tetrahedra and cubes.
FORMULA
G.f.: (1-2*x+8*x^2+4*x^3+x^4)/((1-x)^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: A029875 A335671 A337628 * A373479 A328408 A198956
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Jun 10 2007
EXTENSIONS
Edited, corrected and extended by Stefan Steinerberger, Jul 21 2007
STATUS
approved