login
The number of integer solutions to the equation x1 + x2 + x3 + x4 = n, with xi >= 0, and with x2 + x3 divisible by 3.
1

%I #13 May 10 2018 02:49:20

%S 1,2,3,8,13,18,30,42,54,76,98,120,155,190,225,276,327,378,448,518,588,

%T 680,772,864,981,1098,1215,1360,1505,1650,1826,2002,2178,2388,2598,

%U 2808,3055,3302,3549,3836,4123,4410,4740,5070,5400,5776,6152,6528,6953

%N The number of integer solutions to the equation x1 + x2 + x3 + x4 = n, with xi >= 0, and with x2 + x3 divisible by 3.

%H Robert Israel, <a href="/A217330/b217330.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,2,-4,2,-1,2,-1).

%F From _Robert Israel_, May 09 2018: (Start)

%F a(3*k) = (k+1)*(3*k^2+3*k+2)/2.

%F a(3*k+1) = (k+1)*(3*k^2+6*k+4)/2.

%F a(3*k+2) = 3*(k+1)^2*(k+2)/2.

%F G.f.: (1+2*x^3)/((1-x)*(1-x^3))^2. (End)

%p for n from 0 to 50 do

%p out[n]:=0:

%p for x1 from 0 to n do

%p for x2 from 0 to n do

%p for x3 from 0 to n do

%p for x4 from 0 to n do

%p if irem(x2+x3,3)=0 then

%p if x1+x2+x3+x4=n then

%p out[n]:=out[n]+1:

%p end if: end if: end do: end do: end do: end do: end do:

%p for n from 0 to 50 do

%p out[n];

%p end do;

%K nonn,easy

%O 0,2

%A _Jeffrey Kay_, Sep 30 2012