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-7 of 7 results.

A045316 Primes p such that x^8 = 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, 269, 277, 281, 283, 293, 307, 313, 317, 331, 347, 349, 353, 373, 379, 389
Offset: 1

Views

Author

Keywords

Comments

Complement of A045315 relative to A000040. Coincides for the first 140 terms with the sequence of primes p such that x^16 = 2 has no solution mod p (first divergence is at 1217, cf. A059287). - Klaus Brockhaus, Jan 26 2001
Differs from A059349 (x^32 == 2 (mod p) has no solution) first at a(37) = A059349(38), the term A059349(37) = 257 which is not in this sequence. See A070184 for all such terms. - M. F. Hasler, Jun 21 2024

Crossrefs

Cf. A000040, A045315 (complement in the primes), A059287.
Subsequence of A059349 (same with x^32), complement is A070184.

Programs

  • Magma
    [p: p in PrimesUpTo(500) | not exists{x : x in ResidueClassRing(p) | x^8 eq 2} ]; // Vincenzo Librandi, Sep 19 2012
    
  • Mathematica
    ok[p_]:= Reduce[Mod[x^8 - 2, p] == 0, x, Integers] == False; Select[Prime[Range[200]], ok] (* Vincenzo Librandi, Sep 19 2012 *)
  • PARI
    select( {is_A045316(p)=Mod(2,p)^(p\gcd(8,p-1))!=1 && p>2}, primes(199)) \\ Append "&& isprime(p)" if that's not known. - M. F. Hasler, Jun 22 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  *)

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

Original entry on oeis.org

3943, 5347, 11287, 12853, 14149, 17659, 20143, 21061, 21277, 23059, 23599, 25759, 26407, 26731, 29863, 32833, 33751, 35803, 37747, 38287, 39367, 39799, 46441, 47737, 47791, 54919, 57781, 59887, 61291, 62047, 63127, 65557, 68311, 71443, 73063, 75169, 78301, 79273, 82351, 84457, 84673, 86077, 88129, 90289
Offset: 1

Views

Author

Klaus Brockhaus, Apr 29 2002

Keywords

Crossrefs

Programs

  • PARI
    forprime(p=2,72000,x=0; while(x
    				
  • PARI
    N=10^6;  default(primelimit,N);
    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,N, if (ok(p,2,9,9^2),print1(p,", ")));
    /* Joerg Arndt, Sep 21 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

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

Original entry on oeis.org

17, 41, 137, 401, 433, 449, 457, 521, 569, 641, 761, 809, 857, 919, 929, 953, 977, 1361, 1409, 1423, 1657, 1697, 1999, 2017, 2081, 2143, 2153, 2287, 2297, 2417, 2609, 2633, 2729, 2753, 2777, 2791, 2801, 2897, 2953, 3041, 3209, 3329, 3457, 3593, 3617
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^36 eq 2} and exists{x: x in ResidueClassRing(p) | x^6 eq 2}]; // Vincenzo Librandi, Sep 21 2012
    
  • Maple
    select(p -> isprime(p) and [msolve(x^6=2,p)]<>[] and [msolve(x^36=2,p)]=[] , [seq(i,i=3..10^4,2)]); # Robert Israel, May 13 2018
  • PARI
    forprime(p=2,3700,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^4, if (ok(p,2,6,6^2),print1(p,", ")));
    /* Joerg Arndt, Sep 21 2012 */
    
  • Python
    from itertools import count, islice
    from sympy import nextprime, is_nthpow_residue
    def A070183_gen(startvalue=2): # generator of terms >= startvalue
        p = max(nextprime(startvalue-1),2)
        while True:
            if is_nthpow_residue(2,6,p) and not is_nthpow_residue(2,36,p):
                yield p
            p = nextprime(p)
    A070183_list = list(islice(A070183_gen(),20)) # Chai Wah Wu, May 02 2024

A252279 Primes p congruent to 1 mod 16 such that x^8 = 2 has a solution mod p.

Original entry on oeis.org

257, 337, 881, 1217, 1249, 1553, 1777, 2113, 2593, 2657, 2833, 4049, 4177, 4273, 4481, 4513, 4721, 4993, 5297, 6353, 6449, 6481, 6529, 6689, 7121, 7489, 8081, 8609, 9137, 9281, 9649, 10177, 10337, 10369, 10433, 10657, 11329, 11617, 11633, 12049, 12241, 12577
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 16 2014

Keywords

Comments

For a prime p congruent to 1 mod 16, the number 2 is an octavic residue mod p if and only if there are integers x and y such that x^2 + 256*y^2 = p.

Crossrefs

Subsequence of A045315.
Has A070184 as a subsequence.

Programs

  • Magma
    [p: p in PrimesUpTo(12577) | p mod 16 eq 1 and exists(t){x : x in ResidueClassRing(p) | x^8 eq 2}]; // Arkadiusz Wesolowski, Dec 19 2020
    
  • PARI
    isok(p) = isprime(p) && (Mod(p, 16) == 1) && ispower(Mod(2, p), 8); \\ Michel Marcus, Dec 19 2020

A373468 Primes such that x^16 = 2 has a solution in Z/pZ, but x^32 = 2 does not.

Original entry on oeis.org

257, 2113, 2657, 7489, 10177, 15073, 18593, 23041, 25121, 25409, 25537, 25793, 27809, 30881, 30977, 32321, 37409, 38273, 41729, 43649, 51137, 51361, 54721, 59809, 63841, 67073, 67489, 75553, 77569, 83009, 86561, 92641, 94049, 94433, 95713, 101281, 102241
Offset: 1

Views

Author

M. F. Hasler, Jun 22 2024

Keywords

Examples

			For p = 257, the equation x^16 = 2 has solutions 27, 41, 54, ... in Z/pZ, but x^32 can only be 0, +-1, +-4, +-16, +-64 (mod p).
		

Crossrefs

Cf. A059287 (similar for x^8 vs x^16).
Subsequence of A070184 which is a subsequence of A252279.

Programs

  • PARI
    select( {is_A373468(p)=Mod(2,p)^(p\gcd(16,p-1))==1&&Mod(2,p)^(p\gcd(32,p-1))!=1}, primes(19999))
    
  • Python
    from itertools import islice
    from sympy import nextprime, is_nthpow_residue
    def A373468_gen(startvalue=2): # generator of terms >= startvalue
        p = max(1,startvalue-1)
        while (p:=nextprime(p)):
            if is_nthpow_residue(2,16,p) and not is_nthpow_residue(2,32,p):
                yield p
    A373468_list = list(islice(A373468_gen(),10)) # Chai Wah Wu, Jun 23 2024
Showing 1-7 of 7 results.