cp's OEIS Frontend

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.

A091380 Largest quadratic "mixed" residue modulo the n-th prime (LQxR(p_n)).

Original entry on oeis.org

1, 1, 3, 4, 9, 11, 14, 17, 18, 27, 28, 35, 38, 41, 42, 51, 57, 59, 65, 76, 81, 86, 92, 99, 100, 105, 107, 110, 124, 129, 134, 137, 147, 148, 155, 161, 162, 171, 177, 179, 184, 188, 195, 196, 209, 220, 225, 227, 230, 232, 234, 249, 254, 258, 267, 268, 275, 278, 281
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu)

Keywords

Comments

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).

References

  • H. Cohn, Advanced Number Theory, p. 19, Dover Publishing (1962)

Crossrefs

Programs

  • 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) }

Formula

a(1)=1; a(n>1)=max{r