OFFSET
0,5
COMMENTS
Let P be an integer partition of n, and let D be the Durfee square of P with side length s, thus area s^2. We borrow the term "square excess" from A053186(n), which is simply the difference n - floor(sqrt(n)). This sequence lists the "Durfee square excess" of P = n - s^2 for all partitions P of n in reverse lexicographic order.
Zero appears in row n for n that are perfect squares. Let r = sqrt(n). For perfect square n, there exists a partition of n that consists of a run of r parts that are each r themselves; e.g., for n = 4, we have {2, 2}, for n = 9, we have {3, 3, 3}. It is clear through the Ferrers diagram of these partitions that they are equivalent to their Durfee square, thus n - s^2 = 0.
Since the partitions of any n contain Durfee squares in the range of 1 <= s <= floor(sqrt(n)) (with perfect square n also including k = 0), the distinct Durfee square excesses must be the differences n - s^2 for 1 <= s <= floor(sqrt(n)).
LINKS
Eric Weisstein's World of Mathematics, Durfee Square.
EXAMPLE
Table begins:
0: 0;
1: 0;
2: 1, 1;
3: 2, 2, 2;
4: 3, 3, 0, 3, 3;
5: 4, 4, 1, 4, 1, 4, 4;
6: 5, 5, 2, 5, 2, 2, 5, 2, 2, 5, 5;
7: 6, 6, 3, 6, 3, 3, 6, 3, 3, 3, 6, 3, 3, 6, 6;
...
Table of distinct terms:
1: 0;
2: 1;
3: 2;
4: 0, 3;
5: 1, 4;
6: 2, 5;
7: 3, 6;
8: 4, 7;
9: 0, 5, 8;
...
For n = 4, the partitions are {4}, {3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}. The partition {2, 2} has Durfee square s = 2; for all partitions except {2, 2}, we have Durfee square with s = 1.
MATHEMATICA
{0}~Join~Array[Map[Total@ # - Block[{k = Length@ #}, While[Nand[k > 0, AllTrue[Take[#, k], # >= k &]], k--]; k]^2 &, IntegerPartitions[#]] &, 12] // Flatten
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Michael De Vlieger, Jan 20 2020
STATUS
approved