Skip to content

Sunday Times Teaser 2717 – Round the Garden

by Danny Roth

All the sides of a quadrilateral shaped garden are whole numbers of metres, no two of which differ in length by a prime number. The lengths of the three longest sides are prime numbers and somewhere in the lengths of the four sides and the perimeter each of the digits 0 to 9 is used exactly once.

What are the lengths of the sides?

6 Comments Leave one →
  1. brian gladman permalink

    Here is an iterative solution:

    and here is a recursive version:

  2. tony smith permalink

    Brian
    I am a pen-and-paper solver and a lurker on your other site.
    I think that your programs impose the ” no two sides differ by a prime” condition.I assume that they do not produce the second set which would solve the teaser if the condition was not included and which you mention on the other site..
    This makes me wonder whether you also did an analytical solution (which I found to be an enjoyable exercise).
    Regards
    Tony Smith

    • Brian Gladman permalink

      Hi Tony,
      No, I just ran one of the programs above without the lines that apply this condition. In fact, as I mention on my other site, I left out the ‘three largest primes’ condition as well.

  3. Peter Hayes permalink

    there is a near-miss in the form a + b + cd + efg = hij which I will leave you to (re)discover.

    the no-differences prime rules it out; also the fact that the four sides couldn’t form a quadrilateral in any case!

  4. Peter Hayes permalink

    ie “no-differences-prime”; you knew what I meant.

  5. Peter Hayes permalink

    okay, you’ve had long enough, so here’s the near-miss answer

    4 + 5 + 23 + 769 = 801

Leave a comment to Peter Hayes Cancel reply

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

Subscribe to this comment feed via RSS