cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

-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

Views

Author

Ctibor O. Zizka, May 08 2024

Keywords

Comments

For a given n this is a minimal solution of the Diophantine equation n^2 - k^2 = x^3 in positive integers. The solution exists only for n from A070745.

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