Great Question

Stage: 5
A poster has raised an interesting question on Ask NRICH about a generalisation of the mathematics described in the NRICH stage 5 article More Sums Of Squares. Can you help?