login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
3
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,2
COMMENTS
The factor m^2 is to ensure that a(n) is an integer.
A345430(n) = m*mu where mu is the mean of the values of |v|.
The population standard deviation sqrt(s) appears to grow linearly with n.
PROG
(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)
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Jun 24 2021
STATUS
approved