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.
%I A067240 #31 Feb 15 2024 14:19:41 %S A067240 0,1,2,2,4,3,6,4,6,5,10,4,12,7,6,8,16,7,18,6,8,11,22,6,20,13,18,8,28, %T A067240 7,30,16,12,17,10,8,36,19,14,8,40,9,42,12,10,23,46,10,42,21,18,14,52, %U A067240 19,14,10,20,29,58,8,60,31,12,32,16,13,66,18,24,11,70,10,72,37,22,20,16,15,78,12,54,41,82,10,20,43,30,14,88,11,18,24,32,47,22,18,96,43,16,22 %N A067240 If n = Product_{i} p_i^e_i, a(n) = Sum_{i} (p_i - 1)*p_i^(e_i - 1). %C A067240 Additive sequence with a(p^e) = phi(p^e) = (p-1)*p^(e-1). - _Charles R Greathouse IV_, Sep 10 2015 %H A067240 Reinhard Zumkeller, <a href="/A067240/b067240.txt">Table of n, a(n) for n = 1..10000</a> %H A067240 J. Kuzmanovich and A. Pavlichenkov, <a href="http://www.jstor.org/stable/2695329">Finite groups of matrices whose entries are integers</a>, Amer. Math. Monthly, 109 (2002), 173-186. (T on p. 181.) %F A067240 For n > 1: a(n) = Sum_{i} phi(p_i^e_i). - _T. D. Noe_, Jul 10 2003 %p A067240 with(numtheory); A067240 := proc(n) local e,j; e := ifactors(n)[2]: add((e[j][1]-1)*e[j][1]^(e[j][2]-1),j=1..nops(e)); end; %t A067240 a[n_] := Total[ EulerPhi[ Power @@ #] & /@ FactorInteger[n]]; a[1] = 0; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jun 22 2012, after _T. D. Noe_ *) %o A067240 (PARI) %o A067240 A067240(n)= %o A067240 { %o A067240 local(f=factor(n), r=0, p, e); %o A067240 for (i=1, matsize(f)[1], %o A067240 p=f[i,1]; e=f[i,2]; %o A067240 r += (p-1)*p^(e-1); %o A067240 ); %o A067240 return(r); %o A067240 } /* _Joerg Arndt_, Jun 10 2011 */ %o A067240 (PARI) a(n)=my(f=factor(n)); sum(i=1,#f~, (f[i,1]-1)*f[i,1]^(f[i,2]-1)) \\ _Charles R Greathouse IV_, Sep 10 2015 %o A067240 (Haskell) %o A067240 a067240 1 = 0 %o A067240 a067240 n = sum $ map a000010 $ a141809_row $ toInteger n %o A067240 -- _Reinhard Zumkeller_, Jun 13 2012 %o A067240 (Python) %o A067240 from sympy import factorint %o A067240 a = lambda n: sum((p**(e-1))*(p-1) for p,e in factorint(n).items() if e > 0) # _Darío Clavijo_, Feb 15 2024 %Y A067240 Cf. A000010, A141809. %K A067240 nonn %O A067240 1,3 %A A067240 _N. J. A. Sloane_, Mar 10 2002