This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A091380 #13 Aug 18 2015 03:56:52 %S A091380 1,1,3,4,9,11,14,17,18,27,28,35,38,41,42,51,57,59,65,76,81,86,92,99, %T A091380 100,105,107,110,124,129,134,137,147,148,155,161,162,171,177,179,184, %U A091380 188,195,196,209,220,225,227,230,232,234,249,254,258,267,268,275,278,281 %N A091380 Largest quadratic "mixed" residue modulo the n-th prime (LQxR(p_n)). %C A091380 Due to the quadratic reciprocity (Euler's criterion), if a prime p is congruent to 1 mod 4, then (p-1) is a quadratic residue mod p (see A088190). Also, if p is congruent -1 mod 4 then p-1 is a quadratic non-residue mod p (see A088196). This sequence is created in such a way that when p is not congruent to 1 mod 4 then the largest quadratic residue is taken, otherwise the largest quadratic non-residue taken modulo p. Thus it is a merger of A088190 and A088196 by skipping the "trivial" terms. Important observations (tested up to 10^5 primes): - the sequence of largest "mixed" residues modulo the primes (denoted by LQxR(p_n)) is 'almost' monotonic, - for n>1, p_n-LQxR(p_n) is a prime value (see A091382) - if LQxR(p_n)<=LQxR(p_{n-1}) then p_n==+-1 mod 8 (when n>2) (see A091384) - if LQxR(p_n)<=LQxR(p_{n-1}) then p_n-LQxR(p_n) is a prime q>5 (see A091385). %D A091380 H. Cohn, Advanced Number Theory, p. 19, Dover Publishing (1962) %H A091380 Ferenc Adorjan, <a href="http://web.axelero.hu/fadorjan/qrp.pdf">The sequence of largest quadratic residues modulo the primes</a> %F A091380 a(1)=1; a(n>1)=max{r<p_n | -(r/p_n)=|p_n|_4}, where (r/p_n) is the Legendre symbol and |x|_m is the least absolute residue of x modulo m. %o A091380 (PARI) {/* Sequence of the largest "mixed" QR modulo the primes */ lqxr(to)=local(v=[1],k,r,q); for(i=2,to,k=prime(i)-1;r=prime(i)%4-2; while(kronecker(k, prime(i))<>r,k-=1); v=concat(v,k)); print(v) } %Y A091380 Cf. A088190, A088196, A091381, A091382, A091383, A091384, A091385. %K A091380 nonn,easy %O A091380 1,3 %A A091380 Ferenc Adorjan (fadorjan(AT)freemail.hu)