login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A272071
Expansion of x*(3 - 2*x + x^2)/((1 - x)^2*(1 + x + x^2)).
1
0, 3, 1, 2, 5, 3, 4, 7, 5, 6, 9, 7, 8, 11, 9, 10, 13, 11, 12, 15, 13, 14, 17, 15, 16, 19, 17, 18, 21, 19, 20, 23, 21, 22, 25, 23, 24, 27, 25, 26, 29, 27, 28, 31, 29, 30, 33, 31, 32, 35, 33, 34, 37, 35, 36, 39, 37, 38, 41, 39, 40, 43, 41, 42, 45, 43, 44, 47, 45, 46, 49, 47, 48, 51, 49, 50, 53, 51, 52, 55
OFFSET
0,2
FORMULA
O.g.f.: x*(3 - 2*x + x^2)/((1 - x)^2*(1 + x + x^2)).
E.g.f.: 2*(3*x*exp(x) + 3*exp(x) - exp(-x/2)*(3*cos((sqrt(3)*x)/2) - 4*sqrt(3)*sin((sqrt(3)*x)/2)))/9.
a(n) = a(n-1) + a(n-3) - a(n-4) for n>3.
a(n) = 2*(3*n + 4*sqrt(3)*sin((2*Pi*n)/3) - 3*cos((2*Pi*n)/3) + 3)/9.
a(n) = 3*n - 2*floor(n/3) - 5*floor((n + 1)/3). - Vaclav Kotesovec, Apr 22 2016
a(n) mod 2 = A011655(n).
MAPLE
A272071:=proc(n) option remember;
if n=0 then 0 elif n=1 then 3 elif n=2 then 1 elif n=3 then 2 else
a(n-1)+a(n-3)-a(n-4); fi; end: seq(A272071(n), n=0..150); # Wesley Ivan Hurt, Apr 20 2016
MATHEMATICA
LinearRecurrence[{1, 0, 1, -1}, {0, 3, 1, 2}, 80]
Table[2 ((3 n + 4 Sqrt[3] Sin[(2 Pi n)/3] - 3 Cos[(2 Pi n)/3] + 3)/9), {n, 0, 79}]
CoefficientList[Series[x*(3 - 2*x + x^2)/((1 - x)^2*(1 + x + x^2)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Apr 20 2016 *)
PROG
(PARI) concat(0, Vec(x*(3-2*x+x^2)/((1-x)^2*(1+x+x^2)) + O(x^99))) \\ Altug Alkan, Apr 22 2016
CROSSREFS
Sequence in context: A033765 A033777 A329144 * A033801 A332319 A359753
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Apr 19 2016
STATUS
approved