4. For which bases $b>6$ does the representation 5654 stand for a power of a prime number?
SOLUTION: The writing 5654 in base $b$ represents the number $N=5 b^{3}+6 b^{2}+5 b+4=(b+1)\left(5 b^{2}+b+4\right)$. If $b$ is odd, $b+1$ is even; conversely, if $b$ is even, $5 b^{2}+b+4$ is even. In either case, $N$ is even, and thus is a power of 2.

It follows that $b+1$ and $5 b^{2}+b+4$ are both powers of $2: b+1=2^{n}$ and $5 b^{2}+b+4=2^{m}$. We observe that $5 b^{2}+b+4 \geq b+4$ for any $b$, so $m>n$. From the first equation, we get $b=2^{n}-1$, and since $b>6$, then $n \geq 3$. Substituting into the second equation, we obtain: $5 \cdot 2^{2 n}-9 \cdot 2^{n}+8=2^{m}$. Dividing by 8 and rearranging, we get:

$$
5 \cdot 2^{2 n-3}-2^{m-3}=9 \cdot 2^{n-3}-1 .
$$

Since $m>n \geq 3$, the left side of the equation is even, so $9 \cdot 2^{n-3}-1$ must also be even; it follows that $n=3$, and the equation becomes $5 \cdot 8-9+1=2^{m-3}$, from which $m=8$. Therefore, the writing 5654 in base 7 represents $2048=2^{11}$, and $b=7$ is the only solution to the problem.

SECOND SOLUTION: The proof of divisibility by 11 for numbers written in decimal can be mimicked as follows: $b \equiv-1(\bmod b+1)$, so

$$
N=5 b^{3}+6 b^{2}+5 b+4 \equiv 5(-1)^{3}+6(-1)^{2}+5(-1)+4 \equiv 0 \quad(\bmod b+1)
$$

Since $(b+1) \mid N$, both $b+1$ and $N /(b+1)$ must be powers of the same prime. Now $N /(b+1)=5 b^{2}+b+4=$ $(5 b-4)(b+1)+8$; it follows that the greatest common divisor between $b+1$ and $N /(b+1)$ must divide 8. But, among two powers of the same prime, the greatest common divisor is the smaller of the two numbers: in this case, clearly $b+1$. Therefore, since $b>6$, the only possibility is $b+1=8$, i.e., $b=7$ which, upon direct verification, gives a solution.