OFFSET
0,4
COMMENTS
The length and median of such a partition are integers with product n.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
a(p) = 2 for prime p. - Andrew Howroyd, Jan 21 2023
EXAMPLE
The a(1) = 1 through a(9) = 5 partitions:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(111) (11111) (222) (1111111) (333)
(321) (432)
(531)
(111111111)
The a(15) = 18 partitions:
(15)
(5,5,5)
(6,5,4)
(7,5,3)
(8,5,2)
(9,5,1)
(3,3,3,3,3)
(4,3,3,3,2)
(4,4,3,2,2)
(4,4,3,3,1)
(5,3,3,2,2)
(5,3,3,3,1)
(5,4,3,2,1)
(5,5,3,1,1)
(6,3,3,2,1)
(6,4,3,1,1)
(7,3,3,1,1)
(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], OddQ[Length[#]]&&Mean[#]==Median[#]&]], {n, 0, 30}]
PROG
(PARI) \\ P(n, k, m) is g.f. for k parts of max size m.
P(n, k, m)={polcoef(1/prod(i=1, m, 1 - y*x^i + O(x*x^n)), k, y)}
a(n)={if(n==0, 0, sumdiv(n, d, if(d%2, my(m=n/d, h=d\2, r=n-m*(h+1)+h); polcoef(P(r, h, m)*P(r, h, r), r))))} \\ Andrew Howroyd, Jan 21 2023
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 20 2023
STATUS
approved