The largest positive integer n such that the products of its digits is equal n^2 -...
Check the final answer first, then review the worked steps.
Check the final answer first, then review the worked steps.
Let $P(n) = n^2 - 10n - 22$.
If $n=12$, $P(12) = 1 \times 2 = 2$.
$12^2 - 10(12) - 22 = 144 - 120 - 22 = 2$.
Since $P(n) \le 9^k$ and $n \ge 10^{k-1}$, for $k=3$, $n^2-10n-22 \le 729 \implies n \le 32$. Checking values shows 12 is the largest.
Let $P(n)$ be the product of digits of $n$. We solve $P(n) = n^2 - 10n - 22$. For a $k$-digit number, $P(n) \le 9^k$ and $n \ge 10^{k-1}$. For $k=3$, $n^2 - 10n - 22 \le 729$, giving $n \le 32$. Testing $n$ in range $[10, 32]$, $n=29 \implies P(29)=18, 29^2-10(29)-22=559$ (no). Testing $n=15 \implies P(15)=5, 15^2-150-22=53$ (no). Testing $n=13 \implies P(13)=3, 13^2-130-22=17$ (no). Testing $n=12 \implies P(12)=2, 12^2-120-22=2$ (yes).