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.

A333291 a(n) = Sum_{i=1..n, gcd(i,n)=1} i*phi(i) where phi is Euler's totient function A000010.

Original entry on oeis.org

1, 1, 3, 7, 17, 21, 49, 69, 105, 103, 217, 173, 375, 347, 435, 509, 863, 601, 1243, 983, 1271, 1265, 2217, 1449, 2575, 2225, 2935, 2573, 4549, 2241, 5601, 4609, 5195, 4997, 6453, 4531, 9519, 7099, 8457, 6897, 13111, 6621, 15255, 11053, 11691, 12397, 20033, 11471, 20905, 14563, 19307, 17663, 28901, 16285, 26119
Offset: 1

Views

Author

N. J. A. Sloane, Mar 22 2020

Keywords

Crossrefs

Suggested by A023896 and A319087.

Programs

  • Maple
    a:= n-> add(`if`(igcd(i, n)=1, i*numtheory[phi](i), 0), i=1..n):
    seq(a(n), n=1..55);  # Alois P. Heinz, Mar 22 2020
  • Mathematica
    a[n_] := Sum[If[CoprimeQ[i, n], i * EulerPhi[i], 0], {i, 1, n}]; Array[a, 100] (* Amiram Eldar, Dec 01 2024 *)
  • PARI
    a(n) = sum(i=1, n, if (gcd(n, i) == 1, i*eulerphi(i))); \\ Michel Marcus, Mar 23 2020