3
$\begingroup$

I know that the sum $1+2+3+\cdots+(n-1)$ equals $\frac{(n-1)\cdot n}{2}$.

I wrote the equation in the two following forms:

$$(n-1)\cdot \frac{n}{2}=k^2$$ $$(n-1)\cdot n=2k^2$$

And I tried to find solutions by trial-and-error. I found $50$ through the first and $9$ through the second equation; and there seems to be no other solution as the answer to the question was $2$.

However, I certainly believe that there is a much more structured and methological method to solve the question that I am unfortunately unaware of.

How would you go about solving this question? Any help/hint/clue/solution would be greatly appreciated. Thanks.

  • 0
    https://en.m.wikipedia.org/wiki/Square_triangular_number2017-02-24
  • 0
    http://www.mathpages.com/home/kmath159.htm2017-02-24
  • 0
    Please check the sum as pointed out below by SchrodingersCat.2017-02-24

2 Answers 2

1

The general question of determining which triangle numbers (i.e. of the form $1+2+\dotsb+i$) are also squares is deeply related to the Pell-Fermat equation $x^2-2y^2=1$, thus it is non-trivial.

More precisely, the condition $n=\frac{t(t+1)}{2}=s^2$ is equivalent to $x^2-2y^2=1$ when setting $x=2t+1$ and $y=2s$, the values of $(x,y)$ are thus the $(x_k,y_k)$ given by $x_k+\sqrt{2}y_k=(3+2\sqrt{2})^k$, giving the values for $n$: $n_k=(y_k/2)^2$.

You easily get $s_{k+2}=6s_{k+1}-s_k$ with $(s_0,s_1)=(0,1)$, the numbers whose squares are also triangular numbers. The first ones are $0$, $1$, $6$, $35$, $204$ and $1\,189$.

  • 0
    Thank you for your great input, but I was unable to understand the transition from $x^2-2y^2=1$ to the equation $x_k+\sqrt{2}y_k=(3+2\sqrt{2})^k$. I would be more than happy if you could help me understand.2017-02-25
  • 0
    This is non-trivial. Look at https://en.wikipedia.org/wiki/Pell's_equation2017-02-25
0

As you have said, your sum is $\frac{(n-1)n}{2}$.

So, for the sum to be a perfect square, it should be of the form $4m$ if even, or $8m+1$ if odd, where $m$ is an integer.

Now, if $n=2a=\mathrm{even}$, then we have $$\frac{(n-1)n}{2}$$ $$=\frac{(2a-1)2a}{2}$$ $$=(2a-1)a$$ $$=2a^2-a$$

Now, if $n=2a+1=\mathrm{odd}$, then we have $$\frac{(n-1)n}{2}$$ $$=\frac{(2a)(2a+1)}{2}$$ $$=(2a+1)a$$ $$=2a^2+a$$

See if this helps you.

  • 0
    How strange! I always thought the sum of natural numbers up to $n-1$ was $(n(n-1))/2$, and that odd squares had the form $8m+1$ not $8m-1$.2017-02-24
  • 1
    @OscarLanzi Equally strange for me to make this look strange to you. You are right, so I edited my efforts.2017-02-24