login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082070 Smallest prime that divides phi(n) and sigma(n) = A000203(n), or 1 if phi(n) and sigma(n) are relatively prime. 7

%I #18 Nov 06 2017 02:49:12

%S 1,1,2,1,2,2,2,1,1,2,2,2,2,2,2,1,2,3,2,2,2,2,2,2,1,2,2,2,2,2,2,1,2,2,

%T 2,1,2,2,2,2,2,2,2,2,2,2,2,2,3,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,

%U 2,2,2,3,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,1,2,2,2,2,2

%N Smallest prime that divides phi(n) and sigma(n) = A000203(n), or 1 if phi(n) and sigma(n) are relatively prime.

%H Antti Karttunen, <a href="/A082070/b082070.txt">Table of n, a(n) for n = 1..16384</a>

%F a(n) = A020639(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[x]; f2[x_] := DivisorSigma[1, x]; Table[Min[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]

%t (* Second program: *)

%t Array[If[CoprimeQ[#1, #2], 1, Min@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {EulerPhi@ #, DivisorSigma[1, #]} &, 105] (* _Michael De Vlieger_, Nov 03 2017 *)

%o (PARI)

%o A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));

%o A082070(n) = A020639(gcd(eulerphi(n),sigma(n))); \\ _Antti Karttunen_, Nov 03 2017

%Y Cf. A000010, A000203, A009223, A020639.

%Y Cf. also A082064, A082067, A082068, A082069, A082071, A082072.

%K nonn

%O 1,3

%A _Labos Elemer_, Apr 07 2003

%E Name edited by _Antti Karttunen_ after an example by _N. J. A. Sloane_, Nov 04 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 01:36 EDT 2024. Contains 371264 sequences. (Running on oeis4.)