OFFSET
1,2
COMMENTS
Related to the Agoh-Giuga conjecture (called Agoh's conjecture by Borwein, Borwein, Borwein and Girgensohn) which states that a positive integer k is prime if and only if k*B_(k-1) == -1 (mod k) (see Wikipedia and Borwein, Borwein, Borwein, Girgensohn, 1996, open problem 10).
Up to p = 101839, there are only two primes p such that a(n) = 0, namely 2 and 1277, i.e., a(1) = 0 and a(206) = 0. Do any other such primes exist?
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..1000
D. Borwein, J. M. Borwein, P. B. Borwein and R. Girgensohn, Giuga's conjecture on primality, The American Mathematical Monthly, Vol. 103, No. 1 (1996), 40-50.
Wikipedia, Agoh-Giuga conjecture
PROG
(PARI) a(n) = my(p=prime(n)); lift(Mod(p*bernfrac(p-1)+1, p^2))
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Jan 24 2016
STATUS
approved