OFFSET
1,1
COMMENTS
For prime(k)^prime(k+1) == prime(k+2) (mod prime(k+3)), the first two examples are k = 942 and k = 4658911.
EXAMPLE
Primes number 52 to 55 are 239, 241, 251, 257, and 239^241 == 257 == 6 (mod 251), so 52 is in the sequence.
MAPLE
q:= 2: r:= 3: s:= 5: R:= NULL: count:= 0:
for k from 1 while count < 6 do
p:= q; q:= r; r:= s; s:= nextprime(s);
if p &^ q - s mod r = 0 then count:= count+1; R:= R, k fi
od:
R;
PROG
(Python)
from sympy import nextprime
k, p, q, r, s, A340868_list = 1, 2, 3, 5, 7, []
while k < 10**7:
if pow(p, q, r) == s % r:
A340868_list.append(k)
k, p, q, r, s = k+1, q, r, s, nextprime(s) # Chai Wah Wu, Jan 25 2021
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Jan 24 2021
STATUS
approved