OFFSET
1,8
COMMENTS
Lehmer conjectured that a(n) = 0 only when n is 1 or prime.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Wikipedia, Lehmer's totient problem
EXAMPLE
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.
MATHEMATICA
Table[Mod[n - 1, EulerPhi[n]], {n, 2, 100}]
PROG
(Magma) [(n-1) mod EulerPhi(n): n in [2..90]]; // Bruno Berselli, Feb 18 2013
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alonso del Arte, Feb 17 2013, based on an idea from Balarka Sen.
STATUS
approved