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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A088190 Largest quadratic residue modulo prime(n). 12
 1, 1, 4, 4, 9, 12, 16, 17, 18, 28, 28, 36, 40, 41, 42, 52, 57, 60, 65, 64, 72, 76, 81, 88, 96, 100, 100, 105, 108, 112, 124, 129, 136, 137, 148, 148, 156, 161, 162, 172, 177, 180, 184, 192, 196, 196, 209, 220, 225, 228, 232, 232, 240, 249, 256, 258, 268, 268, 276 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Denote a(n) by LQR(p_n). Observations (tested up to 20000 primes): - the sequence of largest QR modulo the primes (LQR(p_n) is 'almost' monotonic, - p_n-LQR(p_n) is either 1 or a prime value (see A088192) - if LQR(p_n)<=LQR(p_{n-1}) then p_n==7 mod 8 (when n>2) (see A088194) - if LQR(p_n)<=LQR(p_{n-1}) then p_n-LQR(p_n) is an odd prime, but never 5 (see A088195) For a similar set of sequences, related to quadratic non-residues, see A088196-A088201. LINKS Table of n, a(n) for n=1..59. F. Adorjan, The sequence of largest quadratic residues modulo the primes. FORMULA a(n) = max(r, r==j^2 mod p(n)|j=1, 2, ...(p(n)-1)/2) MATHEMATICA a[n_] := With[{p = Prime[n]}, SelectFirst[Range[p - 1, 1, -1], JacobiSymbol[#, p] == 1&]]; Array[a, 100] (* Jean-François Alcover, Feb 16 2018 *) PROG (PARI) qrp(fr, to)= {/* Sequence of the largest QR modulo the primes */ local(m, p, v=[]); for(i=fr, to, m=1; p=prime(i); j=2; while((j<=(p-1)/2)&&(m

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.

Last modified August 10 12:12 EDT 2024. Contains 375056 sequences. (Running on oeis4.)