← Complete problem index

PROJECT EULER · #0791

Average and Variance

Statement only · UnsolvedOriginal problem ↗

Denote the average of k numbers x1,...,xk by x¯=1kixi. Their variance is defined as 1ki(xix¯)2.

Let S(n) be the sum of all quadruples of integers (a,b,c,d) satisfying 1abcdn such that their average is exactly twice their variance.

For n=5, there are 5 such quadruples, namely: (1,1,1,3),(1,1,3,3),(1,2,3,4),(1,3,4,4),(2,2,3,5).

Hence S(5)=48. You are also given S(103)=37048340.

Find S(108). Give your answer modulo 433494437.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.