Distribution of palindromic numbers We all know what a palindromic number is, it is a number which is the same, independent from which side we read it, for example $101, 202, 33733, \dots$
It is also clear that there are infinity many palindromic numbers. What I am interested in is the frequency of palindromic numbers in specific intervals.
For exmaple: In the interval $[100,999]$ there exist 9 palindromic numbers.
In $[1000,9999]$ we have 90, in $[10000,99999]$ we have 252, in $[100000-999999]$ we have 333. I calculated them by hand, is it somehow possible to use mathematica for that?
How does this look like for really high intervals, how does the numbers of palindormic change, what is the relation bewteen the interval and the numbers of palindromic numbers?
What I also asked myself, taking a random palindromic number $a\in[1000,9999]$ for example, how can we reverse the reverse-and-add algorithm. I mean the following: Taking a random number, for exmaple $15$. Then I reverse it and add it to the number itself: $15+51=66$, then we get a palindromic. How can it be evaluated on how many ways the number $66$ can be reiceived? In this case it is obviously one, but how do we know how many different numbers lead for exmaple to the number $5556555$ ?
 A: In the interval $[100,999]$ there are $90$ palindromes.  You can choose the first digit $9$ ways and the middle digit $10$ ways.  Generally, for $n$ digit numbers there are $$\begin {cases} 9\cdot 10^{\frac {n-2}2} & n \text { even} \\ 9\cdot 10^{\frac {n-1}2} & n \text { odd} \end {cases}$$ palindromes.  Again, you can choose the first digit $9$ ways and the rest of the first half of the number (rounded up for odd numbers of digits) $10$ ways .
To get $66$ with reverse and add, you can have $15,24,33,42,51$ as starting numbers.  For $5556555$ you can certainly have four choices $(1-4)$ for the first digit, six $(0-5)$for the next two, and one choice $(3)$for the middle digit.  Then the lower three digits are determined by the top three.  This gives $144$ numbers.  There might be more, as I have avoided carrying.
A: See http://mathworld.wolfram.com/PalindromicNumber.html
The first bit of information you ask about is contained in the statement that $$\text{number of palindromes $\le 10^n$ }=\cases{2(10^{n/2}-1) & $n$ even \\ 11\cdot10^{(n-1)/2}-2 & $n$ odd }$$

(I'll have a think about the reverse-and-add algorithm if you're still interested in that.)
A: Well the number of palindromic numbers there is in an interval $[10^n,10^{n+1}-1]$ is actually the number of palindromic numbers of size $n$.
The answer to the question depends on the parity of $n$. If you denote the number of palindromic numbers of size $n$ by $p_n$ then:
$p_1=10$ and $\forall n\in \mathbb{N}^*, \cases{ p_{2n}=9\times 10^{n-1} \\ p_{2n+1}=10\times p_{2n}=9\times10^n }$
