Intereting Posts

Inductive proof of the closed formula for the Fibonacci sequence
what's the difference between RDE and SDE?
Books on complex analysis
A Banach space of (Hamel) dimension $\kappa$ exists if and only if $\kappa^{\aleph_0}=\kappa$
Finding the homology group of $H_n (X,A)$ when $A$ is a finite set of points
Proving the Poincare Lemma for $1$ forms on $\mathbb{R}^2$
Distance between point and linear Space
Mean of gamma distribution.
Closed unit ball of $B(H)$ with wot topology is compact
How do I Prove the Theorems Needed for “The Deduction Meta-Theorem” from CδCpqCpδq?
An incorrect answer for an integral
Please help with differentiation under the integral
Solving an equation over the reals: $ x^3 + 1 = 2\sqrt{{2x – 1}}$
Prove that $ \int \limits_a^b f(x) dx$ = $ \int \limits_a^b f(a+b-x) dx$
Is the connected sum of complex manifolds also complex?

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.

- Pollard-Strassen Algorithm
- Each digit of $\dfrac{n(n+1)}{2}$ equals $a$
- Elementary solution of exponential Diophantine equation $2^x - 3^y = 7$.
- For primes $p≡3\pmod 4$, prove that $!≡±1\pmod p$.
- Prove that $\sum\limits_{i=0}^{k} p^{2i}$ ($p$ is prime) is never a perfect square
- $m,n>1$ are relatively prime integers , then are there at-least four idempotent (w.r.t. multiplication) elements in $\mathbb Z_{mn}$ ?
- If $g$ is a primitive root of $p^2$ where $p$ is an odd prime, why is $g$ a primitive root of $p^k$ for any $k \geq 1$?
- Why is $x^{-1} = \frac{1}{x}$?
- Is this graph connected
- Percentage of Composite Odd Numbers Divisible by 3

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

- Elements of the form $aX^2 + bY^2$ in a finite field.
- Is there a series where the terms tend to zero faster than the harmonic series but it still diverges?
- In which cases are $(f\circ g)(x) = (g\circ f)(x)$?
- Find the positive integer solutions of $m!=n(n+1)$
- Can a continuous real function take each value exactly 3 times?
- Proof of $\sum_{n=1}^\infty \frac{1}{n^4 \binom{2n}{n}}=\frac{17\pi^4}{3240}$
- Can $18$ consecutive integers be separated into two groups,such that their product is equal?
- Machine Learning: Linear Regression models
- Volume of a hypersphere
- Fit exponential with constant
- If G is finite group with even number of elements and has identity e, there is a in G such that a*a=e
- Prime Appearances in Fibonacci Number Factorizations
- Cantor-Bernstein-like theorem: If $f\colon A\to B$ is injection and $g\colon A\to B$ is surjective, can we prove there is a bijection as well?
- Homeomorphism between Space and Product
- Need help understanding a lift of a vector field