A345691 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.
0, 0, 14, 48, 1266, 1988, 21514, 49392, 171032, 242964, 882708, 1487996, 3650020, 4913620, 9374594, 14382448, 29859148, 38410016, 71427550, 97525500, 147544988, 186821472, 320133640, 399015644, 605818854, 740618592, 1061345430, 1349418108, 2017326672, 2390222900
Offset: 1
Keywords
Programs
-
Python
from statistics import pvariance from sympy.core.numbers import igcdex 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)))
Comments