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.

A342389 a(n) = Sum_{k=1..n} k^gcd(k,n).

Original entry on oeis.org

1, 5, 30, 264, 3135, 46709, 823564, 16777528, 387420759, 10000003265, 285311670666, 8916100500148, 302875106592331, 11112006826381965, 437893890380965260, 18446744073726350224, 827240261886336764313, 39346408075296928032645
Offset: 1

Views

Author

Seiichi Manyama, Mar 10 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[k^GCD[k, n], {k, 1, n}]; Array[a, 18] (* Amiram Eldar, Mar 10 2021 *)
  • PARI
    a(n) = sum(k=1, n, k^gcd(k, n));

Formula

If p is prime, a(p) = A000217(p-1) + p^p = (p-1)*p/2 + p^p.