I am looking for cases in which $\sqrt{3n(n+1)}$ is an integer, i.e. cases in which $$ 3n(n+1)=m^2,\quad m\in\mathbb{N}. $$ I can find solutions such as $$ n=0,3,48,675,9408,131043,\dots $$ and I expect this list to be infinite. Is it? Is there a straightforward way to prove these kinds of statements?

There are many ways of reframing the problem: finding integers $n$ that are simultaneously 3 times a perfect square and 1 less than another perfect square (choosing $3n$ and $n+1$ to each be perfect squares), etc. Then I could set $n=3k^2$ and try to solve for cases in which $$ 3k^2+1=l^2 \quad\Leftrightarrow\quad 3k^2=(l+1)(l-1)\quad k,l\in\mathbb{N}. $$ It seems plausible that there are infinite solutions given the various formulas for perfect squares but none of the rabbit holes that I followed led me anywhere productive.

  • 4
    $\begingroup$ See oeis.org/A007654 $\endgroup$
    – lhf
    Jun 22, 2021 at 23:37
  • $\begingroup$ Very helpful, thank you. To be honest, even telling me to go look into Diophantine equations would have been a huge help, so this is bonus $\endgroup$ Jun 23, 2021 at 0:23

2 Answers 2


Yeah, there's infinitely many. You can see this by considering a particular case:

if $3n$ and $n+1$ are both squares.

we can parametrize this by $n = 3k^2$.

Then we need $3k^2+1=a^2$

So we want to solve $a^2-3k^2=1$ which is a Pell equation.

the fundamental solution $(a_1,k_1)$ is $(2,1)$ and the other solutions are obtained via the recurrence $a_{n+1}=2a_n + 3k_n, k_{n+1} = a_n+2k_n$.

So we get the solutions are:

$(7,4),(26,15),(97,56), \dots$

  • 3
    $\begingroup$ And the other case is when $n$ and $3(n+1)$ are both squares, or $x^2-3y^2=3,$ for which there are no solutions $\endgroup$ Jun 23, 2021 at 0:13
  • $\begingroup$ oh ! thanks ! I thought the other case would also be easy but I was too lazy to work it out ! Thanks a lot ! $\endgroup$
    – Asinomás
    Jun 23, 2021 at 0:14
  • 1
    $\begingroup$ I had not heard of Pell equations - very helpful, especially the recurrence relation $\endgroup$ Jun 23, 2021 at 0:24
  • 2
    $\begingroup$ The recurrence comes from $a_n+k_n\sqrt3=(2+\sqrt 3)^n.$ @QuantumMechanic $\endgroup$ Jun 23, 2021 at 0:32

From your equation, we get that $3 \mid m$, so let $m = 3j$, plus do certain manipulations, to get

$$\begin{equation}\begin{aligned} 3n(n+1) &= (3j)^2 \\ n^2 + n & = 3j^2 \\ 4n^2 + 4n & = 12j^2 \\ 4n^2 + 4n + 1 & = 12j^2 + 1 \\ (2n + 1)^2 & = 12j^2 + 1 \\ (2n + 1)^2 - 12j^2 & = 1 \end{aligned}\end{equation}\tag{1}\label{eq1A}$$

Note this is a Pell's equation. For a coefficient of $12$, the fundamental solution is

$$x_1 = 7 = 2n + 1 \implies n = 3, \; \; y_1 = j = 2 \implies m = 6 \tag{2}\label{eq2A}$$

Since your initial solution of $n = 0$ makes $j = 0 \implies y_1 = 0$, it's not a positive integer so it's not included. The additional solutions section states the remaining solutions are determined from

$$2n + 1 = x_{k+1} = x_1 x_k + 12(y_1 y_k) \tag{3}\label{eq3A}$$

$$j = y_{k+1} = x_1 y_k + y_1 x_k \tag{4}\label{eq4A}$$

Since $y_1$ is even, then \eqref{eq4A} shows all $y_{k+1}$ are also even. Similarly, since $x_1$ is odd, then \eqref{eq3A} shows all $x_{k+1}$ are odd, so there's always a corresponding integer value of $n = \frac{x_{k+1}-1}{2}$.

  • 1
    $\begingroup$ Very good, thank you. My physical problem ignores the $n=0$ solution anyway so this all helps. $\endgroup$ Jun 23, 2021 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.