Skip to content

Challenge 270: Squared Differences

If I pick three distinct integers – let’s say a, b and c – and calculate the sum of the squares of their differences:

(a – b)2 + (b – c)2 + (c – a)2

what is the least possible value I can obtain?

What is the least possible value if I double the number of distinct integers to six (a, b, c, d ,e and f), and calculate the sum of these six differences?

(a – b)2 + (b – c)2 + (c – d)2 + (d – e)2 + (e – f)2 + (f – a)2