OFFSET
1,9
COMMENTS
By Lehmer's Conjecture, when n > 2 then a(n) = 1 if and only if n is prime. The Notices article states "Lehmer's Conjecture (1932). phi(n) | (n-1) if and only if n is prime." - Michael Somos, Oct 14 2011
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
D. H. Bailey and J. M. Borwein, Exploratory Experimentation and Computation, Notices of A. M. S. 58 (2011) 1410-1419, see p. 1416.
FORMULA
b^(n - a(n)) == 1 (mod n) for every b coprime to n. - Thomas Ordowski, Jun 30 2017
MATHEMATICA
Table[Mod[n, EulerPhi[n]], {n, 100}] (* Alonso del Arte, Feb 15 2013 *)
PROG
(PARI) for(n=1, 150, print1(n%eulerphi(n), ", "))
(PARI) {a(n) = n % eulerphi(n)}; /* Michael Somos, Oct 14 2011 */
(Haskell)
a068494 n = mod n $ a000010 n -- Reinhard Zumkeller, Oct 14 2011
(Magma) [n mod EulerPhi(n): n in [1..100]]; // Vincenzo Librandi, Jul 19 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Mar 11 2002
STATUS
approved
