All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Mirror, Mirror on the wall (Posted on 2004-07-15) Difficulty: 3 of 5
Find the lowest positive integer that has its digits reversed after dividing it by 2.

See The Solution Submitted by SilverKnight    
Rating: 2.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts No Solution? | Comment 5 of 9 |

After trying to work it out arithmetically by the possible first/last digit combinations, I found nothing.

I decided to try to find one, anyway, just for the heck of it. The following javascript found nothing:

<script>
function reverse(x) {
 xstr = x.toString();
 str = "";
 for (var d = xstr.length; d >= 0; --d)
  {
  str += xstr.charAt(d);
  }
  return str;
}
function doPal(x) {
  double = 2*x;
  if (double == reverse(x)) {
   document.write(x + " " + double + "<br>");
   return true;
  }
  return false;
}
for (var i = 1; i < 10000000; i++)
doPal(i);
</script>

  Posted by DJ on 2004-07-15 17:45:21
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information