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.

A215486 n - 1 mod phi(n), where phi(n) is Euler's totient function.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 3, 2, 1, 0, 3, 0, 1, 6, 7, 0, 5, 0, 3, 8, 1, 0, 7, 4, 1, 8, 3, 0, 5, 0, 15, 12, 1, 10, 11, 0, 1, 14, 7, 0, 5, 0, 3, 20, 1, 0, 15, 6, 9, 18, 3, 0, 17, 14, 7, 20, 1, 0, 11, 0, 1, 26, 31, 16, 5, 0, 3, 24, 21, 0, 23, 0, 1, 34, 3, 16, 5, 0, 15, 26, 1, 0, 11, 20, 1, 30, 7, 0, 17
Offset: 1

Views

Author

Alonso del Arte, Feb 17 2013, based on an idea from Balarka Sen

Keywords

Comments

Lehmer conjectured that a(n) = 0 only when n is 1 or prime.

Examples

			a(8) = 3 because 8 - 1 mod phi(8) = 3.
a(9) = 2 because 9 - 1 mod phi(9) = 2.
a(10) = 1 because 10 - 1 mod phi(10) = 1.
		

Crossrefs

Programs

  • Magma
    [(n-1) mod EulerPhi(n): n in [2..90]]; // Bruno Berselli, Feb 18 2013
    
  • Mathematica
    Table[Mod[n - 1, EulerPhi[n]], {n, 2, 100}]
  • Maxima
    makelist(mod(n-1,totient(n)), n, 2, 90); /* Bruno Berselli, Feb 18 2013 */
    
  • PARI
    a(n)=(n-1)%eulerphi(n) \\ Charles R Greathouse IV, Dec 29 2013