1,3

Table of n, a(n) for n=1..79.

a(n) = A066838(n) modulo n. - Michel Marcus, May 20 2014

a(prime(n)) = A062347(n-1). - Michel Marcus, May 20 2014

a(8) = (3 * 5 * 7) (mod 8) = 1 because 3, 5 and 7 are the primes < 8 that do not divide 8.

(PARI) a(n) = prod(i=1, n-1, if (isprime(i) && (n%i) , i, 1)) % n; \\ Michel Marcus, May 20 2014

Cf. A062347, A066838.

Sequence in context: A322966 A173239 A214055 * A095195 A229961 A189074

Adjacent sequences: A066906 A066907 A066908 * A066910 A066911 A066912

nonn

Leroy Quet, Jan 22 2002

approved