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.

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))).