117k views
3 votes
Find all numbers p such that p and p^2 are both prime. prove that you found them all

User Pjama
by
6.0k points

2 Answers

3 votes

There are no such numbers. No prime number is a square of any integer.

If
p is a prime number, then it's divisible only by 1 and
p (itself).

If
p=1\cdot p

then


p^2=(1\cdot p)^2 =1\cdot p^2=1\cdot p \cdot p

As we can see
p^2 is divisible not only by 1 and
p^2(itself), but also by
p, which means it can't be a prime number.

User Wayland Smith
by
6.3k points
1 vote

0 and 1 are neither prime nor composite. A prime is any number greater than 1 that has just 1 and itself as factors. Primes can only start at x > 1


When that happens (when you start with numbers greater than one) p^2 is a composite consisting of 2 primes, so any composite will obey the law that he number will have at least 3 factors making it up -- in this case p p^2 and 1.


So the answer to the question by definition is that 0 numbers can have the property of both p and p^2 to be prime.

User Zimano
by
7.0k points