Solving a Diophantine Equation dealing with powers of 2 Let x and y be positive integers with no prime factors larger than 5. Find all such $x$ and $y$ which satisfy $$x^2-y^2=2^k$$
where the range of k is $1\leq k\leq2019$.
I managed to solve the equation for general solutions where $(x, y)=(3 \times 2^z, 2^z)$ and $(x, y)=(5 \times 2^z, 3 \times 2^z)$ for non-negative integers for $z$. However, I still have trouble finding the range of values for $z$ that fit the given range of $k$.

First, we have the equation:
$$x^2 - y^2 = 2^k$$
We define $\nu_2(n)$ to be the power of $2$ that divides $n$. 
Now, assume that $\nu_2(x) \neq \nu_2(y)$. We divide our equation by $2^{2\min(\nu_2(x),\nu_2(y))}$. Then, we will have the LHS as an odd value, as one term would be even, and the other would be odd. Thus, we would have an odd power of $2$, that is,  $2^{k-2\min(\nu_2(x),\nu_2(y))} = 1$. This would mean that the difference of two positive perfect squares is $1$. Contradiction.
Let $\nu_2(x) = \nu_2(y) = t$. Then, let $x = 2^t \cdot p$ and $y = 2^t \cdot q$. Here, $p$ and $q$ are odd. Let $l = k-2t$. By dividing by $2^{2t}$ :
$$p^2-q^2 = 2^l \implies (p-q)(p+q) = 2^l \implies p-q = 2^{l_1} \space , \space p+q = 2^{l_2}$$
Again, we can note that if $4 \mid p-q$ and $4 \mid p+q$, then $4 \mid (p-q) + (p+q) \implies 4 \mid 2p \implies 2 \mid p$. However, this is wrong as $p$ is odd. Thus, it is not possible for both of $p+q$ and $p-q$ to be divisible by $4$. Since they are both even and powers of $2$, and $p-q < p+q$, we have $p-q = 2$.
Solving $p-q = 2$ and $p+q = 2^{l-1}$, we get $p = 2^{l-2}+1$ and $q = 2^{l-2}+1$. We are given the condition that $x$ and $y$ have no prime factors greater than $5$. Then, we can note that the only prime factors of $p$ and $q$ are $3$ and $5$. Moreover, as $p-q = 2$, we can have $3$ and $5$ only dividing one of $p$ and $q$. Thus, one of $p$ and $q$ is a power of $3$ and the other is a power of $5$.
Case 1: Power of $5$ is equal to $1$
Here, we have $p > q$ and as the power of $5$ is equal to $1$, we have $q=1$ which would give us $p=3$. Then, we would have the solution:
$$ (x,y,k) = (3 \cdot 2^t , 2^t , 2t+3)$$ 
Case 2: Power of $5$ is more than $1$
Here, we can note that $p=2^{l-2}+1$ and $q = 2^{l-2}-1$. We have:
$$5 \mid 2^n \pm 1 \implies 2 \mid n$$
Thus, we have $2 \mid l-2$. Then, $3 \mid 2^{l-2}-1$.
Now, we get $p= 2^{l-2}+1 = 5^m \implies 2^{l-2} = 5^m-1$. By lifting the exponent lemma: $$\nu_2(5^m-1) = \nu_2(5-1) + \nu_2(m) = \nu_2(m) + 2 \implies 2^{l-4} \mid m$$
This shows that $m \geqslant 2^{l-4}$. Hence:
$$2^{l-2} = 5^m-1 \geqslant 5^{2^{l-4}}-1$$
which is true only when $l=4$. In that case, we get $p=5$ and $q=3$, which shows:
$$(x,y,k) = (5 \cdot 2^t , 3 \cdot 2^t , 2t+4)$$
Therefore, the only solutions are $(x,y,k) = (3 \cdot 2^t , 2^t , 2t+3)$ and $(x,y,k) = (5 \cdot 2^t , 3 \cdot 2^t , 2t+4)$. 
