I am trying to find the value of $p$, a prime number of which we only know that $p>5$ and:

$p│(3^{p+1} +5^{p-1} + 1)$

This is part of a collection of exercises regarding divisibility, Fermat's little theorem and congruences (among others).

Seeing that the second term has $5^{p-1}$, I imagine Fermat's little theorem could be used on that, but I don't know how to advance from there.

Any help/hints are welcome!

(currently stuck trying to take the value from the main expression knowing that $3^{p-1}\equiv 1\bmod p$ and $3^{p-1}*3^2\equiv 3^2\bmod p$, so $3^{p+1}\equiv 3^2\bmod p$, also $5^{p-1}\equiv 1\bmod p$)

  • 1
    $\begingroup$ Hint: $3^{p+1}=3^{p-1}\cdot 3^2$. $\endgroup$ – metamorphy May 4 at 16:58

Hint: If $p│3^{p+1}+5^{p-1}+1$, that is the same as saying that $3^{p+1}+5^{p-1}+1\equiv 0\bmod p$. But you know the values of $3^{p+1}\bmod p$ and $5^{p-1}\bmod p$.

| cite | improve this answer | |
  • $\begingroup$ thanks, so $3^{p-1}\equiv 1\bmod p$ and $3^{p-1}*3^2\equiv 3^2\bmod p$, so $3^{p+1}\equiv 3^2\bmod p$, also $5^{p-1}\equiv 1\bmod p$, but I am not sure how to go from there in the "main" congruence $\endgroup$ – Lightsong May 5 at 6:58
  • $\begingroup$ @Lightsong: Now it's easy! I can't see your problem, I'm afraid. $\endgroup$ – TonyK May 5 at 10:11
  • $\begingroup$ I literally don't know what to do after that $\endgroup$ – Lightsong May 5 at 10:53
  • $\begingroup$ $3^{p+1}+5^{p-1}+1\equiv 0\bmod p$ $\endgroup$ – TonyK May 5 at 11:32
  • $\begingroup$ Yes, but I am not sure how to manipulate the congruence so that I can "substract" terms (I assume it has to be done like that), in order to get the value of $p$ $\endgroup$ – Lightsong May 5 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.