Probably a Code?

This is an extended challenge suitable for keen groups or individuals, maths clubs and optional homework challenges.

 

With a very enthusiastic class you might wish to collectively discuss possible approaches to this difficult problem and suggest an experimental (i.e with a computer or spreadsheet) approach to the students if they wish to try it in their own time.