A091380 Largest quadratic "mixed" residue modulo the n-th prime (LQxR(p_n)).
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
References
- H. Cohn, Advanced Number Theory, p. 19, Dover Publishing (1962)
Links
- Ferenc Adorjan, The sequence of largest quadratic residues modulo the primes
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.
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
Comments
Links
- Ferenc Adorjan, The sequence of largest quadratic residues modulo the primes
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) }
A091382 Distance between the sequence of primes and the largest "mixed" quadratic residues modulo the primes (A091380).
1, 2, 2, 3, 2, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 2, 2, 2, 7, 5, 3, 2, 3, 5, 2, 3, 2, 2, 3, 3, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 2, 7, 5, 2, 3, 2, 3, 2, 2, 3, 7, 7, 2, 3, 5, 2, 3, 2, 3, 2, 2, 2, 11, 5, 2, 2, 5, 2, 2, 3, 7, 3, 2, 2, 5, 2, 2, 3, 7, 2, 2, 7, 5, 3, 2, 3, 5, 2, 3, 2, 13, 3, 2, 2, 5, 2, 3, 2, 2
Offset: 1
Comments
Apart from the first term, it contains solely primes. Is every prime in there?
Apart from the first term and the definition, it is identical to the sequence A053760 by S. R. Finch.
Links
- Ferenc Adorjan, The sequence of largest quadratic residues modulo the primes
Programs
-
PARI
{/* Distance of primes from the sequence of the largest "mixed" QR modulo the primes */ p_lqxr(to)=local(v=[1],k,r,q,p); for(i=2,to,p=prime(i);k=p-1;r=p%4-2; while(kronecker(k,p)<>r,k-=1); v=concat(v,p-k)); 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.
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
Comments
The negative values are either primes or composites (Cf. A088200).
Links
- Ferenc Adorjan, The sequence of largest quadratic residues modulo the primes
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(n
r,k-=1); if(k-e<=0,v=concat(v,k-e);n+=1);e=k); print(i);print(v) }
A091385 Distance (A091382) of primes from the largest quadratic "mixed" residues modulo the primes (A091380), where the latter is non-monotonic.
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
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.
Links
- Ferenc Adorjan, The sequence of largest quadratic residues modulo the primes
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(n
r,k-=1); if(k-e<=0,v=concat(v,p-k);n+=1);e=k); print(i);print(v) }
Comments