Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Challenge: Nearest Palindromic Number

by johnnywang (Priest)
on Feb 02, 2005 at 20:59 UTC ( [id://427428]=note: print w/replies, xml ) Need Help??


in reply to Re: Challenge: Nearest Palindromic Number
in thread Challenge: Nearest Palindromic Number

The odd case is not quite right, ABCDEFG can also have: ABC(D-1)CBA, or ABC(D+1)CBA
  • Comment on Re^2: Challenge: Nearest Palindromic Number

Replies are listed 'Best First'.
Re^3: Challenge: Nearest Palindromic Number
by Corion (Patriarch) on Feb 02, 2005 at 21:14 UTC

    I thought so too, but there are close palindromic numbers that do not even have any digits in common, for example 197 has 191 (6) according to my hypothesis, but 202 is closer (5). I think I'll be cutting my losses and exhaustively search the space above the number, up to the distance to the (easily found) next smaller palindromic number. Not elegant.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://427428]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-23 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found