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.

A025021 Numbers whose least quadratic nonresidue (A020649) is 3.

This page as a plain text file.
%I A025021 #20 Feb 16 2025 08:32:35
%S A025021 7,14,17,31,34,41,49,62,79,82,89,98,103,113,119,127,137,151,158,161,
%T A025021 178,199,206,217,223,226,233,238,254,257,271,274,281,287,289,302,322,
%U A025021 329,343,353,367,391,398,401,434,439,446,449,463,466,487,497,511,514,521,527,542
%N A025021 Numbers whose least quadratic nonresidue (A020649) is 3.
%C A025021 n such that n is not divisible by 4, all primes dividing n are in A038873, and at least one prime dividing n is in A003630. - _Robert Israel_, Jul 19 2017
%H A025021 Robert Israel, <a href="/A025021/b025021.txt">Table of n, a(n) for n = 1..10000</a>
%H A025021 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/QuadraticNonresidue.html">Quadratic Nonresidue</a>.
%p A025021 select(t -> numtheory:-quadres(2,t) = 1 and numtheory:-quadres(3,t)=-1, [$1..1000]); # _Robert Israel_, Jul 19 2017
%t A025021 Select[Range[500], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 3 &] (* _Amiram Eldar_, Oct 31 2020 *)
%o A025021 (PARI) residue(n,m)={local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r}
%o A025021 isA025021(n)=residue(2,n) && !residue(3,n) \\ _Michael B. Porter_, Apr 18 2010
%Y A025021 Cf. A020649, A025020, A025022, A025023, A025024, A025025, A025026, A025027, A025028, A025029.
%Y A025021 Cf. A003630, A038873.
%K A025021 nonn
%O A025021 1,1
%A A025021 _David W. Wilson_