A345695 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, 10, 24, 110, 152, 656, 1198, 2714, 3632, 9512, 13082, 27274, 34474, 51416, 71168, 128704, 152430, 253648, 311636, 412538, 495234, 766258, 877438, 1217102, 1420616, 1843136, 2170622, 3039784, 3342200, 4551830, 5284110, 6360830, 7182594, 8780236, 9608714
Offset: 1
Keywords
Programs
-
Python
from statistics import pvariance from sympy.core.numbers import igcdex def A345695(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)*abs(v) for u, v, w in zlist)
Comments