IMO 1988 LL KOR58

For each pair of positive integers k and n, let Sk(n) be the

IMO 1988 LL KOR58

Origin: KOR

Problem

For each pair of positive integers k and n, let Sk(n) be the base-k digit sum of n. Prove that there are at most two primes p less than 20,000 for which S31(p) is a composite number.