A082054 Sum of common prime divisors (without multiplicity) of sigma(n) and phi(n).
0, 0, 2, 0, 2, 2, 2, 0, 0, 2, 2, 2, 2, 5, 2, 0, 2, 3, 2, 2, 2, 2, 2, 2, 0, 5, 2, 2, 2, 2, 2, 0, 2, 2, 5, 0, 2, 5, 2, 2, 2, 5, 2, 2, 5, 2, 2, 2, 3, 0, 2, 2, 2, 5, 2, 5, 2, 2, 2, 2, 2, 5, 2, 0, 5, 2, 2, 2, 2, 5, 2, 3, 2, 5, 2, 2, 5, 5, 2, 2, 0, 2, 2, 2, 2, 5, 2, 7, 2, 5, 2, 2, 2, 2, 5, 2, 2, 3, 5, 0, 2, 2, 2, 5, 5
Offset: 1
Keywords
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; Table[Apply[Plus, Intersection[ba[EulerPhi[w]], ba[DivisorSigma[1, w]]]], {w, 1, 256}] a[n_] := Module[{g = GCD[DivisorSigma[1, n], EulerPhi[n]]}, If[g == 1, 0, Total[FactorInteger[g][[;; , 1]]]]]; Array[a, 100] (* Amiram Eldar, Feb 16 2025 *)
-
PARI
a(n)=my(f=factor(gcd(sigma(n=factor(n)), eulerphi(n)))[,1]); sum(i=1,#f,f[i]) \\ Charles R Greathouse IV, Dec 09 2013