Let n be any natural number. If the natural number n 1 obtained by reversing the number of digits of n is equal to n, then n is called palindrome. For example, if n= 123432 1, then n is called a palindrome; But if n= 1234567, then n is not a palindrome.
note:
1. Even numbers have palindromes 12442 1.
2. Decimals have no palindromes
Basic introduction of Chinese name: palindrome number mbth: palindrome number definition: basic information of the same reading integer, palindrome number within 1 thousand, palindrome number squared, examples, research status, palindrome number algorithm, palindrome number exploration process, programming realization, JAVA source program, programming with visual basic6.0, C language, python source program, manacher algorithm (O(n). The basic situation is that the number of palindromes within 1 thousand is 22, 33, 44, 55, 66, 77, 88, 99,1011,1. 14 1, 15 1, 16 1, 17 1, 18 1, 19 1,202,2 12,222,232,242, 252,262,272,282,292,303,3 13,323,333,343,353,363,373,383,393,404, 4 14,424,434,444,454,464,474,484,494,505,5 15,525,535,545,555, 565,575,585,595,606,6 16,626,636,646,656,666,676,686,696,707,7 17, 727, 737, 747, 757, 767, 777, 787, 797, 808, 8 18, 828, 838, 848,858,868,878,888,898,909,96544. For example: 12 1. There are only three square cycles from 100 to 1000, namely: 12 1, 484,676. Where 12 1 is the square of 1 1. 484 is the square of 22 and four times as much as 12 1. 676 is the square of 26, which is also four times that of 169. For example, any number can be added in the following ways: 29+92= 12 1 and194+491= 685,586+685 =1271. 1271+1721= 2992 However, many numbers have not found such characteristics (for example, 196, The other individual square number is the square of palindromes1=1=1211655438+0 =123432/. Please see:12× 42 = 24× 2134× 86 = 68× 43102× 402 = 204× 2012× 4202 = If the positions of the factors on both sides of the palindrome formula above are reversed, a palindrome formula will still be obtained. For example, if the positions of factors on both sides of "12×42=24×2 1" are reversed, the formula will be obtained: 42× 12=2 1×24. There is a more wonderful palindrome formula, please see:12× 231=132× 21(the product is 2772)12× 4032 = 2304× 21. Assuming abba, it is equal to a *1000+b *100+b *10+a,10010b. Divisible by 1 1 The same is true for six digits, which can also be divisible by 1 1. Moreover, with the help of computers, it has been found that the palindromes in complete square numbers and complete cubic numbers are much larger than those in general natural numbers. For example,112 =1,22 2 = 484, 7 3 = 343,113 =133. So far, people have not found palindromes of the fifth power of natural numbers (except 0 and 1) and higher powers. So mathematicians guess that there is no n k (n ≥ 2, k ≥ 5; N and k are natural numbers). In the practice of electronic calculator, we also found an interesting thing: any natural number is added with its inverse number, and the sum obtained is also added with the inverse number of sum ... If this process is repeated, a palindrome number will be obtained after a limited number of steps. This is just a guess, because some numbers have not been "tamed". For example, the number 196 has been repeated hundreds of thousands of times according to the above transformation rules, and still no palindrome has been obtained. However, people are not sure that they will never get palindrome after the operation, and they don't know how many steps are needed to finally get palindrome. Palindrome algorithm randomly finds a decimal number, turns it into another number, and then adds these two numbers to get a sum, which is the first step; Then add this sum in turn to the original sum to get a new sum. This is the second step. According to this method, count down step by step until a palindrome number is n, for example, 28+82 = 1 10,11=12/kloc-0. If you keep counting, you will get more palindromes. This process is called "196 algorithm". The number 196 mentioned in the process of exploring palindromes is the first possible "Likelill number", so it has received the most attention. Since it can't be proved that a number can never form a palindrome, the proposition that "196 and other (seemingly) numbers that can't form a palindrome are Ricker numbers" is just a guess, not a proof. Only those counterexamples can be proved, that is, if a number can eventually form a palindrome number, it is not Rickerry number. 1938, before the advent of electronic computers, the American mathematician D. Lehmer (1905-1991) calculated the 73rd step, and got a 35-bit sum that did not constitute a palindrome. Up to now, math enthusiasts who challenge this problem have never stopped, and with the development of computer technology, enthusiasts continue to write different programs to challenge this problem. According to the author's latest investigation, the leader W.V.Landingham had calculated 6.99 million steps by February 2006, and got the sum of more than 289 million bits, but there was still no "palindrome" in the result. In addition, this paper also introduces the world record of the number of steps required to reach palindromes. It is a number 19 1,186,060,307,891,929,990. It takes 26 1 step to calculate palindromes. It was discovered by Jason Doucette's algorithm and program on June 30th, 2005. The following table lists the representative figures that require the most steps to reach the palindrome number. Programming JAVA source program publillassplandrome {publistaticvoidmain (string [] args) {system. out . println(" 1 1IS "+(isplalindrome( 1 1))? " ":" not ")+" Plalindromenumber "); system . out . println(" 123 is "+(isPlalindrome( 123)? " ":" not ")+" Plalindromenumber "); system . out . println(" 1725 1 is "+(isPlalindrome( 1725 1)? " ":" not ")+" Plalindromenumber "); system . out . println(" 2882 is "+(isPlalindrome(2882)? " ":" not ")+" Plalindromenumber "); } publicitaticbooleanisplannalindrome (int number) {This method realizes judging whether a number is palindrome string num = string.valueof (number); returnnewStringBuffer(num)。 Reverse (). toString()。 equalsIgnoreCase(num); }}-1 1 Yes, Plalindrome number 123 is not PLALINDROME NUMBER17251Not PLALINDROME NUMBER 2882 I Spraylindrome NUMBER is Visual Basic 6.0 for I =100 to 999999. You can fill it here 100. I fill in 99999 here to indicate all palindromes between 3 digits and 5 digits. If if StrReverse(i)=i then print i T Use the StrReverse function to determine whether the inverted number is the same as the original number. If they are the same, it means that this number is palindrome. Next is # include programmed in C language.