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.

A385963 a(n) is the maximum number of distinct positive integers whose sum of squares is equal to n^2.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 3, 1, 4, 5, 5, 5, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 11, 10, 11, 11, 11, 11, 11, 13, 12, 12, 13, 14, 13, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 22, 24, 24, 24, 24, 24, 25
Offset: 0

Views

Author

Gonzalo Martínez, Jul 13 2025

Keywords

Comments

An upper bound is a(n) <= r for the largest r with 1^2 + ... + r^2 <= n^2, and with equality only at n = 0,1,24, the latter being a(70) = 24 (see comments A001032).

Examples

			For n = 11, there are A030273(11) = 4 partitions of 11^2 into distinct squares: {11^2}, {2^2, 6^2, 9^2}, {1^2, 2^2, 4^2, 10^2}, {1^2, 2^2, 4^2, 6^2, 8^2}, where the largest cardinality of these sets is 5. Therefore, a(11) = 5.
		

Crossrefs

Programs

  • PARI
    a(n)=poldegree(polcoef(prod(k=1, n, 1 + y*x^(k^2), 1 + O(x^(n^2+1))), n^2)) \\ Andrew Howroyd, Jul 13 2025

Extensions

More terms from Andrew Howroyd, Jul 13 2025