OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2000
FORMULA
G.f.: g(x) = x*(1-x+3*x^2+3*x^4-x^5+x^6)/((1-x^4)^2*Product_{j>=1} 1-x^j).
a(n) = Sum_{k>=0} k*A276422(n,k).
EXAMPLE
a(4) = 4 because in the partitions [1,1,1,1], [1,1,2], [2,2], [1,3], [4] the sums of the odd singletons are 0,0,0,4,0, respectively; their sum is 4.
a(5) = 13 because in the partitions [1,1,1,1,1], [1,1,1,2], [1,2,2], [1,1,3], [2,3], [1,4], [5] the sums of the odd singletons are 0,0,1,3,3,1,5, respectively; their sum is 13.
MAPLE
g := x*(1-x+3*x^2+3*x^4-x^5+x^6)/((1-x^4)^2*(product(1-x^i, i = 1..120))): gser := series(g, x = 0, 60); seq(coeff(gser, x, n), n = 0..50);
# second Maple program:
b:= proc(n, i) option remember; `if`(n=0, [1, 0],
`if`(i<1, 0, add((p-> p+`if`(i::odd and j=1,
[0, i*p[1]], 0))(b(n-i*j, i-1)), j=0..n/i)))
end:
a:= n-> b(n$2)[2]:
seq(a(n), n=0..50); # Alois P. Heinz, Sep 14 2016
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, {1, 0}, If[i < 1, 0, Sum[Function[p, p + If[OddQ[i] && j == 1, {0, If[p === 0, 0, i*p[[1]]]}, 0]][b[n-i*j, i-1]], {j, 0, n/i}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 04 2016 after Alois P. Heinz *)
Table[Total[Select[Flatten[Tally/@IntegerPartitions[n], 1], #[[2]]==1 && OddQ[ #[[1]]]&][[All, 1]]], {n, 0, 50}] (* Harvey P. Dale, May 25 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Sep 14 2016
STATUS
approved