OFFSET
0,4
COMMENTS
a(n) = Sum_{k=0..n} A240009(n,k). - Alois P. Heinz, Mar 30 2014
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
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):
seq(a(n), n=0..80); # Alois P. Heinz, Mar 30 2014
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
Vladeta Jovovic, Aug 19 2007
EXTENSIONS
More terms from Emeric Deutsch, Aug 24 2007
STATUS
approved