OFFSET
0,1
COMMENTS
Fixed points are the odd numbers (A005408).
LINKS
FORMULA
G.f.: (2 - 3*x + 2*x^2 + x^3)/((x - 1)^2*(1 + x^2)).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>3.
a(n) = n + (1 + (-1)^n)*(-1)^(n*(n+1)/2).
a(n) = 4*floor((n+1)/4) - (n mod 4) + 2.
a(n) = A092486(n) - 1.
a(n) = n + A176742(n) for n>0.
a(-n-1) = -A263449(n).
a(n+1) = a(n) - A132429(n+1)*(-1)^n.
Sum_{n>=0, n!=2} (-1)^(n+1)/a(n) = 1 - log(2) (A244009). - Amiram Eldar, Dec 25 2023
MATHEMATICA
Table[n + (1 + (-1)^n)*(-1)^(n*(n + 1)/2), {n, 0, 80}]
PROG
(Magma) [n+(1+(-1)^n)*(-1)^(n*(n+1) div 2) : n in [0..80]];
(Magma) /* By definition: */ &cat[[4*k+2, 4*k+1, 4*k, 4*k+3]: k in [0..20]]; // Bruno Berselli, Nov 08 2015
(PARI) Vec((2-3*x+2*x^2+x^3)/((x-1)^2*(1+x^2)) + O(x^100)) \\ Altug Alkan, Oct 19 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Oct 17 2015
STATUS
approved