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.
%I A331553 #5 Feb 16 2025 08:33:59 %S A331553 0,0,1,1,2,2,2,3,3,0,3,3,4,4,1,4,1,4,4,5,5,2,5,2,2,5,2,2,5,5,6,6,3,6, %T A331553 3,3,6,3,3,3,6,3,3,6,6,7,7,4,7,4,4,7,4,4,4,4,7,4,4,4,4,7,4,4,4,7,7,8, %U A331553 8,5,8,5,5,8,5,5,5,5,8,5,5,5,5,5,8,0,5 %N A331553 Irregular triangle T(n,k) = A115722(n,k)^2 - n. %C A331553 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. %C A331553 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. %C A331553 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)). %H A331553 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DurfeeSquare.html">Durfee Square.</a> %F A331553 T(n,k) = A115722(n,k)^2 - n. %F A331553 2 * A116365(n) = sum of row n. %e A331553 Table begins: %e A331553 0: 0; %e A331553 1: 0; %e A331553 2: 1, 1; %e A331553 3: 2, 2, 2; %e A331553 4: 3, 3, 0, 3, 3; %e A331553 5: 4, 4, 1, 4, 1, 4, 4; %e A331553 6: 5, 5, 2, 5, 2, 2, 5, 2, 2, 5, 5; %e A331553 7: 6, 6, 3, 6, 3, 3, 6, 3, 3, 3, 6, 3, 3, 6, 6; %e A331553 ... %e A331553 Table of distinct terms: %e A331553 1: 0; %e A331553 2: 1; %e A331553 3: 2; %e A331553 4: 0, 3; %e A331553 5: 1, 4; %e A331553 6: 2, 5; %e A331553 7: 3, 6; %e A331553 8: 4, 7; %e A331553 9: 0, 5, 8; %e A331553 ... %e A331553 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. %t A331553 {0}~Join~Array[Map[Total@ # - Block[{k = Length@ #}, While[Nand[k > 0, AllTrue[Take[#, k], # >= k &]], k--]; k]^2 &, IntegerPartitions[#]] &, 12] // Flatten %Y A331553 Cf. A115722, A116365. %K A331553 nonn,tabf %O A331553 0,5 %A A331553 _Michael De Vlieger_, Jan 20 2020