The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A331478 Irregular triangle T(n,k) = n - (s - k + 1)^2 for 1 <= k <= s, with s = floor(sqrt(n)). 1
 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, 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, 6, 13, 18, 21, 7, 14, 19, 22, 8, 15, 20, 23, 0, 9, 16, 21, 24, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Row n begins with n - floor(sqrt(n)). 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)). We borrow the term "square excess" from A053186(n), which is simply the difference n - floor(sqrt(n)). Row n of this sequence contains distinct Durfee square excesses among all integer partitions of n (see example below). LINKS Michael De Vlieger, Table of n, a(n) for n = 1..10125 (rows 1 <= n <= 625, flattened) Eric Weisstein's World of Mathematics, Durfee Square. FORMULA Let s = floor(sqrt(n)); T(n,1) = A053186(n) = n - s; T(n,k) = T(n,1) + partial sums of 2(s - k + 1) + 1 for 2 <= k <= s + 1. A000196(n) = Length of row n. A022554(n) = Sum of row n. Last term in row n = T(n, A000196(n)) = n - 1. EXAMPLE Table begins:    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;   10:  1,  6,  9;   11:  2,  7, 10;   12:  3,  8, 11;   13:  4,  9, 12;   14:  5, 10, 13;   15:  6, 11, 14;   16:  0,  7, 12, 15;   ... 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. MATHEMATICA Array[# - Reverse@ Range[Sqrt@ #]^2 &, 625] // Flatten CROSSREFS Cf. A000196, A022554, A053186, A117522. Sequence in context: A025636 A025637 A195826 * A097065 A084964 A267182 Adjacent sequences:  A331475 A331476 A331477 * A331479 A331480 A331481 KEYWORD nonn,easy,tabf AUTHOR Michael De Vlieger, Jan 17 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 10 22:36 EDT 2022. Contains 356046 sequences. (Running on oeis4.)