login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178152 The number of quadratic residues (mod p) greater than p/2, where p=prime(n). 2
0, 1, 1, 1, 3, 4, 3, 4, 7, 6, 9, 10, 9, 9, 13, 10, 15, 15, 14, 18, 17, 16, 22, 24, 25, 23, 22, 27, 28, 29, 25, 34, 30, 37, 34, 39, 39, 36, 43, 37, 45, 41, 48, 49, 45, 48, 52, 49, 57, 58, 52, 60, 52, 64, 59, 67, 62, 69, 70, 66, 73, 72, 68, 78, 79, 78, 84, 79, 87, 88, 80, 87, 93, 90 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,5

COMMENTS

Sequence A063987 lists the quadratic residues (mod p) for each prime p. When p=1 (mod 4), there are an equal number of quadratic residues less than p/2 and greater than p/2. When p=3 (mod 4), there are always more quadratic residues less than p/2 than greater than p/2.

LINKS

Table of n, a(n) for n=2..75.

MathOverflow, Most squares in the first half-interval

EXAMPLE

The quadratic residues of 19, the 8th prime, are 1, 4, 5, 6, 7, 9, 11, 16, 17. Three of these are greater than 19/2. Hence a(8)=3.

MATHEMATICA

Table[p=Prime[n]; Length[Select[Range[(p+1)/2, p-1], JacobiSymbol[ #, p]==1&]], {n, 2, 100}]

CROSSREFS

Cf. A178151, A178153, A178154

Sequence in context: A061988 A094151 A135800 * A006984 A087275 A265305

Adjacent sequences: A178149 A178150 A178151 * A178153 A178154 A178155

KEYWORD

nonn

AUTHOR

T. D. Noe, May 21 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 28 17:22 EST 2022. Contains 358421 sequences. (Running on oeis4.)