Skip to main content
3 of 4
removed irrelevant comm alg tag
Yemon Choi
  • 25.8k
  • 9
  • 69
  • 156

Sum of digits of number A which equals sum of digits of x*A

I need to find all decimal numbers $a1,a2,a3,...,an$ in a range [0; $10^15$] which have following property: digit sum of $a1$ equals digit sum of $x*a1$ for any decimal number $x>0$.

I found this link http://mathworld.wolfram.com/CastingOutNines.html which looks quite relevant to my task, but I can't figure out how to apply it.

Any ideas?

Jull
  • 13
  • 5