This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A345425 #16 Mar 29 2023 09:18:55 %S A345425 1,3,5,7,9,11,11,15,13,13,15,19,5,15,11,7,11,5,-13,3,-17,-15,-7,9,-49, %T A345425 -49,-51,-79,-61,-37,-61,-33,-105,-129,-113,-141,-183,-141,-157,-181, %U A345425 -189,-169,-275,-175,-199,-229,-217,-249,-389,-429,-413,-381,-419,-425,-453,-397 %N A345425 For 1<=x<=n, 1<=y<=n, with gcd(x,y)=1, write 1 = gcd(x,y) = u*x+v*y with u,v minimal; a(n) = sum of the values of u+v. %C A345425 Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when x=y. %t A345425 T[x_, y_] := T[x, y] = Module[{u, v}, MinimalBy[{u, v} /. Solve[u^2 + v^2 <= x^2 + y^2 && u*x + v*y == 1, {u, v}, Integers], #.# &]]; %t A345425 a[n_] := a[n] = Sum[If[GCD[x, y] == 1, T[x, y][[1]] // Total, 0], {x, 1, n}, {y, 1, n}]; %t A345425 Table[Print[n, " ", a[n]]; a[n], {n, 1, 56}] (* _Jean-François Alcover_, Mar 28 2023 *) %o A345425 (Python) %o A345425 from sympy.core.numbers import igcdex %o A345425 def A345425(n): return sum(u+v 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 24 2021 %Y A345425 Cf. A345415-A345428. %K A345425 sign %O A345425 1,2 %A A345425 _N. J. A. Sloane_, Jun 22 2021