OFFSET
1,2
COMMENTS
The prime k-tuples conjecture implies that there are infinitely many k for which prime(k) to prime(k+3) are of the form p-32, p-2, p, p+4, and then (p-2)^(p+4) == (-2)^5 == p-32 (mod p).
LINKS
Robert Israel, Table of n, a(n) for n = 1..5000
EXAMPLE
Prime(4) to prime(7) are 7, 11, 13, 17, and 11^17 == 7 (mod 13), so a(3)=4 is in the sequence.
MAPLE
q:= 2: r:= 3: s:= 5: R:= NULL: count:= 0:
for k from 1 while count < 100 do
p:= q; q:= r; r:= s; s:= nextprime(s);
if q&^s - p mod r = 0 then count:= count+1; R:= R, k; fi
od:
R;
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jan 26 2021
STATUS
approved