Prime Numbers

Find all positive integers n > 1 n > 1 such that n ( n + 1 ) 2 1 \frac{ n(n+1) } { 2} - 1 is prime.

Enter your answer as the sum of the number of such positive integers and all of the corresponding prime values.


The answer is 9.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

William Isoroku
Nov 15, 2016

Let n = 2 a n=2a , then the equation becomes:

n ( n + 1 ) 2 1 2 a ( 2 a + 1 ) 2 1 2 a ( 2 a + 1 ) 2 2 \frac { n(n+1) }{ 2 } -1\Longrightarrow \frac { 2a(2a+1) }{ 2 } -1\Longrightarrow \frac { 2a(2a+1)-2 }{ 2 } which then simplifies to a ( 2 a + 1 ) 1 a(2a+1)-1

We want this to equal to a prime p p ;

a ( 2 a + 1 ) 1 = p 2 a 2 + a ( 1 + p ) = 0 a(2a+1)-1=p\Longrightarrow 2a^2+a-(1+p)=0

Use the quadratic formula:

a = 1 + 1 + 8 ( p + 1 ) 4 a=\frac { -1+\sqrt { 1+8(p+1) } }{ 4 } , (we neglect the negative values because we want positive n n , thus must have positive a a )

Solve for the discriminant: 1 + 8 ( p + 1 ) = c 2 8 ( p + 1 ) + 1 = c 2 1+8(p+1)=c^2\Longrightarrow8(p+1)+1=c^2 for some positive integer c c because we want the discriminant to be a perfect square all the while a a also has to be an integer or a fraction that yields an integer when multiplied by 2

Simple trial and error gives us p = 2 , 5 p=2,5 and there are 2 values for n n

Note: we can also approach the last part by solving for c 2 1 ( m o d 8 ) c^2\equiv 1 (\mod{8}) by using quadratic residues.

Better yet, we can just use factorization. We have,

n ( n + 1 ) 2 1 = p n ( n + 1 ) = 2 ( p + 1 ) n 2 + n 2 = 2 p ( n + 2 ) ( n 1 ) = 2 p \frac{n(n+1)}2-1=p\iff n(n+1)=2(p+1)\iff n^2+n-2=2p\iff (n+2)(n-1)=2p

Now, since n > 1 n\gt 1 , we have n 1 { 1 , 2 , p , 2 p } n-1\in\{1,2,p,2p\} corresponding to n + 2 { 2 p , p , 2 , 1 } n+2\in\{2p,p,2,1\} from which we can note that only the first two cases give sensible values for ( n , p ) (n,p) and they are ( 2 , 2 ) (2,2) and ( 3 , 5 ) (3,5) .

Prasun Biswas - 4 years, 7 months ago

Log in to reply

You should add this as a solution.

Chaebum Sheen - 4 years, 7 months ago

Looks like I just like to complicate things

William Isoroku - 4 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...