OFFSET
0,10
COMMENTS
Parts are even, odd, even, odd, ... .
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
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
KEYWORD
nonn
AUTHOR
Joerg Arndt, Oct 27 2012
STATUS
approved