login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A340868
Numbers k such that prime(k)^prime(k+1) == prime(k+3) (mod prime(k+2)).
2
15, 52, 701, 26017, 579994, 1131833
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
Cf. A340876.
Sequence in context: A332394 A220156 A333617 * A194454 A358398 A372928
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Jan 24 2021
STATUS
approved