OFFSET
1,3
COMMENTS
a(n) = 0 for n = 2 only, because the triple (1, 1, 1) is a solution for n = 1, and the triple x = 1, y = 2, z = n - 2 solves the equation for n >= 3.
a(n) has dominant local maxima at n = m^2. Partial explanation follows from the form y = (n + x*z)/(x + z) = (n - x^2)/(x + z) + x, as for x = m and y = m for each z in {1,...,n} the triple (m,m,z) is a solution. Due to symmetry (x, m, m) triples are also solutions, which gives at least 2*n - 1 solutions when n = m^2.
It appears that for n == 1 (mod 6) a(n), on average, bigger than for n == 5 (mod 6) (checked on 1000 first terms).
When upper bound is dropped; i.e., x,y,z >= 1, there are infinitely many triples for each n >= 1: x = k, y = k - 1, z = k^2 - k - n, for any k > (1 + sqrt(4*n + 5))/2 >= 2.
EXAMPLE
a(3)=2, solutions are (1,2,1) and (3,2,3).
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Shmoish, Jan 18 2026
STATUS
approved
