OFFSET
0,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: 1 + Sum_{k>=1} x^k*(2 - x^k)/((1 - x^k)^(k+1) * Product_{j=1..k-1} (1-x^j)). - Andrew Howroyd, Mar 11 2023
EXAMPLE
The a(0) = 1 through a(4) = 16 multisets:
{} {1} {2} {3} {4}
{1,1} {1,2} {1,3} {1,4}
{2,2} {2,3} {2,4}
{1,1,1} {3,3} {3,4}
{1,1,1,1} {1,1,2} {4,4}
{1,1,1,2} {1,1,3}
{1,1,1,1,1} {1,2,2}
{1,1,1,1,1,1} {2,2,2}
{1,1,1,3}
{1,1,2,2}
{1,2,2,2}
{2,2,2,2}
{1,1,1,1,2}
{1,1,1,1,1,2}
{1,1,1,1,1,1,1}
{1,1,1,1,1,1,1,1}
For example, the multiset y = {1,1,1,1,2} has right half (inclusive) {1,1,2}, with sum 4, so y is counted under a(4).
MATHEMATICA
Table[Length[Select[Join@@IntegerPartitions/@Range[0, 3*k], Total[Take[#, Ceiling[Length[#]/2]]]==k&]], {k, 0, 15}]
PROG
(PARI) seq(n)={my(s=1 + O(x*x^n), p=s); for(k=1, n, s += p*x^k*(2-x^k)/(1-x^k + O(x*x^(n-k)))^(k+1); p /= 1 - x^k); Vec(s)} \\ Andrew Howroyd, Mar 11 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 09 2023
EXTENSIONS
Terms a(24) and beyond from Andrew Howroyd, Mar 11 2023
STATUS
approved