OFFSET
0,1
COMMENTS
The same as A120634 except for first 3 terms. - Pietro Battiston, Jan 19 2008
Permutation of the nonnegative integers. - Wesley Ivan Hurt, Apr 06 2016
REFERENCES
E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 60.
J. H. Conway, On Numbers and Games. Academic Press, NY, 1976, pp. 51-53.
LINKS
FORMULA
G.f.: (4*x^4-x^3-x^2-x+3)/((x-1)^2*(x+1)*(x^2+1)). - Ralf Stephan, Nov 01 2003
a(n) = n + (-1)^n + 2*(-1)^floor(n/2). - Mitchell Harris, Jan 10 2005
From Wesley Ivan Hurt, Apr 06 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>4.
a(n) = n + (-1)^n + 2*(-1)^((2*n-1+(-1)^n)/4).
a(n) = n XOR 3. - Falk Hüffner, Jan 23 2022
MAPLE
MATHEMATICA
CoefficientList[Series[(4x^4-x^3-x^2-x+3)/((x-1)^2(x+1) (x^2+1)), {x, 0, 70}], x] (* Harvey P. Dale, Mar 24 2011 *)
Table[n + (-1)^n + 2 (-1)^Floor[n/2], {n, 0, 100}] (* Wesley Ivan Hurt, Apr 06 2016 *)
PROG
(Magma) [n + (-1)^n + 2*(-1)^Floor(n/2): n in [0..100]]; // Wesley Ivan Hurt, Apr 06 2016
(PARI) Vec((4*x^4-x^3-x^2-x+3)/((x-1)^2*(x+1)*(x^2+1)) + O(x^90)) \\ Michel Marcus, Apr 06 2016
(Python)
def a(n): return n^3
print([a(n) for n in range(69)]) # Michael S. Branicky, Jan 23 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Michael S. Branicky, Jan 23 2022
STATUS
approved