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.

A370512 Largest palindromic square which is a concatenation of partitions of n; or 0 if no such number exists.

Original entry on oeis.org

1, 0, 0, 121, 0, 0, 0, 0, 12321, 0, 0, 0, 121, 0, 0, 121242121, 0, 12321, 5221225, 0, 0, 121, 0, 0, 1212225222121, 0, 12321, 5221225, 0, 0, 10201, 0, 0, 1212225222121, 0, 12122232623222121
Offset: 1

Views

Author

Chai Wah Wu, Feb 20 2024

Keywords

Examples

			Note that a(4) = a(13) = a(22) = 121 as the digits of 121 can be partitioned as 1+2+1 or 12+1 or 1+21.
		

Crossrefs

Programs

  • Python
    from collections import Counter
    from operator import itemgetter
    from sympy.ntheory.primetest import is_square
    from sympy.utilities.iterables import partitions, multiset_permutations
    def A370512(n):
        smax, m = 0, 0
        for s, p in sorted(partitions(n,size=True),key=itemgetter(0),reverse=True):
            if s0:
                    smax=s
        return m

Formula

a(n) <= A079842(n).
If n is a palindromic square, then a(n) >= n.