OFFSET
0,3
COMMENTS
To construct the partition of n into distinct positive parts that minimizes the sum of squares: let k = A003056(n) and r = n - A000217(k); start with 1, 2, ..., k and increase the largest r parts by 1. Proof: Since x^2 is strictly convex, splitting a part x >= 2 into (x - 1, 1) lowers the sum of squares; thus the global minimum uses the maximal feasible number of parts, namely k = A003056(n). Now fix this k and write a1 < ... < ak with sum n. If a consecutive gap aj - ai (j = i + 1) is >= 3, replace (ai, aj) by (ai + 1, aj - 1); parts stay distinct and the sum of squares drops by (ai + 1)^2 + (aj - 1)^2 - (ai^2 + aj^2) = -2*(aj - ai - 1) < 0. Iterating leaves only gaps 1 or 2. Any 2-gap below a 1-gap can be bubbled upward by successive (x, y) -> (x + 1, y - 1) moves; each step preserves distinctness and strictly decreases the sum of squares, since (x + 1)^2 + (y - 1)^2 - (x^2 + y^2) = -2*(y - x - 1) < 0 for y >= x + 2; thus all 2-gaps end up at the top. Therefore the k-part minimizer is exactly 1, 2, ..., k with the largest r parts increased by 1.
LINKS
Felix Huber, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
MAPLE
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Felix Huber, Apr 10 2026
STATUS
approved
