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.

Original entry on oeis.org

31, 601, 2593, 20478961, 204700049, 668731841
Offset: 1

Views

Author

Robert Israel, Feb 19 2023

Keywords

Comments

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).
Primes p such that the equation 3^(x*A070677(p)) == 2 (mod p) has a solution.
Values of k: 24, 108, 64, 376020, 67141466, 487515840, ... - Chai Wah Wu, Feb 24 2023

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