OFFSET
0,2
COMMENTS
A permutation of the nonnegative integers.
A092486 preceded by a zero. - Philippe Deléham, May 05 2009
Fixed points are the even numbers. - Wesley Ivan Hurt, Oct 16 2015
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..10000
OEIS wiki, Lodumo transform.
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
a(n) = lod_4 (A102370(n)).
From Wesley Ivan Hurt, Oct 16 2015: (Start)
G.f.: (3*x-4*x^2+3*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), n>3.
a(n) = n-(1-(-1)^n)*(-1)^((2*n+1-(-1)^n)/4).
a(n+1) - a(n) = A132429(n)*(-1)^n. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) (A002162). - Amiram Eldar, Nov 28 2023
MAPLE
A159966:=n->n-(1-(-1)^n)*(-1)^((2*n+1-(-1)^n)/4): seq(A159966(n), n=0..100); # Wesley Ivan Hurt, Oct 16 2015
MATHEMATICA
Table[n - (1 - (-1)^n) (-1)^((2 n + 1 - (-1)^n)/4), {n, 0, 40}] (* or *) CoefficientList[Series[(3 x - 4 x^2 + 3 x^3)/((x - 1)^2 (1 + x^2)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Oct 16 2015 *)
LinearRecurrence[{2, -2, 2, -1}, {0, 3, 2, 1}, 80] (* Harvey P. Dale, Jul 02 2022 *)
PROG
(Magma) [n-(1-(-1)^n)*(-1)^((2*n+1-(-1)^n) div 4) : n in [0..100]]; // Wesley Ivan Hurt, Oct 16 2015
(PARI) concat(0, Vec((3*x-4*x^2+3*x^3)/((x-1)^2*(1+x^2)) + O(x^100))) \\ Altug Alkan, Oct 17 2015
CROSSREFS
KEYWORD
easy,nonn,less,base
AUTHOR
Philippe Deléham, Apr 28 2009
STATUS
approved