login
A218355
Number of partitions into distinct parts where all differences between consecutive parts are odd and the minimal part is even.
3
1, 0, 1, 0, 1, 1, 1, 1, 1, 3, 1, 3, 1, 5, 2, 6, 2, 8, 3, 9, 5, 12, 7, 13, 9, 16, 13, 19, 17, 22, 23, 25, 29, 30, 37, 35, 46, 41, 58, 49, 70, 57, 85, 68, 103, 81, 123, 97, 145, 115, 172, 139, 201, 164, 236, 197, 274, 234, 318, 280, 368, 330, 425, 394, 488, 463, 561, 548, 644, 642, 738, 755, 844, 879, 965, 1029
OFFSET
0,10
COMMENTS
Parts are even, odd, even, odd, ... .
LINKS
FORMULA
G.f.: sum(n>=0, x^((n+1)*(n+4)/2) / prod(k=1..n+1, 1-x^(2*k) ) ).
a(n) = A179080(n) - A179049(n).
EXAMPLE
The a(23) = 13 such partitions of 23 are:
[ 1] 2 3 18
[ 2] 2 5 16
[ 3] 2 7 14
[ 4] 2 9 12
[ 5] 2 21
[ 6] 4 5 14
[ 7] 4 7 12
[ 8] 4 9 10
[ 9] 4 19
[10] 6 7 10
[11] 6 17
[12] 8 15
[13] 10 13
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1,
`if`(i>n, 0, b(n, i+2)+b(n-i, i+1)))
end:
a:= n-> b(n, 2):
seq(a(n), n=0..100); # Alois P. Heinz, Nov 08 2012; revised Feb 24 2020
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n==0, 1-Mod[t, 2], If[i<1, 0, b[n, i-1, t] + If[i <= n && Mod[i, 2] != t, b[n-i, i-1, Mod[i, 2]], 0]]]; a[n_] := If[n==0, 1, Sum[ b[n-i, i-1, Mod[i, 2]], {i, 1, n}]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jul 02 2015, after Alois P. Heinz *)
PROG
(PARI)
N=76; x='x+O('x^N);
gf179080 = sum(n=0, N, x^(n*(n+1)/2) / prod(k=1, n+1, 1-x^(2*k) ) );
gf179049 = sum(n=0, N, x^(n*(n+1)/2) / prod(k=1, n, 1-x^(2*k) ) );
gf = gf179080 - gf179049;
Vec( gf )
(PARI) N=75; x='x+O('x^N); gf = sum(n=0, N, x^((n+1)*(n+4)/2) / prod(k=1, n+1, 1-x^(2*k) ) ); v2=Vec( gf )
(Sage) # After Alois P. Heinz.
def A218355(n):
@cached_function
def h(n, k):
if n == 0: return 1
if k > n: return 0
return h(n, k+2) + h(n-k, k+1)
return h(n, 2)
print([A218355(n) for n in range(76)]) # Peter Luschny, Feb 25 2020
CROSSREFS
Cf. A179049 (parts are odd, even, odd, even, ...).
Sequence in context: A355001 A337713 A309425 * A103790 A249947 A193583
KEYWORD
nonn
AUTHOR
Joerg Arndt, Oct 27 2012
STATUS
approved