A238478 Number of partitions of n whose median is a part.
1, 2, 2, 4, 5, 8, 11, 17, 22, 32, 43, 59, 78, 105, 136, 181, 233, 302, 386, 496, 626, 796, 999, 1255, 1564, 1951, 2412, 2988, 3674, 4516, 5524, 6753, 8211, 9984, 12086, 14617, 17617, 21211, 25450, 30514, 36475, 43550, 51869, 61707, 73230, 86821, 102706
Offset: 1
Examples
a(6) counts these partitions: 6, 411, 33, 321, 3111, 222, 21111, 111111.
Programs
-
Mathematica
Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, Median[p]]], {n, 40}]
Formula
For all n, a(n) >= A027193(n) (because when a partition of n has an odd number of parts, its median is simply the part at the middle). - Antti Karttunen, Feb 27 2014
Comments