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.

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

Original entry on oeis.org

1, 2, 5, 22, 129, 1411, 16813, 266372, 4787349, 100391653, 2357947701, 61980047702, 1792160394049, 56707753687079, 1946197516142925, 72061992621375496, 2862423051509815809, 121441389759089405193, 5480386857784802185957
Offset: 1

Views

Author

Seiichi Manyama, Mar 12 2021

Keywords

Crossrefs

Programs

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

Formula

a(n) = Sum_{d|n} phi(n/d) * d^(n-2).
a(n) = Sum_{d|n} mu(n/d) * d * sigma_(n-3)(d).
a(n) ~ n^(n-2). - Vaclav Kotesovec, May 23 2021