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.

A049595 Primes p such that x^63 = 2 has a solution mod p.

Original entry on oeis.org

2, 3, 5, 11, 17, 23, 31, 41, 47, 53, 59, 83, 89, 101, 107, 131, 137, 149, 157, 167, 173, 179, 191, 223, 227, 229, 233, 251, 257, 263, 269, 277, 283, 293, 311, 317, 347, 353, 359, 383, 389, 397, 401, 419, 431, 439, 443, 457, 461, 467, 479, 499, 503, 509, 521
Offset: 1

Views

Author

Keywords

Comments

Complement of A059647 relative to A000040. - Vincenzo Librandi, Sep 15 2012

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(600) | exists(t){x : x in ResidueClassRing(p) | x^63 eq 2}]; // Vincenzo Librandi, Sep 15 2012
    
  • Maple
    select(p -> isprime(p) and nops([msolve(x^63-2,p)])>0, [2,seq(2*i+1,i=1..1000)]); # Robert Israel, Nov 03 2014
  • Mathematica
    ok[p_]:= Reduce[Mod[x^63 - 2, p] == 0, x, Integers] =!= False; Select[Prime[Range[150]], ok] (* Vincenzo Librandi, Sep 15 2012 *)
  • PARI
    N=10^4;
    ok(p, r, k)={ return ( (p==r) || (Mod(r,p)^((p-1)/gcd(k,p-1))==1) ); }
    forprime(p=2,N, if (ok(p,2,63),print1(p,", ")));
    /* Joerg Arndt, Sep 21 2012 */
    
  • Python
    from itertools import islice
    from sympy import nextprime, is_nthpow_residue
    def A049595_gen(startvalue=2): # generator of terms >= startvalue
        p = max(startvalue-1,1)
        while (p:=nextprime(p)):
            if is_nthpow_residue(2,63,p):
                yield p
    A049595_list = list(islice(A049595_gen(),20)) # Chai Wah Wu, May 06 2024