# $(4k-1)^2 +(4k)^2$ is a perfect square

Let $k$ be strictly bigger than $1$. Is there any integer $k$ such that $(4k-1)^2+(4k)^2$ is a perfect square?

My computation shows that there are infinitely many such $k$, namely those arising from the Pell equation $X^2-2Y^2=-1$.

However the solution manual says that there are no such $k$.

Could anyone tell me the right answer and solution preferrably without using Pell equation?

• Yes, there are infinitely many $k$. Since the question only asks for one $k$, just use Pell's equation to find it and give that one value of $k$ as the solution. – Erick Wong Jun 24 '13 at 22:26

If you have a solution $(k,w)$ to $$(4k-1)^2 + (4k)^2 = w^2,$$ you get the next larger $(k,w)$ pair with $$(17 k + 3 w - 2, 96 k + 17 w - 12)$$

So the $(k,w)$ pairs are

$$(1,5),$$ $$(30,169),$$ $$(1015,5741),$$ $$(34476,195025),$$ $$(1171165,6625109),$$ $$(39785130,225058681),$$ $$(1351523251,7645370045),$$ and so on.

There are no Pell equations here. These are not the droids you seek. Attention Deficit Ooh Shiny!

• Boy,... – Pedro Tamaroff Jun 24 '13 at 23:25
• @PeterTamaroff, it's a dangerous world. – Will Jagy Jun 24 '13 at 23:27
• Where does this formula come from? – lhf Jun 25 '13 at 1:13
• @lhf, ssshhh, Pell equation, don't tell anyone, the OP does not like them. More to the point, the integral automorphism/isometry/orthogonal group of $x^2 - 2 y^2.$ – Will Jagy Jun 25 '13 at 1:21

For $k=30$, you have $119^2+120^2=169^2$

There is indeed a Pell equation involved here. When two adjacent numbers whose square sums to a square, the octagonal series is involved. This approximates $\sqrt{2}$, for which the relevant number is 6.

  0    1   2    5   12   29   70   169    x   X=x+y
1    1   3    7   17   41   99   239    y   Y=x+X


The solutions you seek are to be found when the first number is an odd number in the top row. The case here is $2*5*12=120$ and $7*17=119$, these add up to some odd number in the top row, here $169^2$.

The series might be found, by $c(n+1)= 6 \cdot c(n) - c(n-1)$, the series here is $(A*B)^2 + (2*C*D)^2$

   A   1    7   41      239      1393
B   3   17   99      577      3363
C   1    5   29      169       985
D   2   12   70      408      2378
E   5  169  5741  195025   6625109


The final square can be derived by a similar series to above, by replacing $6$ by $34$, which gives the values in E in the table above.