OFFSET
1,2
COMMENTS
LINKS
MathWorld, Pairing Function
FORMULA
EXAMPLE
The first fifteen rows of the triangle:
1,
2, 1,
4, 1, 3,
7, 2, 3, 3,
11, 2, 3, 3, 10,
16, 4, 5, 3, 10, 3,
22, 4, 5, 3, 10, 3, 21,
29, 7, 5, 5, 10, 3, 21, 10,
37, 7, 8, 5, 10, 3, 21, 10, 21,
46, 11, 8, 5, 14, 3, 21, 10, 21, 10,
56, 11, 8, 5, 14, 3, 21, 10, 21, 10, 55,
67, 16, 12, 8, 14, 5, 21, 10, 21, 10, 55, 10,
79, 16, 12, 8, 14, 5, 21, 10, 21, 10, 55, 10, 78,
92, 22, 12, 8, 14, 5, 27, 10, 21, 10, 55, 10, 78, 21,
106, 22, 17, 8, 19, 5, 27, 10, 21, 10, 55, 10, 78, 21, 36
MATHEMATICA
Map[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ # & /@ # &, Table[{EulerPhi@ k, Floor[n/k]}, {n, 14}, {k, n}]] // Flatten (* Michael De Vlieger, May 06 2017 *)
PROG
(Scheme)
(define (A286235bi row col) (let ((a (A000010 row)) (b (quotient (+ row col -1) row))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2))))
(Python)
from sympy import totient
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def t(n, k): return T(totient(k), int(n/k))
for n in range(1, 21): print [t(n, k) for k in range(1, n + 1)] # Indranil Ghosh, May 11 2017
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, May 05 2017
STATUS
approved