A331478 Irregular triangle T(n,k) = n - (s - k + 1)^2 for 1 <= k <= s, with s = floor(sqrt(n)).
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
Offset: 1
Examples
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.
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.
Programs
-
Mathematica
Array[# - Reverse@ Range[Sqrt@ #]^2 &, 625] // Flatten
Comments