Issues concerning A097160

David Harden oddleehr at alum.mit.edu
Fri Dec 29 07:35:40 CET 2006


The definition says "Greatest prime p such that there are n consecutive quadratic residues mod p."
It should say "Greatest prime p such that there are n, but not n+1, consecutive quadratic residues mod p."
Also, a question arises here: How do we know that, for every positive integer k, there is a prime p such that there are k consecutive quadratic residues mod p but not k+1 of them? Has anyone proven this?
Otherwise, gaps might exist, and they would need to be noted. Or, the sequence could be redefined so that they don't exist:

Let b_n be the nth positive integer such that there are primes p with b_n consecutive quadratic residues mod p but no instance of b_n + 1 consecutive quadratic residues mod p.
Then it would be redefined as the largest prime p such that there are b_n consecutive quadratic residues mod p but no instance of b_n + 1 consecutive quadratic residues mod p.

I will now include a proof that A097160(2)=17 and mention things related to extending the sequence.

Since the quadratic residues modulo 17 are 1,2,4,8,9,13,15 and 16, there are no 3 consecutive integers among these. Thus A097160(2)>=17.
To show it is 17, we show there will be a run of 3 when p>17:

Case 1. (2/p)=(3/p)=1. 1,2,3 works. (also, 2,3,4 or 48,49,50 will work)

Case 2. (2/p)=1 and (3/p)=-1. In this case, 8,9,10 works unless (5/p)=-1. 49,50,51 will work unless (17/p)=1. But then 15,16,17 works.

Case 3. (2/p)=-1 and (3/p)=1. In this case, 3,4,5 works unless (5/p)=-1. But then 49/120, 169/120, 289/120 will work since 120 is invertible modulo p.

Case 4. (2/p)=(3/p)=-1. Then 1/24, 25/24, 49/24 works.

Here the quadratic character of only 2 primes was considered in the case division; for higher-index terms, more primes should be needed (how many?) and this promises to make computation (via these ideas) exponentially harder. Maybe the keyword "hard" should be attached to this sequence.

One can attempt to carry out this kind of reasoning while eschewing fractions; then the chase for a run of quadratic residues is longer but one can obtain a universal upper bound on the onset of such a run of quadratic residues.

I should also say something about considering the quadratic character of -1. If the quadratic character of -1 is known, then a run of consecutive quadratic residues can include both negative and positive fractions (like -7/6, -1/6, 5/6, 11/6).
Otherwise the help from knowing (-1/p) seems to be rather limited:

If (-1/p)=-1, then a run of k quadratic nonresidues mod p can be turned into a run of k quadratic residues mod p by multiplying them by -1 and reversing their order. This allows the computation in this case to be that much easier. However, this also seems to make it harder for a prime p in A097160 to have (-1/p)=-1, as evidenced by the fact that all the terms included there are congruent to 1 mod 4.
Problem: Are _all_ terms in A097160 congruent to 1 mod 4?
Also, beyond A097160(3)=53, all listed terms are congruent to 1 mod 8. Does this hold up (if so, why?), or is it just a result of how little computation has been done?

Good luck to all who wish to code a computer program to compute terms of this sequence!

---- David


More information about the SeqFan mailing list