A372644 For n >= 1, a(n) is the least k >= 1 such that for some x >= 1, n^2 - k^2 = x^3 or a(n) = -1 if no such k exists.
-1, -1, 1, -1, -1, 3, -1, -1, -1, 6, -1, -1, -1, 13, 3, -1, 15, -1, -1, -1, 15, -1, -1, 8, -1, -1, -1, 21, 25, -1, -1, -1, -1, -1, 15, 28, -1, -1, -1, -1, -1, 6, 11, -1, 36, -1, -1, 24, -1, -1, -1, -1, -1, -1, 45, -1, 39, -1, -1, 15, -1, 46, 35, -1, -1, 55
Offset: 1
Keywords
Examples
n = 3: 9 - k^2 = x^3 is true for k = 1 and x = 2, thus a(3) = 1. n = 6: 36 - k^2 = x^3 is true for k = 3 and x = 3, thus a(6) = 3.
Crossrefs
Cf. A070745.
Programs
-
Python
from sympy import integer_nthroot def A372644(n): return next((k for k in range(1,n) if integer_nthroot(n**2-k**2,3)[1]),-1) # Chai Wah Wu, May 11 2024
Comments