cp's OEIS Frontend

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.

A331553 Irregular triangle T(n,k) = A115722(n,k)^2 - n.

Original entry on oeis.org

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, 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, 8, 5, 8, 5, 5, 8, 5, 5, 5, 5, 8, 5, 5, 5, 5, 5, 8, 0, 5
Offset: 0

Views

Author

Michael De Vlieger, Jan 20 2020

Keywords

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)).

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    {0}~Join~Array[Map[Total@ # - Block[{k = Length@ #}, While[Nand[k > 0, AllTrue[Take[#, k], # >= k &]], k--]; k]^2 &, IntegerPartitions[#]] &, 12] // Flatten

Formula

T(n,k) = A115722(n,k)^2 - n.
2 * A116365(n) = sum of row n.