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

A040098 Primes p such that x^4 = 2 has a solution mod p.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

For a prime p congruent to 1 mod 8, 2 is a biquadratic residue mod p if and only if there are integers x,y such that x^2 + 64*y^2 = p. 2 is also a biquadratic residue mod 2 and mod p for any prime p congruent to 7 mod 8 and for no other primes. - Fred W. Helenius (fredh(AT)ix.netcom.com), Dec 30 2004
Complement of A040100 relative to A000040. - Vincenzo Librandi, Sep 13 2012

Crossrefs

For primes p such that x^m == 2 mod p has a solution for m = 2,3,4,5,6,7,... see A038873, A040028, A040098, A040159, A040992, A042966, ...

Programs

  • Magma
    [ p: p in PrimesUpTo(919) | exists(t){x : x in ResidueClassRing(p) | x^4 eq 2} ]; // Klaus Brockhaus, Dec 02 2008
    
  • Mathematica
    ok[p_] := Reduce[ Mod[x^4 - 2, p] == 0, x, Integers] =!= False; Select[ Prime[ Range[200]], ok] (* Jean-François Alcover, Dec 14 2011 *)
  • PARI
    forprime(p=2,2000,if([]~!=polrootsmod(x^4-2,p),print1(p,", ")));print(); \\ Joerg Arndt, Jul 27 2011

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

Original entry on oeis.org

17, 41, 97, 137, 193, 241, 313, 401, 409, 433, 449, 457, 521, 569, 641, 673, 761, 769, 809, 857, 929, 953, 977, 1009, 1129, 1297, 1321, 1361, 1409, 1489, 1657, 1697, 1873, 1993, 2017, 2081, 2137, 2153, 2161, 2297, 2377, 2417, 2521, 2609, 2617, 2633, 2713
Offset: 1

Views

Author

Klaus Brockhaus, Apr 29 2002

Keywords

Comments

Complement of A014754 with regard to primes of the form 8*k+1.
These appear to be the primes p for which 4^((p-1)*n/8) mod p = (p-2)*( n mod 2)+1. For example, 4^(5*n) mod 41 = 1,40,1,40,1,40...= 39*(n mod 2)+1 and 4^(30*n) mod 241 = 1,240,1,240,1,240...= 239*(n mod 2) +1. - Gary Detlefs, Jul 06 2014
Primes p == 1 mod 8 such that 2^((p-1)/4) == -1 mod p. - Robert Israel, Jul 06 2014
A very similar sequence is A293394. - Jonas Kaiser, Nov 08 2017

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(3000) | not exists{x: x in ResidueClassRing(p) | x^4 eq 2} and exists{x: x in ResidueClassRing(p) | x^2 eq 2}]; // Vincenzo Librandi, Sep 21 2012
  • Maple
    select(p -> isprime(p) and 2 &^((p-1)/4) mod p = p-1, [8*k+1$k=1..10000]); # Robert Israel, Jul 06 2014
  • PARI
    forprime(p=2,2720,x=0; while(x
    				
  • PARI
    {a(n) = local(m, c, x); if( n<1, 0, c = 0; m = 1; while( cMichael Somos, Mar 22 2008 */
    
  • 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,2,2^2),print1(p,", ")));
    /* Joerg Arndt, Sep 21 2012 */
    
  • PARI
    is(n)=n%8==1 && Mod(2,n)^(n\4)==-1 && isprime(n) \\ Charles R Greathouse IV, Nov 10 2017
    

Formula

Primes of the form 8*k + 1 but not x^2 + 64*y^2. - Michael Somos, Mar 22 2008
a(n) ~ 8n log n. - Charles R Greathouse IV, Nov 10 2017
Showing 1-2 of 2 results.