login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A317086 Number of normal integer partitions of n whose sequence of multiplicities is a palindrome. 15

%I #30 Feb 16 2022 11:56:52

%S 1,1,1,2,1,1,3,1,2,2,4,1,4,1,4,5,4,1,7,1,8,6,6,1,10,5,7,8,11,1,20,1,9,

%T 12,9,13,25,1,10,17,21,1,37,1,21,36,12,1,44,16,23,30,33,1,53,17,55,38,

%U 15,1,103,1,16,95,51,28,69,1,73,57,82

%N Number of normal integer partitions of n whose sequence of multiplicities is a palindrome.

%C A partition is normal if its parts span an initial interval of positive integers.

%C a(n) = 1 if and only if n = 0, 1, 2, 4 or a prime > 3. - _Chai Wah Wu_, Jun 22 2020

%C From _David A. Corneth_, Jul 08 2020: (Start)

%C Let [f_1, f_2, ,..., f_i, ..., f_m] be the multiplicities of parts i in a partition of Sum_{i=1..m} (f_i * i). Then, as the sequence of multiplicities is a palindrome, we have f_1 = f_m, ..., f_i = f_(m+1-i). So the sum is f_1 * (1 + m) + f_2 * (2 + m-1) + ... + f_(floor(m/2)) * m/2 (the last term depending on the parity of m.). This way it becomes a list of Diophantine equations for which we look for the number of solutions.

%C For example, for m = 4 we look for solutions to the Diophantine equation 5 * (c + d) = n where c, d are positive integers >= 1. A similar technique is used in A254524. (End)

%H David A. Corneth, <a href="/A317086/b317086.txt">Table of n, a(n) for n = 0..9999</a> (first 215 terms from Chai Wah Wu)

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Palindrome">Palindrome</a>

%e The a(20) = 8 partitions:

%e (44432111), (44332211), (43332221),

%e (3333221111), (3332222111), (3322222211), (3222222221),

%e (11111111111111111111).

%t Table[Length[Select[IntegerPartitions[n],And[Union[#]==Range[First[#]],Length/@Split[#]==Reverse[Length/@Split[#]]]&]],{n,30}]

%o (Python)

%o from sympy.utilities.iterables import partitions

%o from sympy import integer_nthroot, isprime

%o def A317086(n):

%o if n > 3 and isprime(n):

%o return 1

%o else:

%o c = 1

%o for d in partitions(n,k=integer_nthroot(2*n,2)[0],m=n*2//3):

%o l = len(d)

%o if l > 0:

%o k = max(d)

%o if l == k:

%o for i in range(k//2):

%o if d[i+1] != d[k-i]:

%o break

%o else:

%o c += 1

%o return c # _Chai Wah Wu_, Jun 22 2020

%Y Cf. A000009, A000041, A000837, A025065, A055932, A242414, A254524, A317085, A317087.

%K nonn,nice

%O 0,4

%A _Gus Wiseman_, Jul 21 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 16:53 EDT 2024. Contains 372197 sequences. (Running on oeis4.)