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.
%I A082061 #27 Dec 06 2024 11:28:27 %S A082061 1,1,1,2,1,2,1,2,3,2,1,2,1,2,1,2,1,3,1,2,3,2,1,2,5,2,3,2,1,2,1,2,1,2, %T A082061 1,3,1,2,3,2,1,3,1,2,3,2,1,2,7,5,1,2,1,3,5,2,3,2,1,2,1,2,3,2,1,2,1,2, %U A082061 1,2,1,3,1,2,5,2,1,3,1,2,3,2,1,3,1,2,1,2,1,3,1,2,3,2,1,2,1,7,3,5,1,2,1,2,3 %N A082061 Greatest common prime divisor of n and phi(n)=A000010(n); a(n)=1 if no common prime divisor exists. %H A082061 Antti Karttunen, <a href="/A082061/b082061.txt">Table of n, a(n) for n = 1..16384</a> %F A082061 a(n) = A006530(A009195(n)). - _Antti Karttunen_, Nov 03 2017 %F A082061 From _Amiram Eldar_, Dec 06 2024: (Start) %F A082061 a(n) <= A006530(n), with equality if and only if n is in A070003. %F A082061 a(n) = 1 if and only if n is a cyclic number (A003277). (End) %p A082061 gcpd := proc(a,b) local g ,d ; g := 1 ; for d in numtheory[divisors](a) intersect numtheory[divisors](b) do if isprime(d) then g := max(g,d) ; end if; end do: g ; end proc: %p A082061 A082061 := proc(n) gcpd( numtheory[phi](n), n) ; end proc: # _R. J. Mathar_, Jul 09 2011 %t A082061 (* factors/exponent SET *) 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_] := x; f2[x_] := EulerPhi[x]; Table[Max[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}] %t A082061 (* Second program: *) %t A082061 Array[If[CoprimeQ[#1, #2], 1, Max@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {#, EulerPhi@ #} &, 105] (* _Michael De Vlieger_, Nov 03 2017 *) %o A082061 (PARI) gpf(n)=if(n>1,my(f=factor(n)[,1]);f[#f],1) %o A082061 a(n)=gpf(gcd(eulerphi(n),n)) \\ _Charles R Greathouse IV_, Feb 19 2013 %Y A082061 Cf. A000010, A003277, A006530, A009195, A070003. %Y A082061 Cf. also A082062, A082063, A082064, A082065, A082066, A082067. %K A082061 nonn %O A082061 1,4 %A A082061 _Labos Elemer_, Apr 07 2003 %E A082061 Changed "was found" to "exists" in definition. - _N. J. A. Sloane_, Jan 29 2022