cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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, 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, 15, 1, 103, 1, 16, 95, 51, 28, 69, 1, 73, 57, 82
Offset: 0

Views

Author

Gus Wiseman, Jul 21 2018

Keywords

Comments

A partition is normal if its parts span an initial interval of positive integers.
a(n) = 1 if and only if n = 0, 1, 2, 4 or a prime > 3. - Chai Wah Wu, Jun 22 2020
From David A. Corneth, Jul 08 2020: (Start)
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.
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)

Examples

			The a(20) = 8 partitions:
  (44432111), (44332211), (43332221),
  (3333221111), (3332222111), (3322222211), (3222222221),
  (11111111111111111111).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And[Union[#]==Range[First[#]],Length/@Split[#]==Reverse[Length/@Split[#]]]&]],{n,30}]
  • Python
    from sympy.utilities.iterables import partitions
    from sympy import integer_nthroot, isprime
    def A317086(n):
        if n > 3 and isprime(n):
            return 1
        else:
            c = 1
            for d in partitions(n,k=integer_nthroot(2*n,2)[0],m=n*2//3):
                l = len(d)
                if l > 0:
                    k = max(d)
                    if l == k:
                        for i in range(k//2):
                            if d[i+1] != d[k-i]:
                                break
                        else:
                            c += 1
            return c # Chai Wah Wu, Jun 22 2020