cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A345434 For 1<=x<=n, 1<=y<=n, write gcd(x,y) = u*x+v*y with u,v minimal; a(n) = sum of the values of u^2+v^2.

Original entry on oeis.org

1, 4, 11, 20, 47, 62, 135, 196, 313, 394, 685, 838, 1317, 1578, 1991, 2484, 3573, 4084, 5595, 6410, 7621, 8792, 11505, 12710, 15539, 17536, 20619, 23018, 28417, 30650, 37215, 41308, 46405, 51072, 57607, 61596, 72927, 79670, 88055, 94618, 109799, 116312, 134067, 143952, 155287
Offset: 1

Views

Author

N. J. A. Sloane, Jun 22 2021

Keywords

Comments

Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when x=y.

Crossrefs

Programs

  • Python
    from sympy.core.numbers import igcdex
    def A345434(n): return sum(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))) # Chai Wah Wu, Jun 22 2021