← Complete problem index

PROJECT EULER · #0748

Upside Down Diophantine Equation

Statement only · UnsolvedOriginal problem ↗

Upside Down is a modification of the famous Pythagorean equation: 1x2+1y2=13z2.

A solution (x,y,z) to this equation with x,y and z positive integers is a primitive solution if gcd(x,y,z)=1.

Let S(N) be the sum of x+y+z over primitive Upside Down solutions such that 1x,y,zN and xy.
For N=100 the primitive solutions are (2,3,6) and (5,90,18), thus S(102)=124.
It can be checked that S(103)=1470 and S(105)=2340084.

Find S(1016) and give the last 9 digits as your answer.

Write-up coming later

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