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.

Showing 1-5 of 5 results.

A045315 Primes p such that x^8 = 2 has a solution mod p.

Original entry on oeis.org

2, 7, 23, 31, 47, 71, 73, 79, 89, 103, 127, 151, 167, 191, 199, 223, 233, 239, 257, 263, 271, 311, 337, 359, 367, 383, 431, 439, 463, 479, 487, 503, 599, 601, 607, 631, 647, 719, 727, 743, 751, 823, 839, 863, 881, 887, 911, 919, 937, 967, 983, 991, 1031, 1039
Offset: 1

Views

Author

Keywords

Comments

Coincides with the sequence of "primes p such that x^16 = 2 has a solution mod p" for first 58 terms (and then diverges).
Complement of A045316 relative to A000040. - Vincenzo Librandi, Sep 13 2012

References

  • A. Aigner, Kriterien zum 8. und 16. Potenzcharakter der Reste 2 und -2, Deutsche Math. 4 (1939), 44-52; FdM 65 - I (1939), 112.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1100) | exists(t){x : x in ResidueClassRing(p) | x^8 eq 2}]; // Vincenzo Librandi, Sep 13 2012
    
  • Mathematica
    ok[p_] := Reduce[ Mod[x^8-2, p] == 0, x, Integers] =!= False; Select[ Prime[ Range[200] ], ok] (* Jean-François Alcover, Nov 28 2011 *)
  • PARI
    is(n)=isprime(n) && ispower(Mod(2,n),8) \\ Charles R Greathouse IV, Feb 08 2017

A070184 Primes p such that x^8 = 2 has a solution mod p, but x^(8^2) = 2 has no solution mod p.

Original entry on oeis.org

257, 1217, 1249, 1553, 1777, 2113, 2657, 2833, 4049, 4273, 4481, 4993, 5297, 6449, 6481, 6689, 7121, 7489, 8081, 8609, 9137, 9281, 9649, 10177, 10337, 10369, 10433, 11329, 11617, 11633, 12241, 12577, 13121, 13441, 13633, 14321, 14753, 15073, 15121, 15569, 16417, 16433, 16673, 17137
Offset: 1

Views

Author

Klaus Brockhaus, Apr 29 2002

Keywords

Comments

Is this the same as "x^8 = 2 (mod p) has a solution but x^32 = 2 (mod p) doesn't"? It appears that this sequence is exactly the complement of A045316 in A059349. - M. F. Hasler, Jun 21 2024

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(15000) | not exists{x: x in ResidueClassRing(p) | x^64 eq 2} and exists{x: x in ResidueClassRing(p) | x^8 eq 2}]; // Vincenzo Librandi, Sep 21 2012
    
  • PARI
    ok(p, r, k1, k2)={
        if (  Mod(r,p)^((p-1)/gcd(k1,p-1))!=1, return(0) );
        if (  Mod(r,p)^((p-1)/gcd(k2,p-1))==1, return(0) );
        return(1);
    }
    forprime(p=2,10^5, if (ok(p,2,8,8^2),print1(p,", ")));
    /* Joerg Arndt, Sep 21 2012 */
    
  • PARI
    select( {is_A070184(p)=Mod(2,p)^(p\gcd(8,p-1))==1 && Mod(2,p)^(p\gcd(64,p-1))!=1 && isprime(p)}, primes(1999)) \\ The only composite numbers that would pass the test without isprime are A242880. - M. F. Hasler, Jun 22 2024
    
  • Python
    from itertools import islice
    from sympy import is_nthpow_residue, nextprime
    def A070184_gen(startvalue=2): # generator of terms >= startvalue
        p = max(1,startvalue-1)
        while (p:=nextprime(p)):
            if is_nthpow_residue(2,8,p) and not is_nthpow_residue(2,64,p):
                yield p
    A070184_list = list(islice(A070184_gen(),10)) # Chai Wah Wu, Jun 23 2024

A059349 Primes p such that x^32 = 2 has no solution mod p.

Original entry on oeis.org

3, 5, 11, 13, 17, 19, 29, 37, 41, 43, 53, 59, 61, 67, 83, 97, 101, 107, 109, 113, 131, 137, 139, 149, 157, 163, 173, 179, 181, 193, 197, 211, 227, 229, 241, 251, 257, 269, 277, 281, 283, 293, 307, 313, 317, 331, 347, 349, 353, 373, 379, 389, 397, 401, 409, 419
Offset: 1

Views

Author

Klaus Brockhaus, Jan 27 2001

Keywords

Comments

Complement of A049564 relative to A000040.
Differs from A014662 first at p=6529, then at p=21569. [R. J. Mathar, Oct 05 2008]
Differs from A045316 (x^8 == 2 (mod p) has no solution) first at a(37) = 257 which is not a term of A045316. See A070184 for all such terms. - M. F. Hasler, Jun 21 2024

Crossrefs

Cf. A070184 = (this sequence) \ A045316.

Programs

  • Magma
    [p: p in PrimesUpTo(450) | not exists{x : x in ResidueClassRing(p) | x^32 eq 2 }]; // Vincenzo Librandi, Sep 20 2012
  • Mathematica
    ok[p_] := Reduce[Mod[x^32 - 2, p] == 0, x, Integers] == False; Select[Prime[Range[100]], ok ] (* Vincenzo Librandi, Sep 20 2012  *)

A059287 Primes p such that x^16 = 2 has no solution mod p, but x^8 = 2 has a solution mod p.

Original entry on oeis.org

1217, 1249, 1553, 1777, 2833, 4049, 4273, 4481, 4993, 5297, 6449, 6481, 6689, 7121, 8081, 8609, 9137, 9281, 9649, 10337, 10369, 10433, 11329, 11617, 11633, 12241, 12577, 13121, 13441, 13633, 14321, 14753, 15121, 15569, 16417, 16433, 16673
Offset: 1

Views

Author

Klaus Brockhaus, Jan 25 2001

Keywords

Crossrefs

Cf. A070184 (same with x^64 instead of x^16).

Programs

  • Magma
    [p: p in PrimesUpTo(17000) | not exists{x: x in ResidueClassRing(p) | x^16 eq 2} and exists{x: x in ResidueClassRing(p) | x^8 eq 2}]; // Vincenzo Librandi, Sep 21 2012
    
  • Mathematica
    Select[Prime[Range[PrimePi[20000]]], !MemberQ[PowerMod[Range[#], 16, #], Mod[2, #]] && MemberQ[PowerMod[Range[#], 8, #], Mod[2, #]]&] (* Vincenzo Librandi, Sep 21 2013 *)
  • PARI
    select( {is_A059287(p)=Mod(2,p)^(p\gcd(8,p-1))==1&&Mod(2,p)^(p\gcd(16,p-1))!=1}, primes(1999)) \\ Could any composite number pass this test? - M. F. Hasler, Jun 22 2024
    
  • Python
    from itertools import islice
    from sympy import is_nthpow_residue, nextprime
    def A059287_gen(startvalue=2): # generator of terms >= startvalue
        p = max(1,startvalue-1)
        while (p:=nextprime(p)):
            if is_nthpow_residue(2,8,p) and not is_nthpow_residue(2,16,p):
                yield p
    A059287_list = list(islice(A059287_gen(),10)) # Chai Wah Wu, Jun 23 2024

A070181 Primes p such that x^4 = 2 has a solution mod p, but x^(4^2) = 2 has no solution mod p.

Original entry on oeis.org

113, 281, 353, 577, 593, 617, 1033, 1049, 1097, 1153, 1193, 1201, 1217, 1249, 1481, 1553, 1601, 1753, 1777, 1889, 2129, 2273, 2281, 2393, 2473, 2689, 2833, 2857, 3049, 3089, 3121, 3137, 3217, 3313, 3361, 3529, 3673, 3761, 3833, 4001, 4049, 4153, 4217
Offset: 1

Views

Author

Klaus Brockhaus, Apr 29 2002

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(5000) | not exists{x: x in ResidueClassRing(p) | x^16 eq 2} and exists{x: x in ResidueClassRing(p) | x^4 eq 2}]; // Vincenzo Librandi, Sep 21 2012
    
  • PARI
    forprime(p=2,4250,x=0; while(x
    				
  • PARI
    ok(p, r, k1, k2)={
        if (  Mod(r,p)^((p-1)/gcd(k1,p-1))!=1, return(0) );
        if (  Mod(r,p)^((p-1)/gcd(k2,p-1))==1, return(0) );
        return(1);
    }
    forprime(p=2,10^5, if (ok(p,2,4,4^2),print1(p,", ")));
    /* Joerg Arndt, Sep 21 2012 */
Showing 1-5 of 5 results.