Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
[QUIZ] Happy Numbers (#93)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Michael Ulm, post: 4525841"] --snip-- Actually, it is possible to show that for any three digit number g(x) < x. This holds in any base. The proof: Let the base be b > 1, and the number x be x = u + b * v + b^2 * w, with 0 <= u, v, w < b, and w > 0. Then x - g(x) = u + b * v + b^2 * w - (u^2 + v^2 + w^2) = u (1 - u) + v * (b - v) + w * (b^2 - w) Regards, Michael -- Michael Ulm R&D Team ISIS Information Systems Austria tel: +43 2236 27551-219, fax: +43 2236 21081 e-mail: [email]michael.ulm@isis-papyrus.com[/email] Visit our Website: [URL="http://www.isis-papyrus.com"]www.isis-papyrus.com[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
[QUIZ] Happy Numbers (#93)
Top