# [seqfan] Re: checking a sequence before submission

Richard Mathar mathar at strw.leidenuniv.nl
Wed Dec 22 19:08:52 CET 2010

```http://list.seqfan.eu/pipermail/seqfan/2010-December/006707.html

dn> From seqfan-bounces at list.seqfan.eu Mon Dec 13 16:59:47 2010
dn> From: David Newman
dn> To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu>
dn> ...
dn>      For a given positive integer, n, let S_n be the set of partitions
dn> of n into distinct parts where the number of parts is maximal for that
dn> n.  For example, for n=6, the set S_6 consists of just one such
dn> partition S_6={1,2,3}.  Similarly, for n=7, S_7={1,2,4}, But for n=8,
dn> S_8 will contain two partitions S_8= { {1,2,5}, {1,3,4} }.
dn>
dn>      Now form the sum 1+ x/(1-x) + x^2/(1-x^2) + x^3/ ( ( 1-x)
dn> (1-x^2)) + x^4/ ( ( 1-x) (1-x^3) ) +  x^5/  ( (1-x) (1-x^4) ) + x^5 (
dn> ( 1-x^2) (1-x^3)) + x^6/ ( ( 1-x) (1-x^2) (1-x^3)) + ...
dn>
dn> whose general term is x^n divided by the product
dn> (1-x^(p_1))...(1-x^(p_i))  where  the p's  come from the partitions in
dn> S_n.
dn>
dn> The sequence is the sequence of coefficients of this sum.
dn>
dn> The numbers that I've gotten are
dn> 1,1,2,2,4,6,7,10,14,20,24,32,40,54,69,86,106,135,165,206,256,311,378,460,555,670,808,970,1156,1380,1638,1938,2296,2706,3188,3752,4390,5136
dn>

I've checked up to the term at n=18, which is 165, and the results agree with those.
Note that the size of the set |S_n| is not A144328 as someone posted earlier
but A140207.

Richard J. Mathar

In Maple:

isDistP := proc(p)
nops(p) = nops(convert(p,set)) ;
end proc:

ListOfMaxDistP := proc(n)
local pi,mxp,nmxp,p,thisp,L ;
L := [] ;
pi := combinat[partition](n) ;
mxp := 0 ;
nmxp := 0 ;
# check all partitions of n
for  p in pi do
# only partitions with distinct parts
if isDistP(p) then
thisp := nops(p) ;
if thisp > mxp then
mxp := thisp;
nmxp := 1 ;
L := [p] ;
elif thisp = mxp then
nmxp := nmxp+1 ;
L := [op(L),p] ;
end if;
end if;
end do :
# size of L is A140207
return L ;
end proc:

A := proc(nmax)
local gf,L,p ;
gf := 1 ;
for n from 1 to nmax do
L := ListOfMaxDistP(n) ;
for p in L do
gf := gf+x^n/mul(1-x^e,e=p) ;
end do:
end do:
gf := expand(gf) ;
L := [] ;
for n from 0 to nmax do
L := [op(L), coeftayl(gf,x=0,n) ] ;
end do:
end proc:

nmax := 18 ;
a := A(nmax) ;
print(a) ;

```