# Digit sum & digit product of number x

• Jan 19th 2011, 04:57 AM
fhactor
Digit sum & digit product of number x
For every natural number x, let S(x) be the sum and P(x) the product of
the (decimal) digits of x. Show that for each natural number n there exist infinitely
many values of x such that. $\displaystyle S(S(x)) + P(S(x)) + S(P(x)) + P(P(x)) = n$

The problem is from final round of Austrian MO '83 and I really can't find any solution on the internet. So I am asking for help, maybe you know it, thanks in advance.
• Jan 19th 2011, 08:07 AM
Opalg
Quote:

Originally Posted by fhactor
For every natural number x, let S(x) be the sum and P(x) the product of
the (decimal) digits of x. Show that for each natural number n there exist infinitely
many values of x such that. $\displaystyle S(S(x)) + P(S(x)) + S(P(x)) + P(P(x)) = n$

The problem is from final round of Austrian MO '83 and I really can't find any solution on the internet. So I am asking for help, maybe you know it, thanks in advance.

Here's one suggestion. Others may have neater constructions.

For positive integers p,q, let $\displaystyle x_{p,q}$ be the integer whose decimal form consists of p 1s followed by q 0s. In other words, $\displaystyle \displaystyle x_{p,q} = \sum_{j=q}^{p+q-1}10^j$. Then $\displaystyle S(x_{p,q}) = p$ and $\displaystyle P(x_{p,q}) = 0$. Now take $\displaystyle p=x_{n,1}$. Then $\displaystyle S(S(x_{p,q})) = S(x_{n,1}) = n$, and $\displaystyle P(S(x_{p,q})) = S(P(x_{p,q})) = P(P(x_{p,q})) = 0$. As q varies, that gives an infinite family of integers $\displaystyle x_{p,q}$ with $\displaystyle S(S(x_{p,q})) + P(S(x_{p,q})) + S(P(x_{p,q})) + P(P(x_{p,q})) = n$.