### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,314)
- misc (3)
- project euler (2)
- puzzle (78)
- puzzle# (21)
- site news (54)
- tantalizer (80)
- teaser (7)

### Site Stats

- 217,167 hits

Programming Enigma Puzzles

17 October 2018

Posted by on **From New Scientist #994, 1st April 1976** [link]

Our local council recently planted some white rose bushes but they all died. So they replaced each bush with as many red rose bushes as they had originally planted white bushes. These all died too. Gritting their teeth, the replaced each red bush with as many yellow rose bushes as they had previously planted red bushes. This time they were luckier. Only as many yellow bushes died as red bushes had died before.

Moved by such dogged devotion to horticulture, twelve leading citizens offered to pay for all the surviving yellow bushes, provided that meant that each could pay for the same number of bushes. The Council have lost their record of the number of survivors and do not have the face to spend ratepayers’ money of getting them counted. Yet they would like to know whether they are in a position to accept the offer.

Can you help?

[tantalizer443]

%d bloggers like this:

If

nis the original number of white rose bushes, thenn^2red bushes were planted, andn^4yellow bushes. The number of surviving yellow bushes isS(n) = (n^4 – n^2)which we can factorise as:And we want to know if 12 (= 2×2×3) divides this.

S(n)is the product of 3 consecutive numbers, multiplied by the middle number again.So, one of the three consecutive numbers must be divisible by 3.

And, if the middle number is even, then when it is squared it will have 2 factors of 2, and if it is not even, then the other two numbers must be even and each of those has a factor of 2.

So whatever the number it will always be divisible by 12.

Solution:Yes, the number of surviving bushes is divisible by 12.A quick Python expression verifies this.

This checks for

nup to 100, which means up to 10,000 red bushes are considered and up to 100,000,000 yellow bushes, which seems like quite a lot.As expected, we do not find any values for

nwhereS(n)is not divisible by 12.We’ve come across the integer sequence:

(n^4 – n^2) / 12before, specifically inEnigma 1723as the number of squares that can be made on ann × ngrid of pins using an elastic band.N^4 – N^2 has factors N N (N-1) (N+1). The consecutive numbers must mean the expression is divisible by three. Also either N -1 and N + 1 are both even or N and N are even. Hence the expression is divisible by four, hence overall divisible by 12.