Asymmetric Diophantine Equation (noch nicht übersetzt)

Problem 764

Consider the following Diophantine equation: 16x2+y4=z2 where x, y and z are positive integers.

Let S(N)=(x+y+z) where the sum is over all solutions (x,y,z) such that 1x,y,zN and gcd(x,y,z)=1.

For N=100, there are only two such solutions: (3,4,20) and (10,3,41). So S(102)=81.

You are also given that S(104)=112851 (with 26 solutions), and S(107)248876211(mod109).

Find S(1016). Give your answer modulo 109.