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.

This page as a plain text file.
%I A086148 #22 Feb 17 2024 08:11:40
%S A086148 3,7,13,19,31,33,57,59,79,83,133,101,183,157,177,203,307,219,381,271,
%T A086148 343,377,553,349,571,523,601,529,871,501,993,747,843,887,973,743,1407,
%U A086148 1105,1177,983,1723,987,1893,1309,1371,1613,2257,1293,2199,1663,2013
%N A086148 Sum of the orders of the elements in the dihedral group D_2n.
%H A086148 Amiram Eldar, <a href="/A086148/b086148.txt">Table of n, a(n) for n = 1..10000</a>
%F A086148 a(n) = 2*n + Sum_{d|n} d*phi(d). - _Vladeta Jovovic_, Aug 27 2003
%t A086148 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 *)
%o A086148 (Python)
%o A086148 from sympy import factorint, prod
%o A086148 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
%o A086148 (PARI) a(n) = 2*n + sumdivmult(n, d, d*eulerphi(d)); \\ _Michel Marcus_, Feb 16 2024
%Y A086148 Cf. A057660.
%K A086148 nonn
%O A086148 1,1
%A A086148 Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 25 2003
%E A086148 More terms from _Vladeta Jovovic_, Aug 27 2003