Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #15 Oct 31 2020 04:35:48
%S 71,142,191,239,241,359,382,409,431,478,482,599,601,718,769,818,862,
%T 911,1031,1198,1202,1249,1321,1439,1489,1538,1609,1822,1871,2039,2062,
%U 2089,2111,2161,2281,2498,2591,2642,2711,2878,2879,2978,3001,3119,3121,3169
%N Numbers whose least quadratic nonresidue (A020649) is 7.
%H Amiram Eldar, <a href="/A025023/b025023.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/QuadraticNonresidue.html">Quadratic Nonresidue</a>.
%t Select[Range[3200], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 7 &] (* _Amiram Eldar_, Oct 31 2020 *)
%o (PARI) residue(n,m)=local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r
%o isA025023(n)=residue(2,n) && residue(3,n) && residue(5,n) && !residue(7,n) \\ _Michael B. Porter_, Apr 19 2010
%o (PARI) is(n)=issquare(Mod(2,n)) && issquare(Mod(3,n)) && issquare(Mod(5,n)) && !issquare(Mod(7,n)) \\ _Charles R Greathouse IV_, Jan 24 2020
%Y Cf. A020649, A025020, A025021, A025022, A025024, A025025, A025026, A025027, A025028, A025029.
%K nonn
%O 1,1
%A _David W. Wilson_