login
A367286
Inverse of A342131.
1
0, 2, 1, 4, 6, 3, 8, 10, 5, 12, 14, 7, 16, 18, 9, 20, 22, 11, 24, 26, 13, 28, 30, 15, 32, 34, 17, 36, 38, 19, 40, 42, 21, 44, 46, 23, 48, 50, 25, 52, 54, 27, 56, 58, 29, 60, 62, 31, 64, 66, 33, 68, 70, 35, 72, 74, 37, 76, 78, 39, 80, 82, 41, 84, 86, 43, 88, 90, 45, 92, 94, 47
OFFSET
0,2
COMMENTS
Permutation of the nonnegative numbers.
FORMULA
a(3*n) = 4*n, a(3*n+1) = 4*n+2, a(3*n+2) = 2*n+1.
a(n) = 2*a(n-3) - a(n-6) for n >= 6.
a(n) = A006369(n+1) - 1.
G.f.: x*(2+x+4*x^2+2*x^3+x^4)/(1-x^3)^2.
E.g.f.: exp(-x/2)*(exp(3*x/2)*(10*x + 1) + (2*x - 1)*cos(sqrt(3)*x/2) + sqrt(3)*(3 - 2*x)*sin(sqrt(3)*x/2))/9. - Stefano Spezia, Nov 12 2023
MATHEMATICA
LinearRecurrence[{0, 0, 2, 0, 0, -1}, {0, 2, 1, 4, 6, 3}, 100] (* Paolo Xausa, Nov 14 2023 *)
CROSSREFS
Sequence in context: A209162 A127366 A064786 * A193902 A043302 A375305
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Nov 12 2023
STATUS
approved