A question in Google Code Jam 2019 qualification round wanted a positive integer n which contains at least one digit 4 to be represented as a sum of two positive integers a and b, neither containing 4.
For my solution, I found that simply replacing all 4s in n with 3s to get a always results in no 4s in b for all n < 100,000,000 (when it starts taking too long on my puny laptop). Can it be proven that this method always works for any integer n?
More generally, can I always replace digit d with d - 1, for n > 1?
It is easy to construct the desired summands :
To get the first summand, replace every digit $\ 4\ $ by digit $\ 2\ $ The difference between those numbers only contains twos and zeros and a representation is found.