login
A361416
a(n) is the least integer z for which there is a triple (x,y,z) satisfying x^2 + n*x*y + y^2 = z^2 and 0 < x < y < z.
1
7, 3, 11, 11, 5, 7, 11, 7, 13, 5, 9, 13, 7, 11, 25, 9, 13, 8, 11, 15, 37, 7, 17, 31, 15, 11, 25, 17, 21, 10, 19, 23, 23, 14, 25, 49, 11, 9, 73, 25, 29, 17, 27, 31, 85, 16, 21, 35, 31, 20, 49, 15, 13, 19, 35, 39, 49, 11, 41, 85, 39, 14, 47, 41, 45, 26, 19, 17
OFFSET
1,1
COMMENTS
We can prove that for every positive integer n there exists a triple (x,y,z) of positive integers such that x^2 + n*x*y + y^2 = z^2. One of the solutions is (s^2 - t^2, n*t^2 + 2*s*t, s^2 + n*s*t + t^2).
EXAMPLE
a(6)=7 because there exists a triple (2,3,7) satisfying 2^2 + 6*2*3 + 3^2 = 7^2, and no smaller solution exists.
MATHEMATICA
Table[First[
Sort@Flatten[
Table[Sqrt[x^2 + n*x*y + y^2], {x, 1, 50}, {y, x + 1, 50}]],
IntegerQ[#] &], {n, 1, 30}]
PROG
(Python)
def a(n):
for z in range(1, 100):
for y in range(z, 1, -1):
for x in range(1, y):
if x**2+n*x*y+y**2==z**2:
return(z)
print([a(n) for n in range(1, 30)])
CROSSREFS
Cf. A361417.
Sequence in context: A257324 A138859 A257328 * A076569 A061194 A248280
KEYWORD
nonn
AUTHOR
Zhining Yang, Mar 11 2023
EXTENSIONS
More terms from Sean A. Irvine, Apr 10 2023
STATUS
approved