OFFSET
2,1
COMMENTS
We must impose y < n to exclude the trivial solution x = 1, y = n, a(n) = -1.
There is no admissible pair (x, y) for n = 1, whence a(1) is undefined.
What is the first n for which we have two solutions (x, y) that yield the same minimal absolute difference but opposite signs for n^5 - x^5 - y^5?
EXAMPLE
For n = 2, the only admissible pair is (x, y) = (1, 1), which yields a(2) = n^5 - x^5 - y^5 = 30.
Similarly, for n = 3, 4, ..., 9 the minimum is reached for x = y = n - 1, which yields a(n) = n^5 - 2*(n-1)^5 = 179, 538, 1077, 1526, 1255, -846 and -6487, respectively.
For n = 10, the minimum is reached for x = 8, y = 9, which yields a(10) = 10^5 - 8^5 - 9^5 = 8183, smaller in absolute value than 10^5 - 2*9^5 = -18098.
PROG
(PARI) A369855(n, p=5) = { my(np=n^p, m=np); for(y=max(sqrtnint(np\2, p), 1), n-1, my(x = sqrtnint(np - y^p, p), dy = np-y^p, d = if(dy-x^p > (x+1)^p-dy && x < n-1, dy-(x+1)^p, dy-x^p)); abs(d) < abs(m) && abs(m=d) < 2 && break); m} \\ M. F. Hasler, Feb 03 2024
CROSSREFS
KEYWORD
sign
AUTHOR
M. F. Hasler, Feb 03 2024
STATUS
approved