I'm supposed to find all supposed Lychrel numbers. If in 50 iterations number doesn't become palindromic then it's Lychrel number. I can't seem to get the right answer; I figured out that it may a problem of data types, because when I changed all ints to unsigned long long, the total number of Lychrel numbers decreased.
I am currently doing the Project Euler problems too. I haven't done this one yet but I'm pretty sure the problem lies with the fact that some of the numbers generated are too large for the unsignedlonglong type. In the question it says that 10677 requires over 50 iterations before reaching a palindrome (4668731596684224866951378664), which is 28 digits long. I know you are looking for the number of lychrel numbers below 10,000 but the size of that 28 digit palindrome shows that you will be dealing with some very large numbers. You will need to download and install a library to deal with very large numbers such as:
I tried and failed to install these btw, but the first one is what everyone recommends for dealing with extremely large numbers.
Also, in your question you say "If in 15 iterations number doesn't become palindromic then it's Lychrel number" but in the PE question it says that you should assume it is not a lychrel number if it doesn't become palindromic in 50 iterations, so you may be making a mistake there.