To do list:
Your jobs is to create a program that asks the user for two pieces of data:
- The lower bound of the sequence
- The upper bound of the sequence
Then you check the values from the lower bound (inclusive) to the upper bound (inclusive) and make a report of them. During the analysis of each number, if a Lychrel number is found it should be reported immediately with something like “Found a Lychrel number: 196”
The report must show:
- The range of numbers analysed (lower to upper bound)
- The number of natural palindromes (no addition to inverse needed)
- The number of non-Lycherels encountered (become palindromes)
- The number of Lycherel number candidates (that did not converge to palindrome)
Since you will not be able to prove that a number is Lycherel (since you cannot computer forever to check), our definition for a Lycherel candidate will be if a number does not converge after 30 iterations of applying the addition to the inverse.
Ok, people, I know, this task is kind of insane, but let me show you my program (I needed a lot of help on this one):
Second part of the program:
Third and (thank God) last part:
The results:
Really hard one. Let’s move.
#WSQ11 – Yo Soy 196 by manuelmendezhijar is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.