login
A317085
Number of integer partitions of n whose sequence of multiplicities is a palindrome.
12
1, 1, 2, 3, 4, 4, 8, 6, 11, 12, 18, 16, 31, 25, 40, 47, 60, 58, 92, 85, 125, 135, 165, 173, 248, 246, 310, 351, 435, 450, 602, 608, 766, 846, 997, 1098, 1382, 1421, 1713, 1912, 2272, 2413, 2958, 3118, 3732, 4135, 4718, 5127, 6170, 6550, 7638, 8396, 9667, 10433
OFFSET
0,3
LINKS
EXAMPLE
The a(10) = 18 partitions:
(ten),
(91), (82), (73), (64), (55),
(721), (631), (541), (532),
(5221), (4411), (4321), (3322),
(33211), (32221), (22222),
(1111111111).
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], Length/@Split[#]==Reverse[Length/@Split[#]]&]], {n, 30}]
PROG
(Python)
from sympy.utilities.iterables import partitions
def A317085(n):
c = 1
for d in partitions(n, m=n*2//3):
l = len(d)
if l > 0:
k = sorted(d.keys())
for i in range(l//2):
if d[k[i]] != d[k[l-i-1]]:
break
else:
c += 1
return c # Chai Wah Wu, Jun 22 2020
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 21 2018
STATUS
approved