login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020649 Least quadratic nonresidue of n. 7
2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 5, 5, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 7, 2, 5, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 5, 2, 2, 5, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

3,1

COMMENTS

a(n) is the smallest q such that the congruence x^2 == q (mod n) has no solution 0 < x < n, for n > 2. Note that a(n) is a prime. If n is an odd prime p, then a(p) is the smallest base b such that b^((p-1)/2) == -1 (mod p), see A053760. - Thomas Ordowski, Apr 24 2019

LINKS

Table of n, a(n) for n=3..110.

Eric Weisstein's World of Mathematics, Quadratic Nonresidue

FORMULA

a(prime(n)) = A053760(n) for n > 1. - Thomas Ordowski, Apr 24 2019

PROG

(PARI) residue(n, m)={local(r); r=0; for(i=0, floor(m/2), if(i^2%m==n, r=1)); r}

A020649(n)={local(r, m); r=0; m=0; while(r==0, m=m+1; if(!residue(m, n), r=1)); m} \\ Michael B. Porter, Apr 30 2010

CROSSREFS

Cf. A053760.

Sequence in context: A231727 A270616 A304523 * A183024 A067131 A094915

Adjacent sequences:  A020646 A020647 A020648 * A020650 A020651 A020652

KEYWORD

nonn

AUTHOR

David W. Wilson

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 6 21:48 EST 2019. Contains 329809 sequences. (Running on oeis4.)