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.

A342435 a(n) = Sum_{k=1..n} gcd(k,n)^(gcd(k,n) - 2).

Original entry on oeis.org

1, 2, 5, 19, 129, 1303, 16813, 262166, 4782981, 100000133, 2357947701, 61917365564, 1792160394049, 56693912392115, 1946195068359645, 72057594038190124, 2862423051509815809, 121439531096599037355
Offset: 1

Views

Author

Seiichi Manyama, Mar 12 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[GCD[k, n]^(GCD[k, n] - 2), {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Mar 12 2021 *)
  • PARI
    a(n) = sum(k=1, n, gcd(k, n)^(gcd(k, n)-2));
    
  • PARI
    a(n) = sumdiv(n, d, eulerphi(n/d)*d^(d-2));

Formula

a(n) = Sum_{d|n} phi(n/d) * d^(d-2).