OFFSET
1,3
COMMENTS
Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when x=y.
It would be nice to have b-files for this and related sequences (as listed in cross-references). The present sequence is especially interesting. What is its rate of growth?
MAPLE
mygcd:=proc(a, b) local d, s, t; d := igcdex(a, b, `s`, `t`); [a, b, d, s, t]; end;
ansu:=[]; ansv:=[]; ansb:=[];
for N from 1 to 80 do
tu:=0; tv:=0; tb:=0;
for x from 1 to N do
for y from 1 to N do
if igcd(x, y)=1 then
tu:=tu+abs(mygcd(x, y)[4]);
tv:=tv+abs(mygcd(x, y)[5]);
tb:=tb+mygcd(x, y)[4]^2 + mygcd(x, y)[5]^2;
fi;
od: od:
ansu:=[op(ansu), tu];
ansv:=[op(ansv), tv];
ansb:=[op(ansb), tb];
od:
ansu; # the present sequence
ansv; # A345430
ansb; # A345431
PROG
(Python)
from sympy.core.numbers import igcdex
def A345429(n): return sum(abs(u) for u, v, w in (igcdex(x, y) for x in range(1, n+1) for y in range(1, n+1)) if w == 1) # Chai Wah Wu, Jun 22 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 22 2021
STATUS
approved