Solutions to $k$ when $2^k n^2 + 2^k n + 1$ is never a perfect square.

109 Views Asked by At

I need to find possible values of $k$ with $k \in \mathbb{N}$ such that for any $n \in \mathbb{N}$ the equation $2^k n^2 + 2^k n + 1$ will never be a perfect square.

So, I thought, maybe for even $k$ I get solutions because then it is possible to complete the square, like:

Let be $k = 2m; \quad m \in \mathbb{N}$

\begin{align} 2^{2m} n^2 + 2^{2m} n + 1 &= (2^m)^2 n^2 + 2 \cdot 2^{m} \cdot 2^{m-1} n + 1 \\ &= \left(2^m n + 1\right)^2 + 2^{m+1} \left(2^{m-1} - 1 \right) n \\ &= \left(2^m n + 1\right)^2 + \left(2^{m}\right)^2 n - \left(2^m\right) n \end{align}

But then I am stuck and don't know if it leads me to something.

Edit 1:

The comment of Shamim leads me to the condition that if it is a perfect square, it needs to be an odd one because:

\begin{align} 2^k n^2 + 2^k n + 1 \equiv 1 \mod{4} \end{align}

But still, it does not restrict $k$.

4

There are 4 best solutions below

3
On

I'll assume you question is about values of $k$ and $n$ that makes $2^kn^2+2^kn+1$ never to be a perfect square, where $k,n \in N$

We know that if $z$ is a perfect square, then $z^2+1$ cannot be a perfect square, this is the definition you'll use to solve your problem

$2^kn^2+2^kn+1 = 2^k\cdot(n^2+n)+1 = 2^k\cdot{n}\cdot(n+1)+1$

Now say $k=2m$ and $n=p^2$

$2^{2m}\cdot{p^2}\cdot(p^2+1)+1$

$( 2^m\cdot{p} )^2\cdot(p^2+1)+1$

Now if $p^2+1$ is a perfect square, then that expression can never be a perfect square

So we have to find the value of $p$ and $m$ that makes $p^2+1$ perfect, but $p^2+1$ cannot be a perfect square as we've shown earlier, since it can't be a perfect square then our expression is likely a perfect square if $k=2m$, meaning if $k$ is even and if $n=p^2$, meaning if $n$ is perfect, otherwise our expression is cannot be a perfect square

$2^kn^2+2^kn+1$ cannot be a perfect square, if $k$ is odd and $n$ is a perfect square

2
On

We know that any perfect square is either modulo $\ 0$ or $\ 1$ mod $\ 4$.
Let $\ 2^kn^2+2^kn+1$ be a perfect square.

Then either $\ 2^kn^2+2^kn+1 \equiv 0 (mod 4)$

But $\ 4\not|\;(2^kn^2+2^kn+1)=2^k(n^2+n)+1 $, because $\ 2^k(n^2+n)+1 $ is odd.

So $\ 2^k(n^2+n)+1 \not\equiv 0 (mod 4)$

Therefore $\ 2^k(n^2+n)+1 \equiv 1 (mod 4)$

$\implies 4|2^k(n^2+n)$

$\implies either\quad 4|2^k\; or\quad 4|n^2+n\implies 4|n(n+1) $

$\implies k=2p\quad or\quad n=4q\;, 4q-1,\quad p,q\in\mathbb{Z}$
Contrapositively we can say that if $\ k\ne 2p\:$ and $\ n\neq 4q,(4q-1)$ then $\ 2^kn^2+2^kn+1$ is not a perfect square.

0
On

If $\ 2^kn^2+2^kn+1$ is a perfect square, then $\ 2^kn^2+2^kn+1=0$ must have two equal roots, i.e the discriminant must vanish.
Therefore
$\ \begin{align} &(2^k)^2 =4.2^k.1\\ \implies &4^k =4.2^k\\ \implies &4^{k-1} =2^k\\ \implies &2^{2k-2} =2^k\\ \implies &2k-2 =k\\ \implies &k=2\\ \end{align}$
So $\ 2^kn^2+2^kn+1$ is a perfect square if $\ k=2\; \forall n\in \mathbb{N}$. Thus if $\ k\ne2$ then $\ 2^kn^2+2^kn+1$ is not a perfect square.

0
On

COMMENT.-Let note $N=2^kn^2+2^kn+1$.We assume that $0\notin\mathbb N$ because if not then the set solution is obviously empty because $1$ is a square. (Many times you have to consider $0$ as a natural, particularly for Fermat's theorem on the sum of two squares).

$k=1$ discarded because $n=3\Rightarrow N=5^2$.

$k=2$ discarded because of all $n$.

$k=3$ discarded because $n=14\Rightarrow N=41^2$

$k=5$ discarded because $n=5\Rightarrow N=31^2$

We have $$N=\begin{cases}3\cdot(2^{k-1}n)^2+(2^{k-1}n+1)^2 \text{ when $k\gt2$ is even }\\ 6\cdot(2^{k-1}n)^2+2(2^{k-1}n+1)^2-1 \text{ when $k\gt5$ is odd }\end{cases} \hspace {15mm}(1)$$ Consider the more general equations involving the equations $(1)$ $$\begin{cases}3x^2+(x+1)^2=z^2\hspace {15mm}(2)\\6x^2+2(x+1)^2-1=z^2\hspace {5mm}(3)\end{cases}$$ According to Wolfram, $(2)$ has no positive integer solution and $(3)$ has infinitely many (determine similarly to Pell-Fermat equation); however among these some particular $x$ must have the form $x=2^{k-1}n$ for $k$ odd greater than $5$.

Calculating the two smaller we have $(x,z)=(10,29),(348,985)$ and we can see that $348=2^2\cdot87$; if the exponent would have been not $2$ but greater than or equal to $5(=6-1)$, we would have had a value of $ n $ to rule out another odd value of k. We stop this comment here concluding that a part of the values of k are as follows:

all even greater than $2$

►probaly very much of odd values greater than $5$ (if not all!)