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
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, ...
-
[ p: p in PrimesUpTo(919) | exists(t){x : x in ResidueClassRing(p) | x^4 eq 2} ]; // Klaus Brockhaus, Dec 02 2008
-
ok[p_] := Reduce[ Mod[x^4 - 2, p] == 0, x, Integers] =!= False; Select[ Prime[ Range[200]], ok] (* Jean-François Alcover, Dec 14 2011 *)
-
forprime(p=2,2000,if([]~!=polrootsmod(x^4-2,p),print1(p,", ")));print(); \\ Joerg Arndt, Jul 27 2011
A028884
a(n) = (n + 3)^2 - 8.
Original entry on oeis.org
1, 8, 17, 28, 41, 56, 73, 92, 113, 136, 161, 188, 217, 248, 281, 316, 353, 392, 433, 476, 521, 568, 617, 668, 721, 776, 833, 892, 953, 1016, 1081, 1148, 1217, 1288, 1361, 1436, 1513, 1592, 1673, 1756, 1841, 1928, 2017, 2108, 2201, 2296, 2393
Offset: 0
From _Stefano Spezia_, Nov 08 2022: (Start)
Illustrations for n = 0..4:
* * * * * * * * *
a(0) = 1 * * * *
* * * * * *
a(1) = 8 * *
* * * * *
a(2) = 17
.
* * * * * * * * * * * * * * * *
* * * *
* * * * * * * * *
* * * *
* * * * * * * * *
* * * *
* * * * * * * * * * * *
a(3) = 28 * *
* * * * * * * * *
a(4) = 41
(End)
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
-
[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
-
select(p -> isprime(p) and 2 &^((p-1)/4) mod p = p-1, [8*k+1$k=1..10000]); # Robert Israel, Jul 06 2014
-
forprime(p=2,2720,x=0; while(x
-
{a(n) = local(m, c, x); if( n<1, 0, c = 0; m = 1; while( cMichael Somos, Mar 22 2008 */
-
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 */
-
is(n)=n%8==1 && Mod(2,n)^(n\4)==-1 && isprime(n) \\ Charles R Greathouse IV, Nov 10 2017
A035251
Positive numbers of the form x^2 - 2y^2 with integers x, y.
Original entry on oeis.org
1, 2, 4, 7, 8, 9, 14, 16, 17, 18, 23, 25, 28, 31, 32, 34, 36, 41, 46, 47, 49, 50, 56, 62, 63, 64, 68, 71, 72, 73, 79, 81, 82, 89, 92, 94, 97, 98, 100, 103, 112, 113, 119, 121, 124, 126, 127, 128, 136, 137, 142, 144, 146, 151, 153, 158, 161, 162, 164, 167, 169, 175, 178
Offset: 1
The (x,y) pairs, with minimum x, that solve the equation are (1,0), (2,1), (2,0), (3,1), (4,2), (3,0), (4,1), (4,0), (5,2), (6,3), (5,1), (5,0), (6,2), (7,3), (8,4), (6,1), (6,0), (7,2), (8,3), (7,1), (7,0), (10,5), (8,2), ... If the positive number is a perfect square, y=0 yields a trivial solution. - _R. J. Mathar_, Sep 10 2016
- T. D. Noe, Table of n, a(n) for n = 1..1000
- K. Matthews, Thue's theorem and the diophantine equation x^2-D*y^2=+-N, Math. Comp. 71 (239) (2002) 1281-1286.
- K. Matthews, Solving the diophantine equation x^2-D*y^2=N, D>0, (2016).
- Sci.math, General Pell equation: x^2 - N*y^2 = D, 1998
- Sci.math, General Pell equation: x^2 - N*y^2 = D, 1998 [Edited and cached copy]
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
-
filter:= proc(n) local F;
F:= select(t -> t[1] mod 8 = 3 or t[1] mod 8 = 5, ifactors(n)[2]);
map(t -> t[2],F)::list(even);
end proc:
select(filter, [$1..1000]); # Robert Israel, Dec 01 2015
-
Reap[For[n = 1, n < 200, n++, r = Reduce[x^2 - 2 y^2 == n, {x, y}, Integers]; If[r =!= False, Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 31 2016 *)
-
select(x -> x, direuler(p=2,201,1/(1-(kronecker(2,p)*(X-X^2))-X)), 1) \\ Fixed by Andrey Zabolotskiy, Jul 30 2020
-
{a(n) = my(m, c); if( n<1, 0, c=0; m=0; while( cMichael Somos, Aug 17 2006 */
-
is(n)=#bnfisintnorm(bnfinit(z^2-2),n) \\ Ralf Stephan, Oct 14 2013
-
from itertools import count, islice
from sympy import factorint
def A035251_gen(): # generator of terms
return filter(lambda n:all(not((2 < p & 7 < 7) and e & 1) for p, e in factorint(n).items()),count(1))
A035251_list = list(islice(A035251_gen(),30)) # Chai Wah Wu, Jun 28 2022
Better description from Sharon Sela (sharonsela(AT)hotmail.com), Mar 10 2002
A045331
Primes congruent to {1, 2, 3} mod 6; or, -3 is a square mod p.
Original entry on oeis.org
2, 3, 7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97, 103, 109, 127, 139, 151, 157, 163, 181, 193, 199, 211, 223, 229, 241, 271, 277, 283, 307, 313, 331, 337, 349, 367, 373, 379, 397, 409, 421, 433, 439, 457, 463, 487, 499, 523, 541, 547, 571, 577, 601, 607, 613
Offset: 1
Apart from initial term, same as
A007645; apart from initial two terms, same as
A002476.
-
a045331 n = a045331_list !! (n-1)
a045331_list = filter ((< 4) . (`mod` 6)) a000040_list
-- Reinhard Zumkeller, Jan 15 2013
-
[p: p in PrimesUpTo(700) | p mod 6 in [1, 2, 3]]; // Vincenzo Librandi, Aug 08 2012
-
Select[Prime[Range[200]],MemberQ[{1,2,3},Mod[#,6]]&] (* Harvey P. Dale, Mar 31 2011 *)
Join[{2,3},Select[Range[7,10^3,6],PrimeQ]] (* Zak Seidov, May 20 2011 *)
-
select(n->n%6<5,primes(100)) \\ Charles R Greathouse IV, May 20 2011
A040159
Primes p such that x^5 = 2 has a solution mod p.
Original entry on oeis.org
2, 3, 5, 7, 13, 17, 19, 23, 29, 37, 43, 47, 53, 59, 67, 73, 79, 83, 89, 97, 103, 107, 109, 113, 127, 137, 139, 149, 151, 157, 163, 167, 173, 179, 193, 197, 199, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 277, 283, 293, 307, 313, 317, 337, 347, 349, 353
Offset: 1
Has same beginning as
A042991 but is strictly different.
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, ...
-
[p: p in PrimesUpTo(400) | exists{x: x in ResidueClassRing(p) | x^5 eq 2}]; // Bruno Berselli, Sep 12 2012
-
ok [p_]:=Reduce[Mod[x^5- 2, p]== 0, x, Integers]=!= False; Select[Prime[Range[180]], ok] (* Vincenzo Librandi, Sep 12 2012 *)
A025021
Numbers whose least quadratic nonresidue (A020649) is 3.
Original entry on oeis.org
7, 14, 17, 31, 34, 41, 49, 62, 79, 82, 89, 98, 103, 113, 119, 127, 137, 151, 158, 161, 178, 199, 206, 217, 223, 226, 233, 238, 254, 257, 271, 274, 281, 287, 289, 302, 322, 329, 343, 353, 367, 391, 398, 401, 434, 439, 446, 449, 463, 466, 487, 497, 511, 514, 521, 527, 542
Offset: 1
-
select(t -> numtheory:-quadres(2,t) = 1 and numtheory:-quadres(3,t)=-1, [$1..1000]); # Robert Israel, Jul 19 2017
-
Select[Range[500], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 3 &] (* Amiram Eldar, Oct 31 2020 *)
-
residue(n,m)={local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r}
isA025021(n)=residue(2,n) && !residue(3,n) \\ Michael B. Porter, Apr 18 2010
A038874
Primes p such that 3 is a square mod p.
Original entry on oeis.org
2, 3, 11, 13, 23, 37, 47, 59, 61, 71, 73, 83, 97, 107, 109, 131, 157, 167, 179, 181, 191, 193, 227, 229, 239, 241, 251, 263, 277, 311, 313, 337, 347, 349, 359, 373, 383, 397, 409, 419, 421, 431, 433, 443, 457, 467, 479, 491, 503, 541, 563, 577, 587, 599, 601
Offset: 1
11 is in the sequence since the equation x^2 - 11y = 3 has solutions, such as x = 5, y = 2.
13 is in the sequence since the equation x^2 - 13y = 3 has solutions, such as x = 4, y = 1.
17 is not in the sequence because x^2 - 17y = 3 has no solutions in integers; Legendre(3, 17) = -1.
- Ethan D. Bolker, Elementary Number Theory: An Algebraic Approach. Mineola, New York: Dover Publications (1969, reprinted 2007): p. 74, Theorem 25.3.
If the first two terms are omitted we get
A097933.
A040101 is another sequence.
-
[p: p in PrimesUpTo(1200) | p mod 12 in [1, 2, 3, 11]]; // Vincenzo Librandi, Aug 08 2012
-
select(isprime, [2,3, seq(seq(6+s+12*i, s=[-5,5]),i=0..1000)]); # Robert Israel, Dec 23 2015
-
Select[Prime[Range[250]], MemberQ[{1, 2, 3, 11}, Mod[#, 12]] &] (* Vincenzo Librandi, Aug 08 2012 *)
Select[Flatten[Join[{2, 3}, Table[{12n - 1, 12n + 1}, {n, 50}]]], PrimeQ] (* Alonso del Arte, Nov 25 2015 *)
-
forprime(p=2, 1e3, if(issquare(Mod(3, p)), print1(p , ", "))) \\ Altug Alkan, Dec 04 2015
A040992
Primes p such that x^6 = 2 has a solution mod p.
Original entry on oeis.org
2, 17, 23, 31, 41, 47, 71, 89, 113, 127, 137, 167, 191, 223, 233, 239, 257, 263, 281, 311, 353, 359, 383, 401, 431, 433, 439, 449, 457, 479, 503, 521, 569, 593, 599, 601, 617, 641, 647, 719, 727, 743, 761, 809, 839, 857, 863, 881, 887, 911, 919, 929, 953
Offset: 1
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, ...
-
[p: p in PrimesUpTo(1000) | exists(t){x : x in ResidueClassRing(p) | x^6 eq 2}]; // Vincenzo Librandi, Sep 13 2012
-
ok[p_]:= Reduce[Mod[x^6- 2, p] == 0, x, Integers]=!=False; Select[Prime[Range[200]], ok] (* Vincenzo Librandi, Sep 13 2012 *)
-
forprime(p=2,2000,if([]~!=polrootsmod(x^6-2,p),print1(p,", ")));print();
/* Joerg Arndt, Jul 27 2011 */
A042966
Primes p such that x^7 = 2 has a solution mod p.
Original entry on oeis.org
2, 3, 5, 7, 11, 13, 17, 19, 23, 31, 37, 41, 47, 53, 59, 61, 67, 73, 79, 83, 89, 97, 101, 103, 107, 109, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 199, 223, 227, 229, 233, 241, 251, 257, 263, 269, 271, 277, 283, 293, 307, 311, 313, 317, 331
Offset: 1
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, ...
-
[p: p in PrimesUpTo(400) | exists{x: x in ResidueClassRing(p) | x^7 eq 2}]; // Bruno Berselli, Sep 12 2012
-
ok[p_]:= Reduce[Mod[x^7 - 2, p] == 0, x, Integers]=!=False; Select[Prime[Range[100]], ok] (* Vincenzo Librandi, Sep 13 2012 *)
Comments