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 →
@Brian,
Using your function partition_unique and first part of your code.