I know a triangular number is given by the formula $\frac{n(n+1)}{2}$
I also know that an even perfect number is given by $2^{n-1}(2^{n}-1)$ if $(2^n-1)$ is prime.
Please help me to prove this.
I know a triangular number is given by the formula $\frac{n(n+1)}{2}$
I also know that an even perfect number is given by $2^{n-1}(2^{n}-1)$ if $(2^n-1)$ is prime.
Please help me to prove this.
On
You could think as follows:
Every triangular number you can represent as follows:
$$ \bullet\\ \ \ \ \ \bullet\ \bullet\\ \ \ \ \ \ \ \ \ \ \bullet\ \bullet\ \bullet \\ \ \ \ ... $$
that is $1+2+3+\ldots +n=\frac{n(n+1)}{2}$.
Multiplying this by $2$ gives a rectangle
$$ \bullet\ \circ \ \circ \ \circ\\ \bullet\ \bullet \ \circ \ \circ\\ \bullet\ \bullet\ \bullet \ \circ\\ $$
with one side exactly one unit longer than the other.
So if you build such a rectangle and you choose one side of the rectangle to be $2^k$ long, the other side will be $(2^k-1)$ long (where you picked $k$ so that $(2^k-1)$ is prime as required.). It will have "area" (i.e. nunber of dots in it) $2^k(2^k-1)$ and the half of this is always a triangular number.
Since you can do this for any $k$ fullfilling the condition that $2^k-1$ is prime you showed
$$ \frac{n(n+1)}{2}=2^{k-1}(2^k-1), $$
so $$ \text{$a$ is perfect}\Rightarrow \text{$a$ is triangular}. $$
You should use different variables in the two expressions. An even perfect number is then $2^{k-1}(2^k-1)$ You need to find an $n$ such that $\frac 12n(n+1)=2^{k-1}(2^k-1)$. I find the right side quite suggestive. Therefore $n=2^{k}-1$