OFFSET
0,2
COMMENTS
Otherwise said, second component of the lexicographically earliest positive integer solution (x, y) to x^3 + x + n^2 = y^2. See A384100 for the first component, x.
For any positive n, there is always the solution (x, y) = (4*n^2*(16*n^4 + 2), 2*n*(16*n^4 + 1)(16*n^4 + 2) - n). Therefore we have the inequality given in formula.
a(n) is even if and only if n is even. - Chai Wah Wu, May 24 2025
FORMULA
0 < a(n) <= 2*n*(16*n^4 + 1)*(16*n^4 + 2) - n for all n > 0.
EXAMPLE
For n = 0, there can't be any positive x for which x^3 + x = x*(x^2 + 1) = y^2, therefore a(0) = 0. (Indeed, x^2 + 1 == 1 (mod x), so x has no factor in common with x^2 + 1 = y^2/x, so x must be a square itself, x = m^2. But then, x^2 + 1 = (y/m)^2 can't have a solution, since x^2 + 1 can't be a square.)
For n = 1, we can check that for x = 1, 2, 3, ..., value of x^3 + x + 1 = 3, 10, 31, ... isn't a square for any x < 72 which is the least positive integer so that x^3 + x + 1 = 72*(72^2 + 1) + 1 = 373321 = (13*47)^2 is a perfect square, thus a(1) = 13*47 = 611.
For n = 2, there is no x < 4128 for which x^3 + x + 2^2 is a square, but 4128*(4128^2+1) + 4 = (2*132611)^2 is indeed the least square of that form, so a(2) = 2*132611 = 265222. (As for n = 1, this is the upper limit for a(n), given in FORMULA.)
For n = 3, there is already x = 8 for which x^3 + x + 3^2 = 529 = 23^2 is a square, therefore a(3) = 23 is much smaller than the before mentioned upper limit.
PROG
(Python)
from math import isqrt
from sympy.ntheory.primetest import is_square
def A384101(n):
if n==0: return 0
m = n**2
for x in range(1, n*(n**4*((n**4<<9)+96)+3)+1):
if is_square(k:=x*(x**2+1)+m): return isqrt(k) # Chai Wah Wu, May 24 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, May 19 2025
EXTENSIONS
a(9)-a(21) from Chai Wah Wu, May 24 2025
a(22)-a(23) from Jinyuan Wang, May 26 2025
STATUS
approved
