A345692 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 u and m is the number of such values.
0, 2, 24, 68, 364, 504, 2040, 3606, 7664, 10422, 25764, 34226, 70836, 89994, 128532, 177276, 316844, 375952, 623024, 757604, 986742, 1188760, 1828860, 2093672, 2885342, 3379568, 4347890, 5089220, 7134860, 7835684, 10700654, 12422758, 14837078, 16812466, 20404320
Offset: 1
Keywords
Programs
-
Python
from statistics import pvariance from sympy.core.numbers import igcdex def A345692(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)*u for u, v, w in zlist)
Comments