%I #12 Sep 09 2023 10:35:08
%S 1,7,31,113,374,1178,3618,10974,33087,99481,298729,896551,2690108,
%T 8070884,24213332,72640812,217923405,653771355,1961315395,5883947725,
%U 17651844946,52955536862,158866612886,476599841258,1429799526699
%N a(n) = 3*a(n-1) + C(n+3,3) for n > 0; a(0)=1.
%C Partial sums of A052150.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (7,-18,22,-13,3).
%F G.f.: 1/((1-3*x)*(1-x)^4);
%F a(n) = 3^(n+4)/16 - (4*n^3 + 42*n^2 + 152*n + 195)/48;
%F a(n) = Sum_{k=0..n} binomial(n+4, k+4)*2^k.
%F a(n) = 7*a(n-1) - 18*a(n-2) + 22*a(n-3) - 13*a(n-4) + 3*a(n-5); a(0) = 1, a(1)=7, a(2)=31, a(3)=113, a(4)=374. - _Harvey P. Dale_, Nov 26 2011
%t RecurrenceTable[{a[0]==1,a[n]==3a[n-1]+Binomial[n+3,3]},a,{n,30}] (* or *) LinearRecurrence[{7,-18,22,-13,3},{1,7,31,113,374},31] (* _Harvey P. Dale_, Nov 26 2011 *)
%K easy,nonn
%O 0,2
%A _Paul Barry_, Aug 24 2004