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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A177864 a(n) is the smallest quadratic residue > 1 modulo prime(n), for n > 2. 0
4, 2, 3, 3, 2, 4, 2, 4, 2, 3, 2, 4, 2, 4, 3, 3, 4, 2, 2, 2, 3, 2, 2, 4, 2, 3, 3, 2, 2, 3, 2, 4, 4, 2, 3, 4, 2, 4, 3, 3, 2, 2, 4, 2, 4, 2, 3, 3, 2, 2, 2, 3, 2, 2, 4, 2, 3, 2, 4, 4, 4, 2, 2, 4, 4, 2, 3, 3, 2, 2, 2, 3, 4, 2, 4, 3, 2, 2, 3, 3, 2, 2, 2, 3, 2, 2, 4, 2, 3, 2, 2, 3, 4, 2, 4, 2, 4, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

3,1

COMMENTS

There is no quadratic residue > 1 modulo the first or 2nd prime, so the sequence begins with a(3).

LINKS

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

Wikipedia, Quadratic residue

Wikipedia, Quadratic reciprocity

FORMULA

a(n) = 2 or 3 or 4 according as prime(n) == 1,7,9,15,17,23 or 11,13 or 3,5,19,21 (mod 24), respectively, for n > 2, by the quadratic reciprocity law and its supplements.

EXAMPLE

The quadratic residues modulo prime(3) = 5 are 1 and 4, so a(3) = 4.

MATHEMATICA

Flatten[Table[ Extract[Flatten[ Position[Table[JacobiSymbol[i, Prime[n]], {i, 1, Prime[n] - 1}], 1]], {2}], {n, 3, 100}]]

CROSSREFS

Cf. A063987 Triangle in which the n-th row gives the quadratic residues modulo prime(n), A053760 Smallest positive quadratic nonresidue modulo prime(n).

Sequence in context: A307367 A136626 A079623 * A090112 A226087 A140396

Adjacent sequences:  A177861 A177862 A177863 * A177865 A177866 A177867

KEYWORD

easy,nonn

AUTHOR

Jonathan Sondow, May 16 2010

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 November 16 22:05 EST 2019. Contains 329208 sequences. (Running on oeis4.)