OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Pairing Function
PROG
(PARI)
A009191(n) = gcd(n, numdiv(n));
A009194(n) = gcd(n, sigma(n));
(Scheme) (define (A286591 n) (* (/ 1 2) (+ (expt (+ (A009191 n) (A009194 n)) 2) (- (A009191 n)) (- (* 3 (A009194 n))) 2)))
(Python)
from sympy import divisor_sigma, divisor_count, gcd
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def a(n): return T(gcd(n, divisor_count(n)), gcd(n, divisor_sigma(n))) # Indranil Ghosh, May 22 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 21 2017
STATUS
approved