login
A189357
Number of partitions of n into distinct parts where all differences between consecutive parts are even.
3
1, 1, 1, 1, 2, 1, 3, 1, 4, 2, 5, 2, 7, 3, 8, 4, 11, 5, 13, 6, 17, 8, 20, 9, 26, 12, 30, 14, 38, 17, 45, 20, 55, 25, 64, 29, 79, 35, 91, 41, 110, 49, 128, 57, 152, 68, 176, 78, 209, 93, 240, 107, 282, 125, 325, 144, 379, 168, 434, 192, 505, 223, 576, 255, 666, 294, 760, 335, 873, 385, 993, 437, 1139
OFFSET
0,5
COMMENTS
Also number of partitions into distinct parts where either all parts are even or all parts are odd.
Also number of symmetric unimodal compositions of n where the maximal part m appears at least m times, see example. [Joerg Arndt, Jun 11 2013]
LINKS
FORMULA
a(n) = A000009(2*n) + A000700(n) for n>=1, a(0)=1.
G.f.: -1 + prod(n>=1, 1+x^(2*n) ) + prod(n>=1, 1+x^(2*n-1) ).
G.f.: -1 + sum(n>=0, x^(n^2)*(1+x^n) / prod(k=1..n, 1-x^(2*k)) ). [Joerg Arndt, Jan 27 2011]
EXAMPLE
a(14)=8 because there are 8 such partitions of 14: 1+13 =2+4+8 =2+12 =3+11 =4+10 =5+9 =6+8 =14
G.f.: A(x) = 1 + x + x^2 + x^3 + 2*x^4 + x^5 + 3*x^6 + x^7 + 4*x^8 + 2*x^9 +...
From Joerg Arndt, Jun 11 2013: (Start)
There are a(18)=13 symmetric unimodal compositions of 18 where the maximal part m appears at least m times:
01: [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]
02: [ 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 ]
03: [ 1 1 1 1 1 1 2 2 2 1 1 1 1 1 1 ]
04: [ 1 1 1 1 1 2 2 2 2 1 1 1 1 1 ]
05: [ 1 1 1 1 2 2 2 2 2 1 1 1 1 ]
06: [ 1 1 1 2 2 2 2 2 2 1 1 1 ]
07: [ 1 1 1 3 3 3 3 1 1 1 ]
08: [ 1 1 2 2 2 2 2 2 2 1 1 ]
09: [ 1 2 2 2 2 2 2 2 2 1 ]
10: [ 1 2 3 3 3 3 2 1 ]
11: [ 1 4 4 4 4 1 ]
12: [ 2 2 2 2 2 2 2 2 2 ]
13: [ 3 3 3 3 3 3 ]
(End)
PROG
(Sage)
def A189357(n):
works = lambda part: all(x % 2 == 0 for x in differences(part))
def count(pred, iter): return sum(1 for item in iter if pred(item))
return count(works, Partitions(n, max_slope=-1))
print([A189357(n) for n in range(0, 30)])
# D. S. McNeil, Apr 21 2011 (updated to Python3 by Peter Luschny, Mar 06 2020 )
(PARI) {a(n)=polcoeff(-1 + prod(m=1, n\1, 1+x^(2*m))+prod(m=1, n\2+1, 1+x^(2*m-1))+x*O(x^n), n)} /* Paul D. Hanna */
(PARI) {a(n)=polcoeff(-1 + sum(m=0, sqrtint(n+1), x^(m^2)*(1+x^m)/prod(k=1, m, 1-x^(2*k)+x*O(x^n))), n)} /* Paul D. Hanna */
CROSSREFS
Cf. A000009 (partitions of 2*n with even differences and even minimal part), A179080 (odd differences), A179049 (odd differences and odd minimal part).
Sequence in context: A323523 A371092 A124072 * A100053 A029194 A246582
KEYWORD
nonn
AUTHOR
Joerg Arndt, Apr 20 2011
STATUS
approved