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.

A333463 a(n) = Sum_{k=1..n} floor(n/k) * gcd(n,k).

Original entry on oeis.org

1, 4, 7, 13, 14, 27, 22, 38, 39, 53, 39, 85, 49, 81, 93, 106, 68, 143, 78, 165, 144, 143, 98, 243, 147, 176, 189, 252, 131, 338, 143, 281, 251, 243, 279, 440, 178, 278, 308, 470, 200, 514, 212, 438, 488, 350, 234, 660, 339, 522, 427, 538, 271, 670, 487, 714, 489, 462, 307, 1028
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 22 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Floor[n/k] GCD[n, k], {k, 1, n}], {n, 1, 60}]
    Table[Sum[EulerPhi[n/d] Sum[DivisorSigma[0, k], {k, 1, d}], {d, Divisors[n]}], {n, 1, 60}]
  • PARI
    a(n) = sum(k=1, n, (n\k)*gcd(n, k)); \\ Michel Marcus, Mar 23 2020
    
  • Python
    from math import isqrt
    from sympy import divisors, totient
    def A333463(n): return sum((2*sum(d//k for k in range(1, isqrt(d)+1))-isqrt(d)**2)*totient(n//d) for d in divisors(n,generator=True)) # Chai Wah Wu, Oct 07 2021

Formula

a(n) = Sum_{d|n} phi(n/d) * A006218(d).
a(n) = Sum_{k=1..n} Sum_{d|k} gcd(n,d).