Here is an algorithm for generating numeric palindromes.
I recently did the google codejam competition and there was a question involving palindromes. For some reason (I don't really know which) I got interested in them and decided to come up with a formula to generate the nth palindrome. I was only capable to come up with an algorithm to generate palindromes. Below is a better version of it. It is easy to prove its correctness. I leave this as homework!
# Python3 code
# Algorithm to recursively generate all palindromes progressively,
# starting from a given 'base' palindrome (1, 11, 101, 1001...).
# k is the number of digits of the palindrome.
# l is about the algorithm, not explained here though!
def palindromes(k, l):
global palindrome # to keep things simple!
if(k>5): return # remove this line so to go to infinity!
a=(k+1)//2 # a is about the algorithm
if(l==a): return # base case reached
if(l==a-1 and k%2):
inc = 1*(10**l) # I got trouble with odd values of k
else: inc = 11*(10**l)
for i in range(9): # Ok, these 4 lines are the most important
if(l!=0): palindromes(k, l+1)
else: # base case for changing the number of digits