OFFSET
0,7
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
a(p) = 1 for prime p. - Andrew Howroyd, Jan 21 2023
EXAMPLE
The a(30) = 33 partitions:
(30) (11,10,9) (8,7,6,5,4)
(12,10,8) (9,7,6,5,3)
(13,10,7) (9,8,6,4,3)
(14,10,6) (9,8,6,5,2)
(15,10,5) (10,7,6,4,3)
(16,10,4) (10,7,6,5,2)
(17,10,3) (10,8,6,4,2)
(18,10,2) (10,8,6,5,1)
(19,10,1) (10,9,6,3,2)
(10,9,6,4,1)
(11,7,6,4,2)
(11,7,6,5,1)
(11,8,6,3,2)
(11,8,6,4,1)
(11,9,6,3,1)
(12,7,6,3,2)
(12,7,6,4,1)
(12,8,6,3,1)
(12,9,6,2,1)
(13,7,6,3,1)
(13,8,6,2,1)
(14,7,6,2,1)
(11,10,6,2,1)
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&OddQ[Length[#]]&&Mean[#]==Median[#]&]], {n, 0, 30}]
PROG
(PARI) \\ Q(n, k, m) is g.f. for k strict parts of max size m.
Q(n, k, m)={polcoef(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)); if(r>=h*(h+1), polcoef(Q(r, h, m-1)*Q(r, h, r), r)))))} \\ Andrew Howroyd, Jan 21 2023
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 20 2023
STATUS
approved