HP Forums
Little math problem(s) December 2018 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Little math problem(s) December 2018 (/thread-11983.html)



Little math problem(s) December 2018 - pier4r - 12-19-2018 08:54 PM

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?


RE: Little math problem December 2018 - Thomas Klemm - 12-19-2018 09:20 PM

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


RE: Little math problem December 2018 - pier4r - 12-19-2018 10:39 PM

Thanks for the spoiler. I completely forgot to give a template.