Algorithm to count number of positive integer solutions of $x^2(8x-3)=y^2z$? Given the Diophantine equation
$$ x^2(8x-3)=y^2z, $$
is there a way to efficiently count the number of solutions that satisfy $x+y+z\leq n$, where $n$ is a fixed given integer?
Also, for any fixed $x$, is it possible to count all such solutions $(x,y,z)$ without having to explicitly find all the divisors of $x^2(8x-3)$?
A hint or a reference (if this is, in fact, easy) would be quite helpful.
I asked this on MSE, but got no responses.
 A: Dan Bernstein has developed an algorithm which might be relevant to your situation.
Bernstein - Enumerating solutions to p(a)+q(b)=r(c)+s(d).
http://cr.yp.to/papers/sortedsums.pdf
The algorithm explained in the paper has been very successful in counting solutions to equations of the given type.
Admittedly your equation is not exactly of the form considered in the paper, but you might be able to adapt his algorithm to your setting.
I vaguely remember that one essentially creates a list of all possible values on both sides then compares these lists looking for matches. Bernstein however does something clever with heaps which saves on the storage space.
A: The equation implies $8 x - 3, z = p q^2, p r^2$, in which we can assume gcd(q, r) = 1.
Then $x q = y r$, from which gcd(q, r) = 1 implies that $r$ divides $x$.
So denoting $x = r t$, so that $y = q t$, the condition $x + y + z \le n$ is equivalent to:
$ p (q^2 + 8 r^2) + 8 q t \le (8 n - 3) $
which may be slightly more manageable for searches
A: How about brute force?  This consists of $O(n^3)$ steps (the verification of positive integers $x,\, y,\, z\, $ s. t. $x+y+z \le n$) in your case.
