|
|
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.
|
|
6
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The factor m^2 is to ensure that a(n) is an integer.
A345423(n) = m*mu where mu is the mean of the values of u.
The population standard deviation sqrt(s) appears to grow linearly with n.
|
|
LINKS
|
|
|
PROG
|
(Python)
from statistics import pvariance
from sympy.core.numbers import igcdex
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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|