OFFSET
1,3
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A066838(n) modulo n. - Michel Marcus, May 20 2014
a(prime(n)) = A062347(n-1). - Michel Marcus, May 20 2014
EXAMPLE
a(8) = (3 * 5 * 7) (mod 8) = 1 because 3, 5 and 7 are the primes < 8 that do not divide 8.
PROG
(PARI) a(n) = prod(i=1, n-1, if (isprime(i) && (n%i) , i, 1)) % n; \\ Michel Marcus, May 20 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Leroy Quet, Jan 22 2002
STATUS
approved