This site is supported by donations to The OEIS Foundation.

 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!)
 A177864 a(n) is the smallest quadratic residue > 1 modulo prime(n), for n > 2. 0

%I

%S 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,

%T 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,

%U 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

%N a(n) is the smallest quadratic residue > 1 modulo prime(n), for n > 2.

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

%F 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.

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

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

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

%K easy,nonn

%O 3,1

%A _Jonathan Sondow_, May 16 2010

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.

Last modified December 11 12:33 EST 2019. Contains 329916 sequences. (Running on oeis4.)