OFFSET
1,2
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10585; the first 145 rows of triangle/antidiagonals of array
Eric Weisstein's World of Mathematics, Pairing Function
FORMULA
EXAMPLE
The first fifteen rows of triangle:
1,
2, 3,
4, 3, 3,
7, 5, 3, 10,
11, 5, 3, 10, 3,
16, 8, 5, 10, 3, 21,
22, 8, 5, 10, 3, 21, 3,
29, 12, 5, 14, 3, 21, 3, 36,
37, 12, 8, 14, 3, 21, 3, 36, 10,
46, 17, 8, 14, 5, 21, 3, 36, 10, 21,
56, 17, 8, 14, 5, 21, 3, 36, 10, 21, 3,
67, 23, 12, 19, 5, 27, 3, 36, 10, 21, 3, 78,
79, 23, 12, 19, 5, 27, 3, 36, 10, 21, 3, 78, 3,
92, 30, 12, 19, 5, 27, 5, 36, 10, 21, 3, 78, 3, 21,
106, 30, 17, 19, 8, 27, 5, 36, 10, 21, 3, 78, 3, 21, 21
PROG
(Scheme)
(define (A286245bi row col) (let ((a (A046523 row)) (b (quotient (+ row col -1) row))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2))))
(Python)
from sympy import factorint
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def P(n):
f = factorint(n)
return sorted([f[i] for i in f])
def a046523(n):
x=1
while True:
if P(n) == P(x): return x
else: x+=1
def t(n, k): return T(a046523(k), int(n/k))
for n in range(1, 21): print [t(n, k) for k in range(1, n + 1)] # Indranil Ghosh, May 09 2017
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, May 06 2017
STATUS
approved