# An interesting math puzzle

**URL:** <https://boards.straightdope.com/t/an-interesting-math-puzzle/152862>\
**Category:** Factual Questions\
**Created:** [February 5, 2003, 3:21am UTC](https://boards.straightdope.com/t/an-interesting-math-puzzle/152862 "2003-02-05T03:21:21Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)\
**Post date:** [February 5, 2003, 7:53am UTC](https://boards.straightdope.com/t/an-interesting-math-puzzle/152862/21 "2003-02-05T07:53:12Z")

</div>

> [@](#):
>
> \*Originally posted by Tyrrell McAllister \*  
> \*\*Does this work?  
> \*\*

Not quite, could be close though

> [@](#):
>
> \*\*  
> Suppose that the list 1,2,3,…,N produces a palindrome P when the commas are removed. Let 10^m be the largest power of 10 less than or equal to N (we can know that m \>= 2 by explicitly checking a finite number of examples). Then the string of m 0’s in the decimal expansion of 10^m can be the only string of m zeros in P.\*\*

If N = 4.5 x 10^m, then there are four such strings of zeroes, none of which can be at the center.

Take the longest string of zeroes. There can be s of them, up to s=9.

They can’t end the string. The first string must palindrome with the last string. The first string must be preceded by a 1, the last string is followed by an s. So, s=1, and there is only one string of m zeroes, as you said.

Now, where does your proof break down for my counterexample? The non-equivalence of 1 and the base minus one?

---

<div class="post-metadata">

**Author:** ![Tyrrell\_McAllister](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tyrrell_mcallister/32/16772_2.png) [@Tyrrell\_McAllister](https://boards.straightdope.com/u/Tyrrell_McAllister)\
**Post date:** [February 5, 2003, 8:11am UTC](https://boards.straightdope.com/t/an-interesting-math-puzzle/152862/22 "2003-02-05T08:11:22Z")

</div>

Looks like you’ve successfuly patched my proof. The proof doesn’t apply to base 2 because in that case

(1) s is always 1, so it reduces to the situation I addressed in my incomplete proof, in which case,

(2) in base 2 it is possible for the last digit of the number 2^n - 1 and the first digit of 2^n to be the reverse of the first two digits of 2^n + 1, whereas my proof depends on this not being possible.

---

<div class="post-metadata">

**Author:** ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)\
**Post date:** [February 5, 2003, 1:54pm UTC](https://boards.straightdope.com/t/an-interesting-math-puzzle/152862/23 "2003-02-05T13:54:49Z")

</div>

To complete the proof for base two, s still has to be 1, since that is the only choice in that base. Then the string of m zeroes in the middle is preceded by m+1 ones, and followed by a one plus m-1 zeroes. No palidrome is possible then unless m=1. So the only possible palindrome in base two is the one I gave, 11011, counting from one to three.

[Previous page](https://boards.straightdope.com/t/an-interesting-math-puzzle/152862.md?page=1)
