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.

A086148 Sum of the orders of the elements in the dihedral group D_2n.

Original entry on oeis.org

3, 7, 13, 19, 31, 33, 57, 59, 79, 83, 133, 101, 183, 157, 177, 203, 307, 219, 381, 271, 343, 377, 553, 349, 571, 523, 601, 529, 871, 501, 993, 747, 843, 887, 973, 743, 1407, 1105, 1177, 983, 1723, 987, 1893, 1309, 1371, 1613, 2257, 1293, 2199, 1663, 2013
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 25 2003

Keywords

Crossrefs

Cf. A057660.

Programs

  • Mathematica
    f[p_, e_] := (p^(2*e+1)+1)/(p+1); a[1] = 3; a[n_] := 2*n + Times @@ (f @@@ FactorInteger[n]); Array[a, 50] (* Amiram Eldar, Jul 31 2019 *)
  • PARI
    a(n) = 2*n + sumdivmult(n, d, d*eulerphi(d)); \\ Michel Marcus, Feb 16 2024
  • Python
    from sympy import factorint, prod
    a = lambda n: 2*n + prod((p**(2*e+1)+1)//(p+1) for p,e in factorint(n).items()) # DarĂ­o Clavijo, Feb 15 2024
    

Formula

a(n) = 2*n + Sum_{d|n} d*phi(d). - Vladeta Jovovic, Aug 27 2003

Extensions

More terms from Vladeta Jovovic, Aug 27 2003