# Thread: Prime number and square number

1. ## Prime number and square number

Hi

The difference between a prime number and a square number is 100. Which is larger?

2. ## Re: Prime number and square number

Let's call the square number $n^2$ and the prime number $p$. Suppose $n^2>p$. Then, we know $n^2-100=p$. But, the left hand side factors to $(n+10)(n-10)$. Since $n^2$ is a perfect square, we know that $n$ is an integer, and so $n+10$ and $n-10$ are both integers. However, this implies that $p$ is a composite number, which is a contradiction. Therefore it must be that $p>n^2$.
Example: $p=101, n^2=1$.

3. ## Re: Prime number and square number

Thanks very much

4. ## Re: Prime number and square number

Originally Posted by mathsquestion
Thanks very much
My argument was incomplete. I should have stated that $(n+10)(n-10)=p$ is prime if $n-10=1$ and $n+10$ is prime. However, if $n-10=1$, then $n+10=21$ is not prime, so it must be that $(n+10)(n-10)$ is composite.