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="Hans Fugal, post: 4525280"] What you have described here is the halting problem. Good luck with that. And what stops it from being a 1x10^50 length period, or any arbitrary length? And what the quiz neglected to mention is that there is an easy test for unhappy number, which the mathworld page enumerates: Iterating this sum-of-squared-digits map always eventually reaches one of the 10 numbers 0, 1, 4, 16, 20, 37, 42, 58, 89, or 145 (Sloane's A039943; Porges 1945). So if you hit one of those unhappy numbers you know you're in an unhappy loop. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
[QUIZ] Happy Numbers (#93)
Top