OFFSET
0,3
COMMENTS
Old name was: A generalized partition function.
REFERENCES
Gupta, Hansraj; A generalization of the partition function. Proc. Nat. Inst. Sci. India 17, (1951). 231-238.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
H. Gupta, A generalization of the partition function, Proc. Nat. Inst. Sci. India 17, (1951). 231-238. [Annotated scanned copy]
Index entries for linear recurrences with constant coefficients, signature (1, 2, 1, -4, -5, 3, 6, 3, -5, -4, 1, 2, 1, -1).
FORMULA
G.f.: 1/((1-x)*(1-x^2)^2*(1-x^3)^3). - Henry Bottomley, Sep 17 2001
Euler transform of [1, 2, 3, 0, 0, 0, 0, 0, ...]. - Thomas Wieder, Mar 13 2005
a(n)=floor((160*(n+1)*(-1)^(floor(n/3+2/3)+n)+80*(n^2+15*n+24)*(-1)^(floor(n/3+1/3)+n)+80*(n+2)*(n+11)*(-1)^(floor(n/3)+n)+405*(n+1)*(-1)^n+(n+1)*(2*n^4+68*n^3+852*n^2+4748*n+10735))/25920+1/2). - Tani Akinari, Oct 12 2012
MAPLE
a:= proc(n) option remember;
`if`(n=0, 1, add(add(d *`if`(d<4, d, 0),
d=numtheory[divisors](j)) *a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..50); # Alois P. Heinz, Apr 21 2012
MATHEMATICA
a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*If[d<4, d, 0], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Mar 13 2014, after Alois P. Heinz *)
PROG
(PARI) a(n)=round((n\3+1)*((n\3+4)*[1, -1, 0][1+n%3]/18-(n%3>1)/27)+(n+1)*(2*n^4+68*n^3+852*n^2+4748*n+10735+405*(-1)^n)/25920) \\ Tani Akinari, May 29 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Henry Bottomley, Sep 17 2001
Better name from Joerg Arndt, Oct 12 2012
STATUS
approved