OFFSET
1,2
COMMENTS
If p is a Wieferich prime, then a(p) = 1, that is, a(A001220(n)) = 1.
a(n) = 0 iff n = 1 or n = 2^k (k >= 3).
a(n) = 1 iff n is either a Wieferich prime or a Wieferich pseudoprime (i.e. a composite c such that c-1 is in A240719). - Felix Fröhlich, Jul 11 2014
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
a(7) = 2^(7-1) mod 7^2 = 64 mod 49 = 15.
MATHEMATICA
Table[PowerMod[2, n - 1, n^2], {n, 100}] (* T. D. Noe, Dec 17 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Franz Vrabec, Dec 17 2012
STATUS
approved