Post Reply 
Little math problem(s) December 2018
12-19-2018, 08:54 PM (This post was last modified: 12-26-2018 09:19 PM by pier4r.)
Post: #1
Little math problem(s) December 2018
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?

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-19-2018, 09:20 PM
Post: #2
RE: Little math problem December 2018
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
Find all posts by this user
Quote this message in a reply
12-19-2018, 10:39 PM
Post: #3
RE: Little math problem December 2018
Thanks for the spoiler. I completely forgot to give a template.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)