[go: up one dir, main page]

login
Search: a345430 -id:a345430
     Sort: relevance | references | number | modified | created      Format: long | short | data
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.
+10
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
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) = sum of the values of |u|.
+10
2
0, 1, 4, 7, 16, 19, 37, 49, 70, 82, 127, 145, 208, 235, 277, 325, 433, 472, 607, 667, 757, 832, 1030, 1102, 1291, 1399, 1582, 1708, 2023, 2119, 2479, 2671, 2911, 3103, 3409, 3571, 4084, 4327, 4669, 4909, 5539, 5737, 6430, 6760, 7162, 7525, 8353, 8641, 9415, 9787
OFFSET
1,3
COMMENTS
Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when x=y.
It would be nice to have b-files for this and related sequences (as listed in cross-references). The present sequence is especially interesting. What is its rate of growth?
MAPLE
mygcd:=proc(a, b) local d, s, t; d := igcdex(a, b, `s`, `t`); [a, b, d, s, t]; end;
ansu:=[]; ansv:=[]; ansb:=[];
for N from 1 to 80 do
tu:=0; tv:=0; tb:=0;
for x from 1 to N do
for y from 1 to N do
if igcd(x, y)=1 then
tu:=tu+abs(mygcd(x, y)[4]);
tv:=tv+abs(mygcd(x, y)[5]);
tb:=tb+mygcd(x, y)[4]^2 + mygcd(x, y)[5]^2;
fi;
od: od:
ansu:=[op(ansu), tu];
ansv:=[op(ansv), tv];
ansb:=[op(ansb), tb];
od:
ansu; # the present sequence
ansv; # A345430
ansb; # A345431
# for A345432, A345433, A345434, omit the "igcd(x, y)=1" test
PROG
(Python)
from sympy.core.numbers import igcdex
def A345429(n): return sum(abs(u) for u, v, w in (igcdex(x, y) for x in range(1, n+1) for y in range(1, n+1)) if w == 1) # Chai Wah Wu, Jun 22 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 22 2021
STATUS
approved

Search completed in 0.006 seconds