OFFSET
0,2
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (2,-1,2,-4,2,-1,2,-1).
FORMULA
From Robert Israel, May 09 2018: (Start)
a(3*k) = (k+1)*(3*k^2+3*k+2)/2.
a(3*k+1) = (k+1)*(3*k^2+6*k+4)/2.
a(3*k+2) = 3*(k+1)^2*(k+2)/2.
G.f.: (1+2*x^3)/((1-x)*(1-x^3))^2. (End)
MAPLE
for n from 0 to 50 do
out[n]:=0:
for x1 from 0 to n do
for x2 from 0 to n do
for x3 from 0 to n do
for x4 from 0 to n do
if irem(x2+x3, 3)=0 then
if x1+x2+x3+x4=n then
out[n]:=out[n]+1:
end if: end if: end do: end do: end do: end do: end do:
for n from 0 to 50 do
out[n];
end do;
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jeffrey Kay, Sep 30 2012
STATUS
approved