login
A392647
a(n) is the number of solutions of the Diophantine equation x*y - x*z + y*z = n such that x, y, z are in {1,2,...,n}.
0
1, 0, 2, 7, 4, 4, 8, 6, 21, 12, 10, 10, 18, 10, 16, 47, 18, 16, 26, 18, 30, 28, 20, 26, 83, 20, 26, 42, 34, 30, 44, 32, 44, 48, 28, 117, 60, 24, 46, 64, 50, 36, 58, 52, 60, 72, 32, 54, 191, 40, 66, 82, 56, 58, 76, 68, 82, 78, 50, 78, 108, 36, 58, 259, 84, 72, 94, 64, 100
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
Sequence in context: A241517 A145433 A055200 * A323755 A093590 A065629
KEYWORD
nonn
AUTHOR
Michael Shmoish, Jan 18 2026
STATUS
approved