Skip to content

Sunday Times Teaser 2544 – Neighbourly Nonprimes

by Tom Wills-Sandford

Published: 26 June 2011 (link)

I live in a long road with houses numbered 1 to 150 on one side. My house is in a group of consecutively numbered houses where the numbers are all nonprime, but at each end of the group the next house number beyond is prime. There are a nonprime number of houses in this group. If I told you the lowest prime number which is a factor of at least one of my two next-door neighbours’ house numbers, then you should be able to work out my house number.

What is it?

2 Comments Leave one →
  1. Brian Gladman permalink

  2. Frits permalink

    @Brian,

    Using your function partition_unique and first part of your code.

Leave a Reply

Note: HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS