HP Forums

Full Version: Little math problem(s) December 2018
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Given a random positive integer N, compute the sum S of its digits (for example 50 -> S = 5 + 0 = 5). Subtract this sum from N, thus getting the result "R=N-S".

What is the smallest divisor greater than 1 that can divide evenly every R so computed? Why is it so?
Code:
Spoiler Alert!















Since 10^k - 1 ≡ 0 (mod 9) the result R is divisible by 9.
The smallest divisor of 9 greater than 1 is 3.

Cheers
Thomas
Thanks for the spoiler. I completely forgot to give a template.
Reference URL's