OFFSET
1,3
LINKS
EXAMPLE
The first ten rows of this triangular array:
1,
1, 3,
1, 4, 6,
1, 4, 3, 10,
1, 4, 8, 7, 15,
1, 4, 8, 3, 6, 21,
1, 4, 8, 13, 7, 11, 28,
1, 4, 8, 13, 3, 12, 10, 36,
1, 4, 8, 13, 19, 7, 6, 16, 45,
1, 4, 8, 13, 19, 3, 12, 11, 15, 55
MATHEMATICA
Map[((#1 + #2)^2 + 3 #1 + #2)/2 & @@ # & /@ Reverse@ # &, Table[Reverse@ QuotientRemainder[n, k], {n, 14}, {k, n}]] // 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) for k in range(1, n + 1)][::-1] # Indranil Ghosh, May 20 2017
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, May 04 2017
STATUS
approved