OFFSET
1,1
COMMENTS
a(n) = 1 if and only if prime(n) and prime(n+1) are twin prime pair (that is, prime(n+1) = 2 + prime(n)).
MATHEMATICA
Table[Mod[Prime[n]^2, Prime[n] + Prime[n + 1]], {n, 200}]
PowerMod[#[[1]], 2, Total[#]]&/@Partition[Prime[Range[80]], 2, 1] (* Harvey P. Dale, Dec 26 2017 *)
PROG
(PARI) for(n=1, 200, print1(prime(n)^2%(prime(n)+prime(n+1))", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 18 2013
STATUS
approved