# Number of theory

1. Oct 13, 2012

### papacy

1. The problem statement, all variables and given/known data

if p and p+2 are twins prime and p+1 is triangular number, then find all twin primes.

2. Relevant equations

Tn is a triangular number if Tn=1+2+...+n = n(n+1) / 2

3. The attempt at a solution
p+1 = n(n+1) / 2 because p+1 is a triangular number
p , p+1 , p+2 are terms in succession
p is prime, p+2 is prime so 3 divide p+1 --> 3/p+1
sure the p+1 is even number because is between of two prime
so p+1 has the form 6k
i don't how to continue.. can someone help me??

Last edited: Oct 13, 2012
2. Oct 15, 2012

### Petek

I think the statement of the problem should be:

Find all twin primes p and p + 2 such that p + 1 is a triangular number.

You showed that if p and p + 2 are primes, then p + 1 is divisible by 6. That statement is true, but I couldn't see how it helps to solve the problem. Here's how I came up with a solution. Let T(n) = n(n+1)/2 be the nth triangular number. Create a table as follows:

$$\begin{array}{cc} n& T(n)& T(n) - 1& T(n) + 1\\ 1& 1& 0& 2\\ 2& 3& 2& 4\\ 3& 6& 5& 7\\ 4& 10& 9& 11\\ \end{array}$$

and so on. Note that for n = 3, we obtain the twin primes 5 and 7 that satisfy the required condition. Now extend the table for several more values of n (up to n = 10 for example). Do you find any more twin primes? Do you see a pattern (especially in the values of T(n) - 1)? If so, state the pattern precisely and prove it.

Please post again if you have any questions or would like additional hints.