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.

A318827 a(n) = n - gcd(n - 1, phi(n)).

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 1, 7, 7, 9, 1, 11, 1, 13, 13, 15, 1, 17, 1, 19, 17, 21, 1, 23, 21, 25, 25, 25, 1, 29, 1, 31, 29, 33, 33, 35, 1, 37, 37, 39, 1, 41, 1, 43, 41, 45, 1, 47, 43, 49, 49, 49, 1, 53, 53, 55, 53, 57, 1, 59, 1, 61, 61, 63, 49, 61, 1, 67, 65, 67, 1, 71, 1, 73, 73, 73, 73, 77, 1, 79, 79, 81, 1, 83, 81, 85, 85, 87, 1, 89, 73
Offset: 1

Views

Author

Antti Karttunen, Sep 09 2018

Keywords

Comments

a(n) = n-1 for n in A209211.

Crossrefs

Programs

  • Mathematica
    Array[# - GCD[# - 1, EulerPhi[#]] &, 100] (* Alonso del Arte, Sep 09 2018 *)
  • PARI
    A318827(n) = (n-gcd(eulerphi(n), n-1));

Formula

a(n) = n - A049559(n) = n - gcd(n - 1, phi(n)).
a(n) = A051953(n) + A318830(n).
a(p) = 1 for p prime.