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”).

a(n) = (122n^3 + 140n^2 + 45n + 3n(-1)^n)/8.
1

%I #18 Sep 08 2022 08:45:57

%S 0,38,204,585,1280,2370,3960,6125,8976,12582,17060,22473,28944,36530,

%T 45360,55485,67040,80070,94716,111017,129120,149058,170984,194925,

%U 221040,249350

%N a(n) = (122n^3 + 140n^2 + 45n + 3n(-1)^n)/8.

%C Let p(n,4) be the number of partitions of n into parts <= 4; then a(n) = p(13n,4) - p(n,4).

%C a(1) = p(13,4) - p(1,4) = 39 - 1 = 38.

%C There are 39 partitions of 13 into parts <= 4:

%C [1,1,1,1,1,1,1,1,1,1,1,1,1]

%C [1,1,1,1,1,1,1,1,1,1,1,2]

%C [1,1,1,1,1,1,1,1,1,1,3], [1,1,1,1,1,1,1,1,1,2,2]

%C [1,1,1,1,1,1,1,1,1,4], [1,1,1,1,1,1,1,1,2,3], [1,1,1,1,1,1,1,2,2,2],

%C [1,1,1,1,1,1,1,2,4], [1,1,1,1,1,1,1,3,3], [1,1,1,1,1,1,2,2,3], [1,1,1,1,1,2,2,2,2]

%C [1,1,1,1,1,1,3,4], [1,1,1,1,1,2,2,4], [1,1,1,1,1,2,3,3], [1,1,1,1,2,2,2,3], [1,1,1,2,2,2,2,2]

%C [1,1,1,1,1,4,4], [1,1,1,1,2,3,4], [1,1,1,1,3,3,3], [1,1,1,2,2,2,4], [1,1,1,2,2,3,3], [1,1,2,2,2,2,3], [1,2,2,2,2,2,2]

%C [1,1,1,2,4,4], [1,1,1,3,3,4], [1,1,2,2,3,4], [1,1,2,3,3,3], [1,2,2,2,2,4], [1,2,2,2,3,3], [2,2,2,3,3,3]

%C [1,1,3,4,4], [1,2,2,4,4], [1,2,3,3,4], [1,3,3,3,3], [2,2,2,3,4], [2,2,3,3,3]

%C [1,4,4,4], [2,3,4,4], [3,3,3,4];

%C and there is 1 partition of 1 into parts < 4:

%C [1].

%H Vincenzo Librandi, <a href="/A191698/b191698.txt">Table of n, a(n) for n = 0..1000</a>

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

%F G.f.: x*(3*x^4+58*x^3+139*x^2+128*x+38)/((x-1)^4*(x+1)^2). - _Robert Israel_, Dec 09 2016

%p seq((122*n^3 + 140*n^2 + 45*n + 3*n*(-1)^n)/8, n=0..30); # _Robert Israel_, Dec 09 2016

%t Table[1/8*(122n^3 + 140n^2 + 45n + 3n(-1)^n), {n, 0, 25}]

%o (Magma) [1/8*(122*n^3 + 140*n^2 + 45*n + 3*n*(-1)^n): n in [0..35]]; // _Vincenzo Librandi_, Jun 12 2011

%o (PARI) a(n)=((122*n+140)*n+45+3*(-1)^n)*n>>3 \\ _Charles R Greathouse IV_, Jun 12 2011

%K nonn,easy

%O 0,2

%A _Adi Dani_, Jun 12 2011

%E Offset changed from 1 to 0 by _Vincenzo Librandi_, Jun 12 2011