login
A345433
For 1<=x<=n, 1<=y<=n, write gcd(x,y) = u*x+v*y with u,v minimal; a(n) = sum of the values of |v|.
4
1, 3, 7, 12, 22, 30, 49, 66, 91, 114, 160, 189, 253, 300, 355, 420, 529, 597, 733, 819, 931, 1053, 1252, 1365, 1564, 1737, 1945, 2121, 2437, 2604, 2965, 3222, 3511, 3813, 4147, 4398, 4912, 5292, 5701, 6039, 6670, 7011, 7705, 8160, 8638, 9201, 10030, 10479, 11272, 11856, 12568, 13212, 14266
OFFSET
1,2
COMMENTS
Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when x=y.
PROG
(Python)
from sympy.core.numbers import igcdex
def A345433(n): return sum(abs(v) for u, v, w in (igcdex(x, y) for x in range(1, n+1) for y in range(1, n+1))) # Chai Wah Wu, Jun 22 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 22 2021
STATUS
approved