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="Jacob Fugal, post: 4525727"] WARNING: Just more math geeking ahead. If you don't care for this section of the thread, just skim on past... :) A nitpick, it should be: u (1 - u) + v * (b - v) + w * (b^2 - w) >= u (1 - u) + b^2 - 1 rather than a strict less than. Doesn't affect the outcome of the proof, since the following inequality is still correct. In the case where v = 0 and w = 1 u (1 - u) + v * (b - v) + w * (b^2 - w) = u (1 - u) + 0 * (b - 0) + 1 * (b^2 - 1) = u (1 - u) + b^2 - 1 For those following along at home, it might be hard to see why it must be less in all other cases -- I had a hard time with it for a while. Imagine v > 0. v * (b - v) > 0 since b > v. So that term can only make the expression larger. Also imagine w > 1. w * (b^2 - w) = w * b^2 - w^2 = b^2 + (w - 2) * b^2 + b^2 - w^2 = b^2 + (w - 2) * b^2 + (b - w) (b + w) Since b > w, b - w > 0. Also, b + w > b >= 2. So (b - w) (b + w) >= 2 > 1: w * (b^2 - w) > b^2 + 1 + (w - 2) * b^2 Now since w >= 2, (w - 2) * b^2 >= 0, and we have: w * (b^2 - w) > b^2 + 1 And that term can only increase as well. So as Michael showed, g(x) < x for all x with three or more digits in the respective base. Jacob Fugal [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
[QUIZ] Happy Numbers (#93)
Top