OFFSET
0,2
COMMENTS
Let p(n,4) be the number of partitions of n into parts <= 4; then a(n) = p(13n,4) - p(n,4).
a(1) = p(13,4) - p(1,4) = 39 - 1 = 38.
There are 39 partitions of 13 into parts <= 4:
[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,1,1,1,1,1,1,1,1,1,1,2]
[1,1,1,1,1,1,1,1,1,1,3], [1,1,1,1,1,1,1,1,1,2,2]
[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],
[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]
[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]
[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]
[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]
[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]
[1,4,4,4], [2,3,4,4], [3,3,3,4];
and there is 1 partition of 1 into parts < 4:
[1].
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
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
MAPLE
seq((122*n^3 + 140*n^2 + 45*n + 3*n*(-1)^n)/8, n=0..30); # Robert Israel, Dec 09 2016
MATHEMATICA
Table[1/8*(122n^3 + 140n^2 + 45n + 3n(-1)^n), {n, 0, 25}]
PROG
(Magma) [1/8*(122*n^3 + 140*n^2 + 45*n + 3*n*(-1)^n): n in [0..35]]; // Vincenzo Librandi, Jun 12 2011
(PARI) a(n)=((122*n+140)*n+45+3*(-1)^n)*n>>3 \\ Charles R Greathouse IV, Jun 12 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Adi Dani, Jun 12 2011
EXTENSIONS
Offset changed from 1 to 0 by Vincenzo Librandi, Jun 12 2011
STATUS
approved