Find values of $n$ that yield a prime number

109 Views Asked by At

Let $n$ be a positive integer, and $\frac{n(n+1)}{2}-1$ is a prime number. Find all possible values of n.

What I have so far is this: $$\frac{n(n+1)}{2}-1=2, n=2$$ Also, $n^2+n-2\over2$ can be factorized to be $(n+2)(n-1)\over2$.

What other values of $n$ are there, and how do you compute them? This question was from my Math Challenge II Number Theory packet.

3

There are 3 best solutions below

0
On BEST ANSWER

If you have $p={(n+2)(n-1)\over2}$, then $2p=(n+2)(n-1)$ and so there are only two possibilities:

  • $n-1=2$ and $n+2=p$.

  • $n-1=1$ and $n+2=2p$.

2
On

HINT: Have you tried putting this over a common denominator and factorising the numerator?

If you are flagging this as "contest math" and aspiring to compete you really need to work through the basics before getting more of a clue than that.

0
On

Hint: $\frac{(n)(n+1)}{2} - 1 = p$

$n^2 + n -2 = 2p$, can you take it from here?