# When is $32x+32$ a square number?

I am trying to find out for what values for $x$ does the function $f(x)=32x+32$ return a square number? I found that this is the case for at least: $x \in \{64,1600,53824,1827904,62094400,2109381184\}$ but I can't see a pattern in those numbers.

Is there a formula which generates these values for $x$ instead of simply trying a lot of values?

• I'm not sure about a formula, but didn't you miss one? If $x = 31$, then $32(31) + 32 = (32)(32)$ which is a square. – layman Jun 15 '15 at 18:48
• @randomgirl deleted her answer, but I thought it was useful. Basically she said that since $32 = 2^{5}$, then $32x + 32 = 2^{5}(x + 1)$. So if $x + 1 = 2^{2k + 1}$ for any integer $k \geq 0$, then $2^{5}(x + 1)$ will be a perfect square. But actually $x + 1$ could equal infinitely many possibilities, since we could have $x + 1 = 2a^{2}$ for any integer $a$, or $x + 1 = 2a^{2k}b^{2j}c^{2n}$ for any integers $a,b,c$ and integers $k, j, n \geq 0$ (and so on). This should at least convince you that there are infinitely many solutions. – layman Jun 15 '15 at 19:10

$$32(x + 1) = y^2 \implies 32 \mid y^2 \implies 4 \mid y$$ so let $y = 4z$. $$2(x+1) = z^2 \implies 2 \mid z$$ so let $z = 2w$ $$x + 1 = 2w^2$$ so given any $w$ we can solve for $x$.

So the set of solutions is $$\{(2w^2 - 1, 8w) \mid w \in \Bbb Z\}$$

• @user46944 Please see my last edit. – jkabrg Jun 15 '15 at 18:54
• You need to exclude $w=0$, don't you? – Clement C. Jun 15 '15 at 18:56
• @ClementC. If you want. I'm listing all solutions over the integers. – jkabrg Jun 15 '15 at 18:57
• In fact, $32|y^2$ already implies $8|y$ the two consequtive steps aren't necessary. – Redundant Aunt Jun 15 '15 at 18:59
• @user3491648 that's not the other way around, "y is divisible by 4" and "4 divides y" mean the same thing. – Jonathan Hebert Jun 27 '15 at 6:37

The answer by user3491648 gives a complete characterization of the full set of values $x$ for which $32x+32$ is a square numbers. This is really just an observation on the set of values

$$\{64,1600,53824,1827904,62094400,2109381184\}$$

reported by the OP.

These are not actually values that $x$ takes on. (As user3491648 finds, it requires on odd value of $x$ to make $32x+32$ a square.) Rather, these seem to be the square values that correspond to values of $x$ that are themselves squares, namely of the following values:

$$\{1,7,41,239,1393,8119\}$$

For example, $32\cdot239^2+32=1827904$. It's unclear why these values are being singled out, but they do seem to obey a two-term recursion, namely

$$a_{n+1}=6a_n-a_{n-1}$$

For example, $1393=6\cdot239-41$.

• Great observation! I was actually trying to find values for x where (xx)-1 mod 8 == 0 and where 32*xx+32 is a square – Héctor van den Boorn Jun 15 '15 at 19:28

Solution for x such that 32x+32 is a square as follows: For integral solution, x= (n2 -2)/2 such that x is in Natural number.(n is in natural number)