Intereting Posts

Second longest prime diagonal in the Ulam spiral?
An extrasensory perception strategy :-)
Proving a function is infinitely differentiable
Another Proof that harmonic series diverges.
Yet another inequality: $|a+b|^p<2^p(|a|^p+|b|^p)$
Limits problem with trig? Factoring $\cos (A+B)$?
Smallest integer divisible by all up to $n$
Infinitely many nonequivalent unprovable statements in ZFC because of Gödel's incompleteness theorem?
Point reflection over a line
On continuity of roots of a polynomial depending on a real parameter
How to prove the function is a constant
Nilpotent elements in $\mathbb{Z}_n$
What is the proof for this sum of sum generalized harmonic number?
Why are vector spaces not isomorphic to their duals?
Why isn't this a well ordering of $\{A\subseteq\mathbb N\mid A\text{ is infinite}\}$?

For any prime $p\gt 5$,prove that there are consecutive quadratic residues of $p$ and consecutive non-residues as well(excluding $0$).I know that there are equal number of quadratic residues and non-residues(if we exclude $0$), so if there are two consecutive quadratic residues, then certainly there are two consecutive non-residues,therefore, effectively i am seeking proof only for existence of consecutive quadratic residues. Thanks in advance.

- Number of integer solutions of $x^2 + y^2 = k$
- Asymptotic divisor function / primorials
- Solving a Word Problem relating to factorisation
- Intuitively, what separates Mersenne primes from Fermat primes?
- Can you determine a formula for this problem?
- On a topological proof of the infinitude of prime numbers.

- Understanding the proof of a formula for $p^e\Vert n!$
- Probability of highest common factor in Williams
- Alternative form to express the second derivative of $\zeta (2) $
- Are Hilbert primes also Hilbert irreducible ? Furthermore, are Hilbert primes also primes in $\mathbb{ Z}$?
- Is it possible to generalize Ramanujan's lower bound for factorials that he used in his proof of Bertrand's Postulate?
- Product of $5$ consecutive integers cannot be perfect square
- Finite sum $\sum_{n=2}^N\frac{1}{n^2}\sin^2(\pi x)\csc^2(\frac{\pi x}{n})$
- Proving the Möbius formula for cyclotomic polynomials

Since 1 and 4 are both residues (for any $p\ge 5$), then to avoid having consecutive residues (with 1 and 4), we would have to have both 2 and 3 as non-residues, and then we have 2 consecutive non-residues.

Thus, we must have either 2 consecutive residues or 2 consecutive nonresidues.

i.e.: 1 and 4 are both residues, so we have R * * R for the quadratic character of 1, 2, 3 and 4. However we fill in the two blanks with Rs or Ns, we will get either 2 consecutive Rs or 2 consecutive Ns.

**Edited:**

To show that we must actually get both RR and NN for $p\gt 5$, we consider 2 cases:

$p\equiv -1 \pmod 4$: then the second half of the list of $p-1$ Ns and Rs is the inverse of the first half (Ns become Rs and the order is reversed), so that if we have NN or RR in the first half (using the argument above) then we get the other pattern in the second half.

$p\equiv 1 \pmod 4$: then the second half of the list is the reverse of the first half. Then if there is no RR amongst the first 4, then there must be an appearance of NN, i.e. sequence begins RNNR…, and if we fill in the dots (this is where we need $p>5$ – to ensure there ARE some dots!) with Ns and Rs trying to avoid an appearance of RR, then we have to alternate …NRNR…NR. However the sequence then ends with R, and the second half begins with R, so we eventually get RR.

(The comments about the second half of the list in the 2 cases are easy consequences of -1 being a residue or a nonresidue of p).

The number of $k\in[0,p-1]$ such that $k$ and $k+1$ are both quadratic residues is equal to:

$$ \frac{1}{4}\sum_{k=0}^{p-1}\left(1+\left(\frac{k}{p}\right)\right)\left(1+\left(\frac{k+1}{p}\right)\right)+\frac{3+\left(\frac{-1}{p}\right)}{4}, $$

where the extra term is relative to the only $k=-1$ and $k=0$, in order to compensate the fact that the Legendre symbol $\left(\frac{0}{p}\right)$ is $0$, although $0$ is a quadratic residue. Since:

$$ \sum_{k=0}^{p-1}\left(\frac{k}{p}\right)=\sum_{k=0}^{p-1}\left(\frac{k+1}{p}\right)=0, $$

the number of consecutive quadratic residues is equal to

$$ \frac{p+3+\left(\frac{-1}{p}\right)}{4}+\frac{1}{4}\sum_{k=0}^{p-1}\left(\frac{k(k+1)}{p}\right). $$

By the multiplicativity of the Legendre symbol, for $k\neq 0$ we have $\left(\frac{k}{p}\right)=\left(\frac{k^{-1}}{p}\right)$, so:

$$ \sum_{k=1}^{p-1}\left(\frac{k(k+1)}{p}\right) = \sum_{k=1}^{p-1}\left(\frac{1+k^{-1}}{p}\right)=\sum_{k=2}^{p}\left(\frac{k}{p}\right)=-1,$$

and we have $\frac{p+3}{4}$ consecutive quadratic residues if $p\equiv 1\pmod{4}$ and $\frac{p+1}{4}$ consecutive quadratic residues if $p\equiv -1\pmod{4}$.

An elementary proof, too: if $p>5$, at least one residue class among $\{2,5,10\}$ must be a quadratic residue, since the product of two quadratic non-residues is a quadratic residue. But every element of the set $\{2,5,10\}$ is a square-plus-one, giving at least a couple of consecutive quadratic residues among $(1,2),(4,5),(9,10)$.

- Is every set in a separable metric space the union of a perfect set and a set that is at most countable?
- If $A$ is positive definite then so is $A^k$
- Physical reflections of prime-number distribution
- Simplex algorithm : Which variable will go out of the basis?
- $\int_{-\infty}^{+\infty}\frac1{1+x^2}\left(\frac{\mathrm d^n}{\mathrm dx^n}e^{-x^2}\right)\mathrm dx$ Evaluate
- Sequence of functions: Convergence
- What is the mistake?
- How to show $(1/n!)^{1/n}$ goes to $0$ as $n$ goes to infinity?
- Prove that the closed unit ball of $L^2$ is closed in $L^1$
- A finite group of even order has an odd number of elements of order 2
- Is there any matrix notation the summation of a vector?
- Proving the Cantor Pairing Function Bijective
- How to prove that $\int_0^b\Big(\int_0^xf(x,y)\;dy\Big)\;dx=\int_0^b\Big(\int_y^bf(x,y)\;dx\Big)\;dy$?
- How to prove a number system is a fraction field of another?
- Symmetric difference of cycles