cp's OEIS Frontend

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.

A345431 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^2+v^2.

This page as a plain text file.
%I A345431 #10 Jun 25 2021 00:31:56
%S A345431 1,3,9,15,41,47,119,171,281,333,623,755,1233,1419,1799,2231,3319,3705,
%T A345431 5215,5943,7075,7953,10665,11665,14467,15983,18949,21081,26479,28239,
%U A345431 34803,38403,43203,46779,53215,56555,67885,73115,81015,86711,101891,106999,124753,133461,144273
%N A345431 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^2+v^2.
%C A345431 Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when x=y.
%o A345431 (Python)
%o A345431 from sympy.core.numbers import igcdex
%o A345431 def A345431(n): return sum(u**2+v**2 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
%Y A345431 Cf. A345415-A345434.
%K A345431 nonn
%O A345431 1,2
%A A345431 _N. J. A. Sloane_, Jun 22 2021