Let $y$ be an integer. Prove that
$$(2y-1)^2 -4$$
is not a perfect square.
I Found this question in a discrete math book and tried solving it by dividing the question into two parts:
$$y = 2k , y = 2k + 1$$
But that got me nowhere.
Let $y$ be an integer. Prove that
$$(2y-1)^2 -4$$
is not a perfect square.
I Found this question in a discrete math book and tried solving it by dividing the question into two parts:
$$y = 2k , y = 2k + 1$$
But that got me nowhere.
For the sake of contradiction write $(2y-1)^2-4=n^2$ where $n$ is an integer. Equivalently $$4=(2y-1-n)(2y-1+n).$$ Difference between the two factors is $2n$, i.e. even. Only ways to factor $4$ with factors that differ by even number are $(-2)\cdot(-2)$ and $2 \cdot 2$, both cases are impossible as they imply $n=0$ and $(2y-1)^2=4$.
odd squares are $1 \pmod 4,$ but it is more specific than that. Odd squares are $1 \pmod 8.$ You can check this by squaring, say, $1,3,5,7$ and find the remainder when divided by $8$. In particular, squares are never $5 \pmod 8.$ Your $(2y-1)^2 - 4 \equiv 5 \pmod 8$ and cannot be a square
$(2y-1)^2-4=4(y^2-y)-3$ If it were a perfect square it would be $=c^2$, where c is an integer. Solve for $y$ in $4(y^2-y)-3-c^2=0$ and get $y=\frac{4\pm \sqrt{16+16(3+c^2)}}{8}=\frac{1\pm \sqrt{4+c^2}}{2}$.
However $c^2+4$ cannot be a square, unless $c=0$ (where $y$ is not an integer). Assume $c^2+4=b^2$ so $b=c+a$ with $(c+a)^2=c^2+2ac+a^2$. $2ac+a^2=4$ has no possible integer solutions. ($a=1$ LHS is odd, $a\gt 1$ LHS $\gt 4$).
Therefore no possible integer $y$.
Suppose:
$$(2 y - 1)^2 - 4 = a^2$$
for some $a$.
Then
$$(2 y - 1 + 2)(2 y - 1 - 2) = (2 y + 1)(2 y - 3) = a^2$$
Can you take it from here?
Think about the prime factorization of each side.
$(2y-1)^2 - 4 = (2y-1)^2 - 2^2 = (2y-1+2)(2y-1-2) = (2y+1)(2y-3)$
Note that $2y+1$ and $2y-3$ are always distinct integers. Hence proving their product cannot be a square is accomplished by showing they're coprime (no prime factors in common) and that they're not both squares at the same time.
$\mathrm{gcd}(2y+1, 2y-3) =\mathrm{gcd}(2y+1, (2y+1)-(2y-3)) = \mathrm{gcd}(2y+1, 4) = 1$ (the last part is trivially observing that one is odd, the other even). Hence $2y+1$ and $2y-3$ are coprime.
Now note that both $2y+1$ and $2y-3$ are odd with a difference of $4$. The minimum difference between two odd squares is $3^2 - 1^2 = 8$. So they cannot both be squares.
Therefore $(2y+1)(2y-3) = (2y-1)^2 - 4$ cannot be a square.
For $y\le-1$, $(2y-1)^2-4$ is between consecutive squares $(2y)^2$ and $(2y-1)^2$.
For $y\in\{0,1\}$, $(2y-1)^2-4$ is negative, so not a square.
For $y\ge2$, $(2y-1)^2-4$ is between consecutive squares $(2y-2)^2$ and $(2y-1)^2$.
Another proof: WLOG assume $y>0$. Look at the differences between square of two consecutive numbers: $1, 3, 5, 7$, etc.. Therefore the only way to get a difference of 4 is 2^0-0=1+3, which is impossible because $2y-1$ is odd.
The difference between any two squares $a^2$ and $b^2$ with $a^2< b^2$ is at least 5 if $|b|$ is at least 3.
So all you are left with is to check directly for $(2y-1)^2 =0,1,4$. And as $2y-1$ is odd, infact only $2y-1=1$.