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.

Showing 1-6 of 6 results.

A082061 Greatest common prime divisor of n and phi(n)=A000010(n); a(n)=1 if no common prime divisor exists.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Maple
    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:
    A082061 := proc(n) gcpd( numtheory[phi](n), n) ; end proc: # R. J. Mathar, Jul 09 2011
  • Mathematica
    (* 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}]
    (* Second program: *)
    Array[If[CoprimeQ[#1, #2], 1, Max@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {#, EulerPhi@ #} &, 105] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    gpf(n)=if(n>1,my(f=factor(n)[,1]);f[#f],1)
    a(n)=gpf(gcd(eulerphi(n),n)) \\ Charles R Greathouse IV, Feb 19 2013

Formula

a(n) = A006530(A009195(n)). - Antti Karttunen, Nov 03 2017
From Amiram Eldar, Dec 06 2024: (Start)
a(n) <= A006530(n), with equality if and only if n is in A070003.
a(n) = 1 if and only if n is a cyclic number (A003277). (End)

Extensions

Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022

A082062 Greatest common prime-divisor of n and sigma(n)=A000203(n); a(n)=1 if no common prime-divisor exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 7, 1, 3, 1, 1, 3, 2, 1, 1, 1, 2, 1, 5, 1, 3, 1, 2, 3, 2, 1, 2, 1, 1, 3, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 1, 1, 3, 1, 2, 3, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 7, 1, 2, 3, 2, 1, 3, 7, 2, 1, 2, 5, 3, 1, 1, 3, 1, 1, 3, 1, 2, 3
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    "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_] := DivisorSigma[1, x] Table[Max[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
  • PARI
    gpf(n)=if(n>1,my(f=factor(n)[,1]);f[#f],1)
    a(n)=gpf(gcd(sigma(n),n)) \\ Charles R Greathouse IV, Feb 19 2013

Extensions

Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022

A082066 Greatest common prime-divisor of sigma_1(n)=A000203(n) and sigma_2(n)=A001157(n); a(n)=1 if no common prime-divisor exists.

Original entry on oeis.org

1, 1, 2, 7, 2, 2, 2, 5, 13, 2, 2, 7, 2, 2, 2, 31, 2, 13, 2, 7, 2, 2, 2, 5, 31, 2, 5, 7, 2, 2, 2, 7, 2, 2, 2, 13, 2, 5, 2, 5, 2, 2, 2, 7, 13, 2, 2, 31, 19, 31, 2, 7, 2, 5, 2, 5, 5, 5, 2, 7, 2, 2, 13, 127, 2, 2, 2, 7, 2, 2, 2, 13, 2, 2, 31, 7, 2, 2, 2, 31, 11, 2, 2, 7, 2, 2, 5, 5, 2, 13, 2, 7, 2, 2, 2, 7, 2
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    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_] := DivisorSigma[1, n]; f2[x_] := DivisorSigma[2, x] Table[Max[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
    (* Second program: *)
    Table[Last[Apply[Intersection, FactorInteger[Map[DivisorSigma[#, n] &, {1, 2}]][[All, All, 1]]] /. {} -> {1}], {n, 109}] (* Michael De Vlieger, May 22 2017 *)
  • PARI
    gpf(n)=if(n>1,my(f=factor(n)[,1]);f[#f],1)
    a(n)=gpf(gcd(sigma(n),sigma(n,2))) \\ Charles R Greathouse IV, Feb 19 2013
    
  • Python
    from sympy import primefactors, gcd, divisor_sigma
    def a006530(n): return 1 if n==1 else primefactors(n)[-1]
    def a(n): return a006530(gcd(divisor_sigma(n), divisor_sigma(n, 2))) # Indranil Ghosh, May 22 2017

Formula

a(n) = A006530(A179931(n)). - Reinhard Zumkeller, Jul 10 2011

Extensions

Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022

A082063 Greatest common prime divisor of n and sigma_2(n) = A001157(n), or 1 if the two are relatively prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 3, 1, 2, 5, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 7, 1, 5, 1, 1, 1, 2, 5, 3, 1, 2, 1, 5, 1, 2, 1, 2, 1, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 2, 1, 2, 1, 5, 1, 2, 7, 1, 13, 2, 1, 2, 1, 5, 1, 1, 1, 2, 5, 2, 1, 2, 1, 2, 1, 2, 1, 7, 5, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 5
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    (* 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_] := DivisorSigma[2, x]; Table[Max[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
    (* Second program: *)
    Array[If[CoprimeQ[#1, #2], 1, Max@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {#, DivisorSigma[2, #]} &, 105] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    A006530(n) = if(1==n, n, vecmax(factor(n)[, 1]));
    A082063(n) = A006530(gcd(sigma(n,2), n)); \\ Antti Karttunen, Nov 03 2017

Formula

a(n) = A006530(A179930(n)). - Antti Karttunen, Nov 03 2017

Extensions

Erroneous comment removed by Antti Karttunen, Nov 03 2017

A082071 Smallest common prime-divisor of phi(n) = A000010(n) and sigma_2(n) = A001157(n); a(n)=1 if no common prime-divisor exists.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 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
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Array[If[CoprimeQ[#1, #2], 1, Min@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {EulerPhi@ #,
    DivisorSigma[2, #]} &, 105] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    A082071(n) = A020639(gcd(eulerphi(n),sigma(n,2))); \\ Antti Karttunen, Nov 03 2017

Formula

a(n) = A020639(gcd(A000010(n), A001157(n))). - Antti Karttunen, Nov 03 2017

Extensions

Values corrected by R. J. Mathar, Jul 09 2011
More terms from Antti Karttunen, Nov 03 2017
Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022

A082064 Greatest common prime-divisor of phi(n) and sigma(n) = A000203(n); a(n)=1 if no common prime-divisor exists.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    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}]
    (* Second program: *)
    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 *)
  • PARI
    A006530(n) = if(1==n, n, vecmax(factor(n)[, 1]));
    A082064(n) = A006530(gcd(eulerphi(n), sigma(n))); \\ Antti Karttunen, Nov 03 2017

Formula

a(n) = A006530(A009223(n)). - Antti Karttunen, Nov 03 2017

Extensions

Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022
Showing 1-6 of 6 results.