cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A360761 Primes p that divide both 3^k-2 and 5^k-1 for some k.

This page as a plain text file.
%I A360761 #23 Feb 24 2023 19:32:27
%S A360761 31,601,2593,20478961,204700049,668731841
%N A360761 Primes p that divide both 3^k-2 and 5^k-1 for some k.
%C A360761 If prime p divides 3^k-2 and 5^k-1, then p divides 3^j-2 and 5^j-1 for all j such that j == k (mod p-1).
%C A360761 Primes p such that the equation 3^(x*A070677(p)) == 2 (mod p) has a solution.
%C A360761 Values of k: 24, 108, 64, 376020, 67141466, 487515840, ... - _Chai Wah Wu_, Feb 24 2023
%e A360761 a(3) = 2593 is a term because 2593 is prime, 3^64 == 2 (mod 2593) and 5^64 == 1 (mod 2593).
%p A360761 R:= NULL: count:= 0: p:= 5: with(numtheory):
%p A360761 while count < 4 do
%p A360761   p:= nextprime(p);
%p A360761 if  mlog(2,3 &^ order(5,p) mod p, p) <> FAIL then R:= R,p; count:= count+1 fi
%p A360761 od:
%p A360761 R;
%o A360761 (Python)
%o A360761 from itertools import islice
%o A360761 from sympy import discrete_log, nextprime, n_order
%o A360761 def A360761_gen(): # generator of terms
%o A360761     p = 5
%o A360761     while True:
%o A360761         try:
%o A360761             discrete_log(p:=nextprime(p),2,pow(3,n_order(5,p),p))
%o A360761         except:
%o A360761             continue
%o A360761         yield p
%o A360761 A360761_list = list(islice(A360761_gen(),4)) # _Chai Wah Wu_, Feb 23 2023
%Y A360761 Cf. A070677.
%K A360761 nonn,more
%O A360761 1,1
%A A360761 _Robert Israel_, Feb 19 2023
%E A360761 a(5)-a(6) from _Chai Wah Wu_, Feb 23 2023