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.

Showing 1-5 of 5 results.

A091385 Distance (A091382) of primes from the largest quadratic "mixed" residues modulo the primes (A091380), where the latter is non-monotonic.

Original entry on oeis.org

2, 7, 11, 7, 11, 11, 7, 17, 7, 7, 7, 13, 11, 13, 7, 11, 7, 11, 13, 7, 11, 13, 11, 7, 11, 11, 13, 7, 7, 11, 13, 19, 11, 17, 11, 7, 7, 7, 13, 13, 17, 11, 11, 17, 11, 13, 19, 11, 13, 11, 7, 7, 11, 19, 11, 11, 7, 13, 11, 11, 13, 13, 7, 13, 17, 13, 11, 17, 11, 19, 11, 11, 11, 13, 23, 7, 17, 7
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu)

Keywords

Comments

For n > 1, the values are some odd primes, but never < 7. The maximum value increases very slowly, it only reaches 43 for the first 10^5 primes.

Crossrefs

Programs

  • PARI
    {/* The distance of LQxR from the primes where the sequence of the largest "mixed" QR modulo the primes is non-monotonic */ lqxr_nm_pd(to)=local(v=[],k,r,q,p,e=1,n=0,i=1); while(nr,k-=1); if(k-e<=0,v=concat(v,p-k);n+=1);e=k); print(i);print(v) }

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

A091381 First differences of A091380.

Original entry on oeis.org

0, 2, 1, 5, 2, 3, 3, 1, 9, 1, 7, 3, 3, 1, 9, 6, 2, 6, -1, 4, 8, 5, 5, 6, 7, 1, 5, 2, 3, 14, 5, 5, 3, 10, 1, 7, 6, 1, 9, 6, 2, 5, 4, 7, 1, 13, 11, 5, 2, 3, 2, 2, 15, 5, 4, 9, 1, 7, 3, 3, 10, 14, -5, 8, 7, 14, 3, 13, 2, 3, 2, 12, 7, 6, 1, 9, 8, 3, 4, 15, 2, 5, 4, 8, 5, 5, 6, 7, 1, 5, 1, 18, 5, 8, 1, 9, 11, 3, 18
Offset: 1

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu)

Keywords

Comments

Seemingly, the difference sequence is mostly positive. There are special characteristic features, where it is nonpositive (see A091383-A091385).

Programs

  • PARI
    {/* Difference sequence of the largest "mixed" QR modulo the primes */ d_lqxr(to)=local(v=[],k,r,q,p,e=1); for(i=2,to,p=prime(i);k=p-1;r=p%4-2; while(kronecker(k,p)<>r,k-=1); v=concat(v,k-e);e=k); print(v) }

A091383 Prime numbers where the sequence of largest quadratic "mixed" residues modulo the primes (A091380) is non-monotonic.

Original entry on oeis.org

3, 7, 31, 71, 103, 151, 199, 239, 271, 311, 359, 463, 599, 719, 823, 839, 911, 1063, 1231, 1279, 1303, 1439, 1559, 1871, 1879, 1951, 1999, 2143, 2239, 2311, 2351, 2383, 2399, 2551, 2711, 2791, 3191, 3391, 3463, 3559, 3583, 3823, 3911, 3919, 4079, 4159
Offset: 1

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu)

Keywords

Comments

All of these primes belong to the +-1 least absolute reside classes modulo 8. (Tested for 10^5 primes.)
Where does this first differ from A088193 (if at all)? - R. J. Mathar, Aug 27 2025

Programs

  • PARI
    {/* The primes where the sequence of the largest "mixed" QR modulo the primes is non-monotonic */ lqxr_nm_p(to)=local(v=[],k,r,q,p,e=1,n=0,i=1); while(nr,k-=1); if(k-e<=0,v=concat(v,p);n+=1);e=k); print(i);print(v) }

A091384 Members of the difference sequence (A091381) of the sequence of largest quadratic "mixed" residues modulo the primes (A091380) where the latter is non-monotonic.

Original entry on oeis.org

0, -1, -5, -1, -3, 0, 0, -8, 0, -1, 0, -7, -2, -6, -1, 0, 0, -5, -6, 0, 0, -7, -2, 0, -2, -3, -1, 0, -1, -5, -5, -7, -2, -11, 0, -1, 0, 0, -1, -2, -10, 0, 0, -6, -3, -1, -5, -5, -6, -5, 0, -1, -5, -7, -2, -5, -1, -5, 0, -2, -2, -7, 0, -7, -9, -4, -4, -8, -5, -13, 0, -4, -4, -7, -17, 0, -3, 0, -5, -1, -3, 0, -17, 0, -7, -6, -1, -2, -3, -3, 0
Offset: 1

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu)

Keywords

Comments

The negative values are either primes or composites (Cf. A088200).

Programs

  • PARI
    {/* The difference sequence values where the sequence of the largest "mixed" QR modulo the primes is non-monotonic */ lqxr_nm_d(to)=local(v=[],k,r,q,p,e=1,n=0,i=1); while(nr,k-=1); if(k-e<=0,v=concat(v,k-e);n+=1);e=k); print(i);print(v) }
Showing 1-5 of 5 results.