|
|
A096374
|
|
Number of partitions of n such that the least part occurs with even multiplicity.
|
|
3
|
|
|
0, 1, 0, 3, 1, 5, 4, 11, 8, 19, 19, 35, 36, 59, 65, 104, 115, 168, 196, 276, 321, 440, 521, 694, 821, 1072, 1277, 1644, 1957, 2477, 2959, 3705, 4411, 5472, 6516, 8014, 9524, 11620, 13789, 16724, 19798, 23860, 28202, 33815, 39864, 47579, 55979, 66520, 78080
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Also number of partitions of n such that the difference between the two largest distinct parts is even (it is assumed that 0 is a part in each partition). Example: a(6)=5 because we have [6],[5,1],[4,2],[2,2,2] and [3,1,1,1]. - Emeric Deutsch, Apr 04 2006
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{m>=1} ((x^(2*m)/(1+x^m))/Product_{i>=m}(1-x^i)).
|
|
EXAMPLE
|
a(6) = 5 because we have [4,1,1], [3,3], [2,2,1,1], [2,1,1,1,1] and [1,1,1,1,1,1].
|
|
MAPLE
|
g:=sum(x^(2*k)/(1+x^k)/product(1-x^j, j=k..70), k=1..50): gser:=series(g, x=0, 50): seq(coeff(gser, x, n), n=1..48); # Emeric Deutsch, Apr 04 2006
# second Maple program:
b:= proc(n, i) option remember; `if`(n=0 or i<1, 0, `if`(irem(n, i, 'r')=0
and irem(r, 2)=0, 1, 0)+ add(b(n-i*j, i-1), j=0..n/i))
end:
a:= n-> b(n, n):
|
|
MATHEMATICA
|
f[n_] := Block[{p = IntegerPartitions[n], l = PartitionsP[n], c = 0, k = 1}, While[k < l + 1, If[ EvenQ[ Count[ p[[k]], p[[k]][[ -1]] ]], c++ ]; k++ ]; c]; Table[ f[n], {n, 50}] (* Robert G. Wilson v, Jul 23 2004 *)
b[n_, i_] := b[n, i] = If[n == 0 || i < 1, 0, {q, r} = QuotientRemainder[n, i]; If[r == 0 && Mod[q, 2] == 0, 1, 0] + Sum[b[n - i*j, i-1], {j, 0, n/i}]] ; a[n_] := b[n, n]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jan 24 2014, after Alois P. Heinz *)
Table[Count[IntegerPartitions[n], _?(EvenQ[Length[Split[#][[-1]]]]&)], {n, 50}] (* Harvey P. Dale, Jun 02 2019 *)
|
|
PROG
|
(PARI) {q=sum(m=1, 100, (x^(2*m)/(1+x^m))/prod(i=m, 100, 1-x^i, 1+O(x^60)), 1+O(x^60)); for(n=1, 48, print1(polcoeff(q, n), ", "))} \\ Klaus Brockhaus, Jul 21 2004
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|