OFFSET
0,2
COMMENTS
Permutation of the nonnegative integers.
LINKS
FORMULA
Blocks of 6 numbers: a(6*k+0 .. 6*k+5) = (4*k+0, 12*k+2, 4*k+1, 12*k+6, 4*k+3, 12*k+10) for k >= 0.
O.g.f.: x*(1 + x^2)*(2 + x + 2*x^2 + x^3 + 2*x^4)/((1 - x^2)^2*(1 + x^2 + x^4)).
If n is odd, then a(n) = 2*n; otherwise, a(n) = nearest integer to 2*n/3. - Philippe Deléham, Nov 09 2023
MAPLE
gf := (x*(1 + x^2)*(2 + x + 2*x^2 + x^3 + 2*x^4))/((-1 + x)^2*(1 + x)^2*(1 - x + x^2)*(1 + x + x^2)): ser := series(gf, x, 82):
seq(coeff(ser, x, n), n=0..79); # Peter Luschny, Oct 16 2020
MATHEMATICA
LinearRecurrence[{0, 1, 0, 0, 0, 1, 0, -1}, {0, 2, 1, 6, 3, 10, 4, 14}, 80]
PROG
(PARI) my(x='x+O('x^80)); Vec((x*(2+x+4*x^2+2*x^3+4*x^4+x^5+2*x^6))/((1-x^2)^2*(1+x^2+x^4)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Georg Fischer, Oct 16 2020
STATUS
approved