# Thread: Formula for the nth palindromic number?

1. I was just wondering if there's a formula for the nth palindromic number in base 10?

2.

3. do you mean pascal's triangle?
1
1,1
1,2,1
1,3,3,1
1,4,6,4,1
1,5,10,10,5,1
1,6,15,20,15,6,1
1,7,21,35,35,21,7,1
1,8,28,56,70,56,28,8,1
1,9,36,84,126,126,84,36,9,1
1,10,45,120,210,252,210,120,45,10,1
If so, then here's a formula.

4. Plaindromic, so like 1, 11, 131, 2552, etc?

Well, you can just break it in half and count up each half. Skipping 0:
- The first 9: 1, 2, ..., 9
- The next 9: 11, 22, ..., 99
- The next 90: 101, 111, 121, ..., 999
- etc.

So yeah, that could be generalized. You'd get something more like an algorithm than a formula unless you were very careful about it though.

 Bookmarks
##### Bookmarks
 Posting Permissions
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement