# Find all primes that satisfy the condition

#### Cabbage

$p|2^p+1$

p is a prime

I know how to prove this but I need some help in steps.

In factoring $2^p+1$ we will always have a term (2+1) because we know that $a^n + b^n = (a+b)\cdot P$ where P is a polynomial... I know this is true but I don't know how to prove it

But if i can prove the thing above then we know that one prime which satisfies the condition is 3.
And now I also need to check if that P can somehow be a prime... But i don't know how

#### johng

Since this is number theory, you should probably know Fermat's little theorem. For $p$ any prime and $a$ any integer,
$$a^p\equiv a\, (\text{mod } p)$$
From this you can get
$$2^p+1\equiv 3\,(\text{ mod }p)$$
Also by hypothesis,
$$2^p+1\equiv 0\,(\text{ mod }p)$$
You should be able to finish from here.

Last edited:
1 person

#### Cabbage

Since this is number theory, you should probably know Fermat's little theorem. For $p$ any prime and $a$ any integer,
$$a^p\equiv a\, (\text{mod } p)$$
From this you can get
$$2^p+1\equiv 3\,(\text{ mod }p)$$
Also by hypothesis,
$$2^p+1\equiv 0\,(\text{ mod }p)$$
You should be able to finish from here.
Luckily I know congruences but I don't know Fermat's little theorem(I posted this in Algebra but it was moved)
I don't really have an idea on how to finish the proof from what you wrote (I am "9th" grade right now, in Croatia that is 1st grade of high school, the thing where you go when you're 15 years old)

#### johng

Hi cabbage,
I've been trying to think of a way to solve your problem without Fermat's little theorem, but I'm stuck.
From my previous post:
$$2^p+1\equiv 0\,(\text{mod }p)\text{ and } 2^p+1\equiv 3\,(\text{mod }p)$$
imply (using the properties of congruence)
$$3\equiv 0\,(\text{mod }p)$$
So $p$ divides 3 and since $p$ is a prime, $p=3$.

1 person