# How many prime numbers are also triangular numbers?

I've been trying to figure this out and it's been getting on me myself. I know that $3$ is not just a prime number, but also a triangular number. I'll now add a sequence:

Prime numbers: $2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107$ Triangular numbers: $1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300$

Anyway, let's cut to the chase. Does this sequence help anything about which prime numbers are also triangular numbers? Now I want to know from you, yeah, you. How many prime numbers can also be triangular numbers? I don't think it's probable. If you have serious, stupendous answers, I would be glad to accept one of them.

## 3 Answers

The triangular numbers have the form $\cfrac {n(n+1)}2$. If $n\gt 2$ then whether it is $n$ or $n+1$ which is even, the triangular number has a factorisation into two integers both greater than one, and can't be prime.

Every triangular number can be written in the form $T_n = (1/2)n(n+1)$, which can be simplified, because either n or n+1 is even, so we can remove the factor of 1/2 and see that $T_n$ can be factorised. This works except for all n > 2, hence 3 is the only prime triangular number.

The only number that is triangle and prime is 3. The triangle numbers can be generated from T= 2n^2+/-n = (n)(2n+/-1) so that when n=1, triangle number 3 is generated, and when n=2, triangle numbers 6 and 10 are generated, etc. From this, you can see that triangle numbers can always be factored into the (n)(2n+/-1) form, notwithstanding n=1 as a factor.

Hope this helps.

• LaTex would make your answer much more readable. – zz20s Apr 21 '16 at 1:21
• $1$ is not a prime. – Seven Apr 21 '16 at 1:53