A360761 Primes p that divide both 3^k-2 and 5^k-1 for some k.
31, 601, 2593, 20478961, 204700049, 668731841
Offset: 1
Examples
a(3) = 2593 is a term because 2593 is prime, 3^64 == 2 (mod 2593) and 5^64 == 1 (mod 2593).
Crossrefs
Cf. A070677.
Programs
-
Maple
R:= NULL: count:= 0: p:= 5: with(numtheory): while count < 4 do p:= nextprime(p); if mlog(2,3 &^ order(5,p) mod p, p) <> FAIL then R:= R,p; count:= count+1 fi od: R;
-
Python
from itertools import islice from sympy import discrete_log, nextprime, n_order def A360761_gen(): # generator of terms p = 5 while True: try: discrete_log(p:=nextprime(p),2,pow(3,n_order(5,p),p)) except: continue yield p A360761_list = list(islice(A360761_gen(),4)) # Chai Wah Wu, Feb 23 2023
Extensions
a(5)-a(6) from Chai Wah Wu, Feb 23 2023
Comments