%I #15 Jan 29 2022 13:12:04
%S 1,1,2,1,2,2,2,1,1,2,2,2,2,3,2,1,2,3,2,2,2,2,2,2,1,3,2,2,2,2,2,1,2,2,
%T 3,1,2,3,2,2,2,3,2,2,3,2,2,2,3,1,2,2,2,3,2,3,2,2,2,2,2,3,2,1,3,2,2,2,
%U 2,3,2,3,2,3,2,2,3,3,2,2,1,2,2,2,2,3,2,5,2,3,2,2,2,2,3,2,2,3,3,1,2,2,2,3,3
%N Greatest common prime-divisor of phi(n) and sigma(n) = A000203(n); a(n)=1 if no common prime-divisor exists.
%H Antti Karttunen, <a href="/A082064/b082064.txt">Table of n, a(n) for n = 1..16384</a>
%F a(n) = A006530(A009223(n)). - _Antti Karttunen_, Nov 03 2017
%t ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; f1[x_] := EulerPhi[n]; f2[x_] := DivisorSigma[1, x]; Table[Max[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
%t (* Second program: *)
%t Array[If[CoprimeQ[#1, #2], 1, Max@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {EulerPhi@ #, DivisorSigma[1, #]} &, 105] (* _Michael De Vlieger_, Nov 03 2017 *)
%o (PARI)
%o A006530(n) = if(1==n, n, vecmax(factor(n)[, 1]));
%o A082064(n) = A006530(gcd(eulerphi(n), sigma(n))); \\ _Antti Karttunen_, Nov 03 2017
%Y Cf. A000010, A000203, A006530, A009223.
%Y Cf. also A082061, A082062, A082063, A082065, A082066, A082070.
%K nonn
%O 1,3
%A _Labos Elemer_, Apr 07 2003
%E Changed "was found" to "exists" in definition. - _N. J. A. Sloane_, Jan 29 2022
|