A positive integer is called shiny if it can be written as the sum of two not necessarily distinct integers a and b which have the same sum of their digits. For instance, 2012 is shiny, because 2012 = 2005 + 7, and both 2005 and 7 have the same sum of their digits. Find all positive integers which are not shiny (the dark integers).
Rather than prove which numbers are dark, it may be easier to prove which numbers are shiny:
First all even numbers are shiny: 2n = n+n which is specifically allowed.
It shouldn't be too hard to prove every number ending in 1 is shiny, (but I'm having a bit of trouble if the number ends in 91 or 01.)
Same with ending in 3,5,7.
It may be helpful to note: If x is shiny and y is an n-digit shiny number then x*10^n + y is shiny. This may help to explain the form of the dark numbers.
|
Posted by Jer
on 2013-06-21 10:05:40 |