The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A345416 Table read by upward antidiagonals: Given m, n >= 1, write gcd(m,n) as d = u*m+v*n where u, v are minimal; T(m,n) = v. 4
1, 1, 0, 1, 1, 0, 1, -1, 1, 0, 1, 1, 1, 0, 0, 1, -2, -1, 1, 1, 0, 1, 1, 2, 1, -1, 0, 0, 1, -3, 1, -1, 1, 0, 1, 0, 1, 1, -2, -1, 1, 1, 1, 0, 0, 1, -4, 3, 2, -1, 1, -1, -1, 1, 0, 1, 1, 1, 1, 3, 1, -2, 0, 0, 0, 0, 1, -5, -3, -2, -3, -1, 1, 2, 1, 1, 1, 0, 1, 1, 4, -2, 2, -1, 1, 1, -1, 1, -1, 0, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,17
COMMENTS
The gcd is given in A003989, and u is given in A345415. Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when m=n. If we ignore the diagonal, the v table is the transpose of the u table.
LINKS
EXAMPLE
The gcd table (A003989) begins:
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
[1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1]
[1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4]
[1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1]
[1, 2, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 2]
[1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1]
[1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8]
[1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1]
[1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1]
[1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 12, 1, 2, 3, 4]
...
The u table (A345415) begins:
[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[0, 0, -1, 1, -2, 1, -3, 1, -4, 1, -5, 1, -6, 1, -7, 1]
[0, 1, 0, -1, 2, 1, -2, 3, 1, -3, 4, 1, -4, 5, 1, -5]
[0, 0, 1, 0, -1, -1, 2, 1, -2, -2, 3, 1, -3, -3, 4, 1]
[0, 1, -1, 1, 0, -1, 3, -3, 2, 1, -2, 5, -5, 3, 1, -3]
[0, 0, 0, 1, 1, 0, -1, -1, -1, 2, 2, 1, -2, -2, -2, 3]
[0, 1, 1, -1, -2, 1, 0, -1, 4, 3, -3, -5, 2, 1, -2, 7]
[0, 0, -1, 0, 2, 1, 1, 0, -1, -1, -4, -1, 5, 2, 2, 1]
[0, 1, 0, 1, -1, 1, -3, 1, 0, -1, 5, -1, 3, -3, 2, -7]
[0, 0, 1, 1, 0, -1, -2, 1, 1, 0, -1, -1, 4, 3, -1, -3]
[0, 1, -1, -1, 1, -1, 2, 3, -4, 1, 0, -1, 6, -5, -4, 3]
[0, 0, 0, 0, -2, 0, 3, 1, 1, 1, 1, 0, -1, -1, -1, -1]
...
The v table (this entry) begins:
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]
[1, -1, 1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1]
[1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 0]
[1, -2, 2, -1, 1, 1, -2, 2, -1, 0, 1, -2, 2, -1, 0, 1]
[1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1]
[1, -3, -2, 2, 3, -1, 1, 1, -3, -2, 2, 3, -1, 0, 1, -3]
[1, 1, 3, 1, -3, -1, -1, 1, 1, 1, 3, 1, -3, -1, -1, 0]
[1, -4, 1, -2, 2, -1, 4, -1, 1, 1, -4, 1, -2, 2, -1, 4]
[1, 1, -3, -2, 1, 2, 3, -1, -1, 1, 1, 1, -3, -2, 1, 2]
[1, -5, 4, 3, -2, 2, -3, -4, 5, -1, 1, 1, -5, 4, 3, -2]
[1, 1, 1, 1, 5, 1, -5, -1, -1, -1, -1, 1, 1, 1, 1, 1]
...
MAPLE
mygcd:=proc(a, b) local d, s, t; d := igcdex(a, b, `s`, `t`); [a, b, d, s, t]; end;
gcd_rowv:=(m, M)->[seq(mygcd(m, n)[5], n=1..M)];
for m from 1 to 12 do lprint(gcd_rowv(m, 16)); od;
MATHEMATICA
T[m_, n_] := Module[{u, v}, MinimalBy[{u, v} /. Solve[u^2 + v^2 <= 26 && u*m + v*n == GCD[m, n], {u, v}, Integers], #.#&][[1, 2]]];
Table[T[m - n + 1, n], {m, 1, 13}, {n, 1, m}] // Flatten (* Jean-François Alcover, Mar 27 2023 *)
CROSSREFS
Sequence in context: A333179 A240021 A087810 * A321755 A052314 A271606
KEYWORD
sign,tabl
AUTHOR
N. J. A. Sloane, Jun 19 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 02:26 EDT 2024. Contains 372528 sequences. (Running on oeis4.)