login
A086148
Sum of the orders of the elements in the dihedral group D_2n.
1
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,1
LINKS
FORMULA
a(n) = 2*n + Sum_{d|n} d*phi(d). - Vladeta Jovovic, Aug 27 2003
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 *)
PROG
(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
(PARI) a(n) = 2*n + sumdivmult(n, d, d*eulerphi(d)); \\ Michel Marcus, Feb 16 2024
CROSSREFS
Cf. A057660.
Sequence in context: A171747 A031215 A099957 * A262086 A205956 A215907
KEYWORD
nonn
AUTHOR
Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 25 2003
EXTENSIONS
More terms from Vladeta Jovovic, Aug 27 2003
STATUS
approved