login
Sum of common prime divisors (without multiplicity) of sigma(n) and phi(n).
4

%I #7 Dec 09 2013 12:13:49

%S 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,

%T 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,

%U 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

%N Sum of common prime divisors (without multiplicity) of sigma(n) and phi(n).

%H Charles R Greathouse IV, <a href="/A082054/b082054.txt">Table of n, a(n) for n = 1..10000</a>

%t 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}]

%o (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

%Y Cf. A000203, A000010.

%K nonn

%O 1,3

%A _Labos Elemer_, Apr 03 2003