OFFSET
1,2
COMMENTS
See A286156.
LINKS
FORMULA
A(n,k) = A286156(k,n).
EXAMPLE
The top left 15 X 15 corner of the array:
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120
2, 1, 4, 3, 7, 6, 11, 10, 16, 15, 22, 21, 29, 28, 37
2, 5, 1, 4, 8, 3, 7, 12, 6, 11, 17, 10, 16, 23, 15
2, 5, 9, 1, 4, 8, 13, 3, 7, 12, 18, 6, 11, 17, 24
2, 5, 9, 14, 1, 4, 8, 13, 19, 3, 7, 12, 18, 25, 6
2, 5, 9, 14, 20, 1, 4, 8, 13, 19, 26, 3, 7, 12, 18
2, 5, 9, 14, 20, 27, 1, 4, 8, 13, 19, 26, 34, 3, 7
2, 5, 9, 14, 20, 27, 35, 1, 4, 8, 13, 19, 26, 34, 43
2, 5, 9, 14, 20, 27, 35, 44, 1, 4, 8, 13, 19, 26, 34
2, 5, 9, 14, 20, 27, 35, 44, 54, 1, 4, 8, 13, 19, 26
2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 1, 4, 8, 13, 19
2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 1, 4, 8, 13
2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 1, 4, 8
2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104, 1, 4
2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104, 119, 1
MATHEMATICA
Map[((#1 + #2)^2 + 3 #1 + #2)/2 & @@ # & /@ Reverse@ # &, Table[Function[m, Reverse@ QuotientRemainder[m, k]][n - k + 1], {n, 14}, {k, n, 1, -1}]] // Flatten (* Michael De Vlieger, May 20 2017 *)
PROG
(Python)
def T(a, b): return ((a + b)**2 + 3*a + b)/2
def A(n, k): return T(n%k, int(n/k))
for n in range(1, 21): print [A(n - k + 1, k) for k in range(1, n + 1)] # Indranil Ghosh, May 20 2017
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, May 04 2017
STATUS
approved