cp's OEIS Frontend

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.

A082067 Smallest prime that divides n and phi(n)=A000010(n), or 1 if n and phi(n) are relatively prime.

This page as a plain text file.
%I A082067 #17 Nov 04 2017 09:01:12
%S A082067 1,1,1,2,1,2,1,2,3,2,1,2,1,2,1,2,1,2,1,2,3,2,1,2,5,2,3,2,1,2,1,2,1,2,
%T A082067 1,2,1,2,3,2,1,2,1,2,3,2,1,2,7,2,1,2,1,2,5,2,3,2,1,2,1,2,3,2,1,2,1,2,
%U A082067 1,2,1,2,1,2,5,2,1,2,1,2,3,2,1,2,1,2,1,2,1,2,1,2,3,2,1,2,1,2,3,2,1,2,1,2,3
%N A082067 Smallest prime that divides n and phi(n)=A000010(n), or 1 if n and phi(n) are relatively prime.
%H A082067 Antti Karttunen, <a href="/A082067/b082067.txt">Table of n, a(n) for n = 1..16384</a>
%F A082067 a(n) = A020639(A009195(n)). - _Antti Karttunen_, Nov 03 2017
%t A082067 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_] := n; f2[x_] := EulerPhi[x]; Table[Min[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
%t A082067 (* Second program: *)
%t A082067 Array[If[CoprimeQ[#1, #2], 1, Min@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {#, EulerPhi@ #} &, 105] (* _Michael De Vlieger_, Nov 03 2017 *)
%o A082067 (PARI)
%o A082067 A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
%o A082067 A082067(n) = A020639(gcd(eulerphi(n), n)); \\ _Antti Karttunen_, Nov 03 2017
%Y A082067 Cf. A000010, A009195.
%Y A082067 Cf. also A082061, A082068, A082069, A082070, A082071, A082072.
%K A082067 nonn
%O A082067 1,4
%A A082067 _Labos Elemer_, Apr 07 2003
%E A082067 Name clarified by _Antti Karttunen_, Nov 03 2017