Notices
Results 1 to 3 of 3

Thread: Formula for the nth palindromic number?

  1. #1 Formula for the nth palindromic number? 
    Forum Freshman
    Join Date
    Aug 2010
    Posts
    97
    I was just wondering if there's a formula for the nth palindromic number in base 10?

    Thanks in advance!


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Isotope
    Join Date
    Feb 2009
    Location
    Transient
    Posts
    2,914
    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.



    Wise men speak because they have something to say; Fools, because they have to say something.
    -Plato

    Reply With Quote  
     

  4. #3  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    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.
    Reply With Quote  
     

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
  •