For each positive integer $k$, let $S(k)$ be the sum of the digits of $k$ in the decimal system. Find all positive integers N for which there exist positive integers $a$,$b$,$c$, coprime two by two, such that: $S(ab) = S(bc) = S(ca) = N$.
Source: 2010 Peru Iberoamerican TST problem 2
Tags: number theory
For each positive integer $k$, let $S(k)$ be the sum of the digits of $k$ in the decimal system. Find all positive integers N for which there exist positive integers $a$,$b$,$c$, coprime two by two, such that: $S(ab) = S(bc) = S(ca) = N$.