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.

Previous Showing 11-20 of 26 results. Next

A066086 Greatest common divisor of product (p-1) and product (p+1), where p ranges over distinct prime divisors of n; a(n) = gcd(A048250(n), A173557(n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 6, 8, 1, 2, 2, 2, 2, 4, 2, 2, 2, 2, 6, 2, 6, 2, 8, 2, 1, 4, 2, 24, 2, 2, 6, 8, 2, 2, 12, 2, 2, 8, 2, 2, 2, 2, 2, 8, 6, 2, 2, 8, 6, 4, 2, 2, 8, 2, 6, 4, 1, 12, 4, 2, 2, 4, 24, 2, 2, 2, 6, 8, 6, 12, 24, 2, 2, 2, 2, 2, 12, 4, 6, 8, 2, 2, 8, 8, 2, 4, 2, 24, 2, 2, 6, 4
Offset: 1

Views

Author

Labos Elemer, Dec 04 2001

Keywords

Comments

Frequently equal, but not identical, to A009223 (i.e. GCD of sigma and phi of n).

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]}] cor[x_] := Apply[Times, ba[x]] g1[x_] := GCD[DivisorSigma[1, x], EulerPhi[x]] g2[x_] := GCD[DivisorSigma[1, cor[x]], EulerPhi[cor[x]]] Table[g2[w], {w, 1, 128}]
    a[n_] := If[n == 1, 1, Module[{f=FactorInteger[n]}, GCD[Times@@((#-1)& @@@ f), Times@@((#+1)& @@@ f)]]]; Array[a, 100] (* Amiram Eldar, Dec 05 2018 *)
  • PARI
    a(n)=my(f=factor(n)[,1]);gcd(prod(i=1,#f,f[i]+1),prod(i=1,#f,f[i]-1)) \\ Charles R Greathouse IV, Feb 14 2013

Formula

a(n) = gcd(A048250(n), A023900(n)) = gcd(A000203(A007947(n)), A000010(A007947(n))).
a(n) = A322360(n) / A322359(n). - Antti Karttunen, Dec 04 2018

Extensions

Name edited, part of the old name transferred to the formula section by Antti Karttunen, Dec 04 2018

A055008 Numbers k such that gcd(phi(k), sigma(k)) = 1 with phi = A000010, sigma = A000203.

Original entry on oeis.org

1, 2, 4, 8, 9, 16, 25, 32, 36, 50, 64, 81, 100, 121, 128, 144, 225, 242, 256, 289, 324, 400, 484, 512, 529, 576, 578, 625, 729, 800, 841, 900, 1024, 1058, 1089, 1156, 1250, 1296, 1600, 1681, 1682, 1936, 2025, 2048, 2116, 2209, 2304, 2312, 2401, 2500, 2601
Offset: 1

Views

Author

Labos Elemer, May 31 2000

Keywords

Comments

The asymptotic density of this sequence is 0 (Dressler, 1974). - Amiram Eldar, Jul 23 2020
Conjecture: Every term is a square or twice a square. - Jason Yuen, May 16 2024
The conjecture is true: If k is neither a square nor twice a square (i.e., in A028983), then sigma(k) is even. Since gcd(phi(k), sigma(k)) = 1, then phi(k) must be odd, but phi(k) is odd only for k = 1 and 2. - Amiram Eldar, May 19 2024

Examples

			For n = 484, phi(484) = 220 = 2*2*5*11, sigma(484) = 931 = 7*7*19, and gcd(220,931) = 1.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 2700, CoprimeQ[EulerPhi@ #, DivisorSigma[1, #]] &] (* Michael De Vlieger, Feb 05 2017 *)
    Select[With[{max = 51}, Union[Array[#^2 &, max], Array[2*#^2 &, Floor[max / Sqrt[2]]]]], CoprimeQ[EulerPhi[#], DivisorSigma[1, #]] &] (* Amiram Eldar, May 19 2024 *)
  • PARI
    is(n)=gcd(sigma(n),eulerphi(n))==1 \\ Charles R Greathouse IV, Feb 19 2013

Extensions

Incorrect comment removed by Charles R Greathouse IV, Feb 19 2013

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

Original entry on oeis.org

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, 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, 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
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[x]; f2[x_] := DivisorSigma[1, x]; Table[Min[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
    (* Second program: *)
    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 *)
  • PARI
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    A082070(n) = A020639(gcd(eulerphi(n),sigma(n))); \\ Antti Karttunen, Nov 03 2017

Formula

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

Extensions

Name edited by Antti Karttunen after an example by N. J. A. Sloane, Nov 04 2017

A066087 a(n) = gcd(sigma(n), phi(n)) - gcd(sigma(rad(n)), phi(rad(n))); rad = A007947.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, -1, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 2, 1, -1, 0, -4, 0, 4, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -4, -2, 0, 0, 0, 0, -1, 0, 0, -4, 0, 0, 0, 18, 0, -2, 0, 2, 0, 0, 0, 2, 0, -3, 8, -1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 12, -6
Offset: 1

Views

Author

Labos Elemer, Dec 04 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[GCD[DivisorSigma[1, n], EulerPhi@ n] - GCD[DivisorSigma[1, #], EulerPhi@ #] &[Times @@ FactorInteger[n][[All, 1]]], {n, 120}] (* Michael De Vlieger, Feb 19 2017 *)
  • PARI
    rad(f)=for(i=1,#f~,f[i,2]=1); f
    g(f)=gcd(sigma(f),eulerphi(f))
    a(n)=my(f=factor(n),k=rad(f)); g(f)-g(k) \\ Charles R Greathouse IV, Dec 09 2013

Formula

A009223(n) - A066086(n) = gcd(sigma(n), phi(n)) - gcd(sigma(A007947(n)), phi(A007947(n))).

A073815 Least number x such that gcd(phi(x), sigma(x)) = n.

Original entry on oeis.org

1, 3, 18, 12, 200, 14, 3364, 15, 722, 328, 9801, 42, 25281, 116, 1800, 165, 36992, 810, 4414201, 88, 196, 29161, 541696, 35, 2928200, 1413, 103968, 172, 98942809, 488, 1547536, 336, 19602, 17536, 814088, 370, 49042009, 55297, 1521, 319, 3150464641
Offset: 1

Views

Author

Labos Elemer, Nov 12 2002

Keywords

Comments

Values are frequently identical to terms of A077102. Since gcd(a,b) and gcd(a+b,a-b) may differ, so may the smallest solutions. A077102(m) and a(m) differ at m = 1, 2, 4, 8, 16, 28, 32, 40, etc.

Crossrefs

Programs

  • Mathematica
    f[x_] := Apply[GCD, {DivisorSigma[1, x], EulerPhi[x]}] t=Table[0, {100}]; Do[s=f[n]; If[s<101&&t[[s]]==0, t[[s]]=n], {n, 1, 10^13}];
  • PARI
    a(n)=my(x=n);while(gcd(eulerphi(x),sigma(x))!=n, x++); x \\ Charles R Greathouse IV, Dec 09 2013

Formula

a(n) = Min{x; A055008(x)=n}. a(n)=Min{x; gcd(A000203(x), A000010(x))=n}
a(n) = Min{x: A023897(x)= n}, smallest balanced number (A020492) for which the quotient equals n.

A074389 a(n) = gcd(n, sigma(n), phi(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 6, 1, 4, 3, 2, 1, 4, 1, 1, 1, 2, 1, 6, 1, 8, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 4, 1, 6, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 1, 4, 1, 1, 3, 1, 1, 2, 1, 2, 3
Offset: 1

Views

Author

Labos Elemer, Aug 23 2002

Keywords

Crossrefs

In the old definition the erroneously given formula gcd(n, A000005(n), A000010(n)) is now sequence A318459. - Antti Karttunen, Sep 07 2018

Programs

  • Mathematica
    Table[Apply[GCD, {w, DivisorSigma[1, w], EulerPhi[w]}], {w, 1, 128}]
  • PARI
    A074389(n) = gcd([n, sigma(n), eulerphi(n)]); \\ Antti Karttunen, Sep 07 2018

Formula

a(n) = gcd(n, A000010(n), A000203(n)).
a(n) = gcd(n, A009223(n)). - Antti Karttunen, Sep 07 2018

Extensions

Name corrected by Antti Karttunen, Sep 07 2018

A081396 Number of common prime factors (ignoring multiplicity) of sigma(n) = A000203(n) and phi(n) = A000010(n).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 0, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 0, 1, 1, 1, 2, 2
Offset: 1

Views

Author

Labos Elemer, Mar 28 2003

Keywords

Examples

			n=209: sigma(209) = 240 = 2*2*2*2*3*5, phi(209) = 180 = 2*2*3*3*5, common factor set = {2,3,5}, so a(209)=3.
		

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]}] Table[Length[Intersection[ba[EulerPhi[w]], ba[DivisorSigma[1, w]]]], {w, 1, 100}]
  • PARI
    a(n)=omega(gcd(sigma(n),eulerphi(n))) \\ Charles R Greathouse IV, Feb 19 2013

Formula

a(n) = A001221(A009223(n)). - Antti Karttunen, Jan 22 2020

Extensions

Data section extended up to a(105) by Antti Karttunen, Jan 22 2020

A009286 a(n) = lcm(sigma(n), phi(n)).

Original entry on oeis.org

1, 3, 4, 14, 12, 12, 24, 60, 78, 36, 60, 28, 84, 24, 24, 248, 144, 78, 180, 168, 96, 180, 264, 120, 620, 84, 360, 168, 420, 72, 480, 1008, 240, 432, 48, 1092, 684, 180, 168, 720, 840, 96, 924, 420, 312, 792, 1104, 496, 798, 1860, 288, 1176, 1404, 360, 360, 120, 720, 1260
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

From Antti Karttunen, May 26 2017: (Start)
a(n) = A062354(n) / A009223(n).
a(A000040(n)) = A084921(n). - after Enrique Pérez Herrero's May 17 2012 comment in the latter sequence.
(End)

A082054 Sum of common prime divisors (without multiplicity) of sigma(n) and phi(n).

Original entry on oeis.org

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

Views

Author

Labos Elemer, Apr 03 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]}]; Table[Apply[Plus, Intersection[ba[EulerPhi[w]], ba[DivisorSigma[1, w]]]], {w, 1, 256}]
    a[n_] := Module[{g = GCD[DivisorSigma[1, n], EulerPhi[n]]}, If[g == 1, 0, Total[FactorInteger[g][[;; , 1]]]]]; Array[a, 100] (* Amiram Eldar, Feb 16 2025 *)
  • PARI
    a(n)=my(f=factor(gcd(sigma(n=factor(n)), eulerphi(n)))[,1]); sum(i=1,#f,f[i]) \\ Charles R Greathouse IV, Dec 09 2013

Formula

a(n) = A008472(A009223(n)). - Amiram Eldar, Feb 16 2025

A082055 Product of common prime-divisors (without multiplicity) of sigma(n) and phi(n).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 6, 2, 1, 2, 3, 2, 2, 2, 2, 2, 2, 1, 6, 2, 2, 2, 2, 2, 1, 2, 2, 6, 1, 2, 6, 2, 2, 2, 6, 2, 2, 6, 2, 2, 2, 3, 1, 2, 2, 2, 6, 2, 6, 2, 2, 2, 2, 2, 6, 2, 1, 6, 2, 2, 2, 2, 6, 2, 3, 2, 6, 2, 2, 6, 6, 2, 2, 1, 2, 2, 2, 2, 6, 2, 10, 2, 6, 2, 2, 2, 2, 6, 2, 2, 3, 6, 1, 2, 2, 2, 6, 6
Offset: 1

Views

Author

Labos Elemer, Apr 03 2003

Keywords

Comments

The squarefree kernel of the greatest common divisor of sigma(n) and phi(n). - Antti Karttunen, Jan 22 2020

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]}] Table[Apply[Times, Intersection[ba[EulerPhi[w]], ba[DivisorSigma[1, w]]]], {w, 1, 256}]
  • PARI
    A082055(n) = factorback(factorint(gcd(sigma(n), eulerphi(n)))[, 1]); \\ Antti Karttunen, Jan 22 2020

Formula

a(n) = A007947(A009223(n)). - Antti Karttunen, Jan 22 2020
Previous Showing 11-20 of 26 results. Next