Problem

Source: Baltic Way 2023/17

Tags: number theory



Find all pairs of positive integers $(a, b)$, such that $S(a^{b+1})=a^b$, where $S(m)$ denotes the digit sum of $m$.