## Enigma 1726

Spoiler for New Scientist Enigma 1726: “Conspicuous consumption” (Follow the link to see the puzzle.)

Very straightforward. There are four unknown quantities: d1 and d2, the distances to your home and back, and g1 and g2, the gas used on the trip to your home and back. On the first visit he’s driven once to your home; second visit, twice to your home and once back; third visit, three times to your home and twice back. So

```36.0 = d1/g1
42.5 = (2d1+d2)/(2g1+g2)
44.0 = (3d1+2d2)/(3g1+2g2)```

and

`71.5 = d1+d2+d3`

Four linear equations in four unknowns. Solution: d1 = 13.5, d2 = 15.5, g1 = 0.375, and g2 = 0.25. Gas consumption on the way back was d2/g2 = 62 mpg. Must be downhill.

## Enigma 1725

Spoiler for New Scientist Enigma 1725: “Square bashing” (Follow the link to see the puzzle.)

This is, so far as I can tell, a bunch of easy but tedious algebra with lots of opportunities to get it wrong.

I started with:

S(m) = sum (i=0 to m) {i2} = m(2m+1)(m+1)/6

S(m,n) = sum (i=m to n) {i2} = S(n)–S(m–1)

(I Googled that sum a week or two ago, this time I derived it!) and solved S(m,m+2499) = S(m+2500,m+4998). S(m,n) is a quadratic, and there are two real solutions, but only one positive solution, m (the first number in the original list) = 12492501.

The negative solution was obvious to me only in retrospect. The sum of the squares of the 2499 smallest positive integers is equal to the sum of the squares of the 2499 smallest negative integers. Which is also equal to the sum of the squares of the 2500 smallest nonnegative integers, or the 2500 smallest nonpositive integers. That is, if you start from –2499, the sum of the first 2500 squares is equal to the sum of the next 2499 squares. So –2499 would be a solution if negative solutions were permitted by the Enigma statement.