Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, a simple consequence of e.g. 3-digit number being:

100x + 10y + z modulo 3

Removing 9y and 99x gives equivalence: x + y + z modulo 3

Now what’s left is induction with proper base (1-digit).



As dan-robertson mentioned in another branch, you don't even need induction - you can sidestep it by writing X = sum_i x_i 10^i and noticing that all the 10^i are 1 modulo 9 (and therefore modulo 3).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: