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 A331478 #11 Feb 16 2025 08:33:59 %S A331478 0,1,2,0,3,1,4,2,5,3,6,4,7,0,5,8,1,6,9,2,7,10,3,8,11,4,9,12,5,10,13,6, %T A331478 11,14,0,7,12,15,1,8,13,16,2,9,14,17,3,10,15,18,4,11,16,19,5,12,17,20, %U A331478 6,13,18,21,7,14,19,22,8,15,20,23,0,9,16,21,24,1 %N A331478 Irregular triangle T(n,k) = n - (s - k + 1)^2 for 1 <= k <= s, with s = floor(sqrt(n)). %C A331478 Row n begins with n - floor(sqrt(n)). %C A331478 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 A331478 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)). %C A331478 We borrow the term "square excess" from A053186(n), which is simply the difference n - floor(sqrt(n)). %C A331478 Row n of this sequence contains distinct Durfee square excesses among all integer partitions of n (see example below). %H A331478 Michael De Vlieger, <a href="/A331478/b331478.txt">Table of n, a(n) for n = 1..10125</a> (rows 1 <= n <= 625, flattened) %H A331478 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DurfeeSquare.html">Durfee Square.</a> %F A331478 Let s = floor(sqrt(n)); %F A331478 T(n,1) = A053186(n) = n - s; %F A331478 T(n,k) = T(n,1) + partial sums of 2(s - k + 1) + 1 for 2 <= k <= s + 1. %F A331478 A000196(n) = Length of row n. %F A331478 A022554(n) = Sum of row n. %F A331478 Last term in row n = T(n, A000196(n)) = n - 1. %e A331478 Table begins: %e A331478 1: 0; %e A331478 2: 1; %e A331478 3: 2; %e A331478 4: 0, 3; %e A331478 5: 1, 4; %e A331478 6: 2, 5; %e A331478 7: 3, 6; %e A331478 8: 4, 7; %e A331478 9: 0, 5, 8; %e A331478 10: 1, 6, 9; %e A331478 11: 2, 7, 10; %e A331478 12: 3, 8, 11; %e A331478 13: 4, 9, 12; %e A331478 14: 5, 10, 13; %e A331478 15: 6, 11, 14; %e A331478 16: 0, 7, 12, 15; %e A331478 ... %e A331478 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. Therefore we have two unique solutions to n - s^2 for n = 4, i.e., {0, 3}, so row 4 contains these values. %t A331478 Array[# - Reverse@ Range[Sqrt@ #]^2 &, 625] // Flatten %Y A331478 Cf. A000196, A022554, A053186, A117522. %K A331478 nonn,easy,tabf %O A331478 1,3 %A A331478 _Michael De Vlieger_, Jan 17 2020