OFFSET
0,3
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..166
Wikipedia, Palindrome
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 21 2018
STATUS
approved