|
|
A130780
|
|
Number of partitions of n such that number of odd parts is greater than or equal to number of even parts.
|
|
39
|
|
|
1, 1, 1, 3, 3, 6, 8, 12, 16, 23, 32, 42, 58, 75, 102, 131, 173, 220, 288, 363, 466, 587, 743, 929, 1164, 1448, 1797, 2224, 2738, 3368, 4122, 5042, 6133, 7466, 9035, 10941, 13184, 15888, 19064, 22876, 27343
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{k>=0} x^k/Product_{i=1..k} (1-x^(2*i))^2.
|
|
EXAMPLE
|
a(5)=6 because we have 5,41,32,311,211 and 11111 (221 does not qualify).
|
|
MAPLE
|
g:=sum(x^k/(product((1-x^(2*i))^2, i=1..k)), k=0..50): gser:=series(g, x=0, 50): seq(coeff(gser, x, n), n=1..40); # Emeric Deutsch, Aug 24 2007
# second Maple program:
b:= proc(n, i, t) option remember; `if`(n=0,
`if`(t>=0, 1, 0), `if`(i<1, 0, b(n, i-1, t)+
`if`(i>n, 0, b(n-i, i, t+(2*irem(i, 2)-1)))))
end:
a:= n-> b(n$2, 0):
|
|
MATHEMATICA
|
$RecursionLimit = 1000; b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t >= 0, 1, 0], If[i<1, 0, b[n, i-1, t] + If[i>n, 0, b[n-i, i, t + (2*Mod[i, 2]-1)]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, May 12 2015, after Alois P. Heinz *)
opgQ[n_]:=Module[{len=Length[n], op}, op=Length[Select[n, OddQ]]; op>= len-op]; Table[Count[IntegerPartitions[n], _?(opgQ)], {n, 0, 50}] (* Harvey P. Dale, Dec 12 2021 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|