A286591 Compound filter: a(n) = P(A009191(n), A009194(n)), where P(n,k) is sequence A000027 used as a pairing function.
1, 3, 1, 1, 1, 23, 1, 10, 6, 5, 1, 42, 1, 5, 4, 1, 1, 34, 1, 5, 1, 5, 1, 179, 1, 5, 1, 408, 1, 23, 1, 3, 4, 5, 1, 45, 1, 5, 1, 144, 1, 23, 1, 12, 13, 5, 1, 12, 1, 3, 4, 5, 1, 23, 1, 113, 1, 5, 1, 265, 1, 5, 6, 1, 1, 23, 1, 5, 4, 5, 1, 103, 1, 5, 6, 12, 1, 23, 1, 65, 1, 5, 1, 753, 1, 5, 4, 63, 1, 259, 22, 12, 1, 5, 11, 265, 1, 3, 13, 1, 1, 23, 1, 44, 4, 5, 1
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Pairing Function
Programs
-
PARI
A009191(n) = gcd(n, numdiv(n)); A009194(n) = gcd(n, sigma(n)); A286591(n) = (1/2)*(2 + ((A009191(n)+A009194(n))^2) - A009191(n) - 3*A009194(n));
-
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
-
Scheme
(define (A286591 n) (* (/ 1 2) (+ (expt (+ (A009191 n) (A009194 n)) 2) (- (A009191 n)) (- (* 3 (A009194 n))) 2)))