|
|
A131452
|
|
a(3n)=4n, a(3n+1)=4n+2, a(3n+2)=4n+1.
|
|
1
|
|
|
0, 2, 1, 4, 6, 5, 8, 10, 9, 12, 14, 13, 16, 18, 17, 20, 22, 21, 24, 26, 25, 28, 30, 29, 32, 34, 33, 36, 38, 37, 40, 42, 41, 44, 46, 45, 48, 50, 49, 52, 54, 53, 56, 58, 57, 60, 62, 61, 64, 66, 65, 68, 70, 69, 72, 74, 73, 76, 78, 77, 80, 82, 81, 84, 86, 85, 88, 90, 89, 92, 94, 93
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (12*n-3+9*cos(2*(n-1)*Pi/3)-5*sqrt(3)*sin(2*(n-1)*Pi/3))/9. - Wesley Ivan Hurt, Sep 30 2017
G.f.: (x*(2 - x + 3*x^2))/((x - 1)^2*(1 + x + x^2)). - Georg Fischer, Nov 17 2022
|
|
MAPLE
|
nmax:= 40: gf:= (x*(2 - x + 3*x^2))/((x - 1)^2*(1 + x + x^2)): ser:= series(gf, x, nmax + 16): seq(coeff(ser, x, i), i=0..nmax); # Georg Fischer, Nov 17 2022
|
|
MATHEMATICA
|
Table[Switch[Mod[n, 3], 0, 4 n/3, 1, 4 (n - 1)/3 + 2, 2, 4 (n - 2)/3 + 1], {n, 0, 71}] (* Michael De Vlieger, Sep 30 2017 *)
|
|
CROSSREFS
|
Essentially partial sums of A131756.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|