login
A217330
The number of integer solutions to the equation x1 + x2 + x3 + x4 = n, with xi >= 0, and with x2 + x3 divisible by 3.
1
1, 2, 3, 8, 13, 18, 30, 42, 54, 76, 98, 120, 155, 190, 225, 276, 327, 378, 448, 518, 588, 680, 772, 864, 981, 1098, 1215, 1360, 1505, 1650, 1826, 2002, 2178, 2388, 2598, 2808, 3055, 3302, 3549, 3836, 4123, 4410, 4740, 5070, 5400, 5776, 6152, 6528, 6953
OFFSET
0,2
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
Sequence in context: A127484 A193882 A168343 * A358207 A236169 A080478
KEYWORD
nonn,easy
AUTHOR
Jeffrey Kay, Sep 30 2012
STATUS
approved