Back with a math puzzle after a bit of a blogging break

It’s been too long. Here’s a short puzzle I saw that I thought was interesting:

How many prime numbers are there that start with a 1, alternate 1’s and 0’s, and end with a 1? Of course you should explain your answer…

The problem was originally stated in based 10, but I thought with a bunch of computer geeks in the audience, I’d ask about base 10 as well as binary and hexadecimal.

Have fun,

— Max

4 comments so far

  1. David's avatar David on

    Interesting question. I’m going to go out on a limb here, but I know the answer to this. Somewhere between 0 and infinite. Hope someone has an answer.

  2. Carter Shanklin's avatar Carter Shanklin on

    I assume you don’t mean random choice but just an alternating sequence of 0 and 1, then only 1 and 101.

    There is probably a cleaner answer but
    10101 = 11100 – 999 = 111 * 100 – 111 * 9 = 111 * 99
    1010101 = 10001 * 100 + 10001 = 10001 * 101
    101010101 = 11111 * 10000 – 11111 * 909 = 11111 * 9091
    and these two patterns repeat.

  3. Max Schireson's avatar Max Schireson on

    Nicely done.

  4. fibonicci's avatar fibonicci on

    Yes i agree with Carter Shanklin


Leave a comment