1. ## Divisiblility

Find all $(a,b)$,
where a is a prime number, $2a \geq b$

such that

$(a-1)^b+1 \equiv 0 \bmod b^{a-1}$

2. First consider $
a > 2
$

In this case we have: $
\left( {a - 1} \right)^b + 1
$
odd, thus $b$ is odd.

The case $b=1$ is trivial, so consider $b>1$

Let $
p = \min \left\{ {x \in \mathbb{Z}^ + /x \ne 1 \wedge \left. x \right|b} \right\}
$
this turns out to be the smallest prime dividing $b$

Now: $
\left( {a - 1} \right)^b + 1 \equiv 0\left( {\bmod .b^{a - 1} } \right) \Rightarrow \left( {a - 1} \right)^b \equiv - 1\left( {\bmod .p} \right){\text{ (*)}}
$
$\Rightarrow \left( {a - 1} \right)^{2b} \equiv 1\left( {\bmod .p} \right){\text{ (**)}}$

Let $
t = {\text{ord}}_{\text{p}} \left( {a - 1} \right) \Rightarrow \left. t \right|\left( {2b} \right)
$
because of $
{\text{(**)}}
$
and we also have $
\left. t \right|\left( {p - 1} \right)
$
(by Fermat's Little Theorem)

Thus $
\left. t \right|{\text{gcd}}\left( {2b,p - 1} \right)
$
and note that: $
{\text{gcd}}\left( {2b,p - 1} \right) = 2 \Rightarrow \left. t \right|2 \Rightarrow \left( {a - 1} \right)^2 \equiv 1\left( {\bmod .p} \right)
$
that is $
p\left| {\left[ {\left( {a - 1} \right)^2 - 1} \right]} \right.
$
and using Euclid's Lemma we get: $
\left. p \right|a{\text{ OR}}\left. {{\text{ }}p} \right|\left( {a - 2} \right)
$

If we had: $
\left. {{\text{ }}p} \right|\left( {a - 2} \right) \Rightarrow \left( {a - 1} \right)^b \equiv \left( 1 \right)^b \equiv 1\left( {\bmod .p} \right)
$
, contradicting $\text{(*)}$ $
\Rightarrow \left. p \right|a \Rightarrow p = a \Rightarrow \boxed{\left. a \right|b}
$

Now since $2a\geq{b}$ it follows that we have $
b = 2a{\text{ or }}b = a
$

If $b=a$ then $
a^{a - 1} \left| {\left[ {\left( {a - 1} \right)^a + 1} \right]} \right.
$
and expand $
\left( {a - 1} \right)^a + 1
$
by using the Binomial Theorem: $
\left( {a - 1} \right)^a + 1 = \binom{a}{1}\cdot a - \binom{a}{2}\cdot a^2 \pm ...
$
and note that $a|\binom{a}{k}$ for all $0 thus $a^2\left| {\left[ {\left( {a - 1} \right)^a + 1} \right]} \right.$ but note that $
\tfrac{{\left( {a - 1} \right)^a + 1}}
{{a^2 }} \equiv 1\left( {\bmod .a} \right)
$
thus $a-1\leq 2$ thus $a=3$ and we get the solution $(a,b)=
{\left( {3,3} \right)}
$

If $b=2a$ we find that $a\not|
\left[ {\left( {a - 1} \right)^{2a} + 1} \right]
$
hence this generates no solutions.

Now it only remains to check what happens when $a=2$, here we have $
\left( {a - 1} \right)^b + 1 = 2
$
and so $b=1$ or $b=2$.

Thus the solutions are $
\left( {a,1} \right)\forall a\in\mathbb{Z^{+}};\left( {2,2} \right);\left( {3,3} \right)
$