A345693 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) = m^2*s, where s is the population variance of the values of v and m is the number of such values.
0, 2, 26, 72, 374, 516, 2064, 3634, 7706, 10472, 25832, 34298, 70946, 90106, 128664, 177428, 317024, 376150, 623276, 757856, 987038, 1189074, 1829210, 2094022, 2885790, 3380040, 4348400, 5089782, 7135460, 7836276, 10701330, 12423438, 14837870, 16813314, 20405200
Offset: 1
Keywords
Programs
-
Python
from statistics import pvariance from sympy.core.numbers import igcdex def A345693(n): zlist = [z for z in (igcdex(x,y) for x in range(1,n+1) for y in range(1,n+1)) if z[2] == 1] return pvariance(len(zlist)*v for u, v, w in zlist)
Comments