The OEIS is supported by the many generous donors to the OEIS Foundation.

For 1<=x<=n, 1<=y<=n, write gcd(x,y) = u*x+v*y with u,v minimal; a(n) = n^4*s, where s is the population variance of the values of u^2+v^2.

8

`%I #9 Jun 25 2021 01:53:19
`

`%S 0,0,14,48,1266,1988,21514,49392,171032,242964,882708,1487996,3650020,
`

`%T 4913620,9374594,14382448,29859148,38410016,71427550,97525500,
`

`%U 147544988,186821472,320133640,399015644,605818854,740618592,1061345430,1349418108,2017326672,2390222900
`

`%N For 1<=x<=n, 1<=y<=n, write gcd(x,y) = u*x+v*y with u,v minimal; a(n) = n^4*s, where s is the population variance of the values of u^2+v^2.
`

`%C The factor n^4 is to ensure that a(n) is an integer.
`

`%C A345434(n) = n^2*mu where mu is the mean of the values of u^2+v^2.
`

`%C s^(1/4) appears to grow linearly with n.
`

`%o (Python)
`

`%o from statistics import pvariance
`

`%o from sympy.core.numbers import igcdex
`

`%o def A345691(n): return pvariance(n**2*(u**2+v**2) for u, v, w in (igcdex(x,y) for x in range(1,n+1) for y in range(1,n+1)))
`

`%Y Cf. A345434, A345687, A345688, A345689, A345690.
`

`%K nonn
`

`%O 1,3
`

`%A _Chai Wah Wu_, Jun 24 2021
`