# Number Theoretic Problem

Let $n$ be a positive integer greater than $1$ such that $3n+1$ is a perfect square number. Then show that $n+1$ is the sum of three perfect square.

I tried out the sum in different ways but cannot find any solution way.

## 1 Answer

Suppose that $3n+1=k^2$, where $k$ is an integer. Note that $k$ is not a multiple of $3$, so for some integer $s$ we can write $k=3s\pm1$. In what follows, all $\pm$ signs are $+$ if $k=3s+1$, and are $-$ if $k=3s-1$.

We have that $$\begin{array}{rcl}n+1&=&(3n+3)/3=((3n+1)+2)/3=((3s\pm1)^2+2)/3\\ &=&(9s^2\pm6s+3)/3=3s^2\pm2s+1\\ &=&s^2+s^2+(s\pm1)^2.\end{array}$$