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.
%I A367191 #23 Nov 12 2023 00:06:49 %S A367191 0,0,0,5,0,16,10,33,7,56,32,85,20,120,66,161,39,208,112,261,64,320, %T A367191 170,385,95,456,240,533,132,616,322,705,175,800,416,901,224,1008,522, %U A367191 1121,279,1240,640,1365,340,1496,770,1633,407,1776,912,1925,480,2080,1066,2241,559,2408,1232,2581,644,2760,1410,2945 %N A367191 a(n) is the largest positive number k such that k^2 + k*n + n^2 is a perfect square, or 0 if no such k exists. %C A367191 A companion to A300728 where "smallest" is replaced with "largest". %F A367191 Conjectured formulas according to n mod 4 in first column. %F A367191 0, (n/4 - 1)(3n/4 + 1), %F A367191 1 or 3, 4((n + 3)/4 - 1)(3(n + 3)/4 - 2), %F A367191 2, 2((n + 2)/4 - 1)(3(n + 2)/4 - 1). %e A367191 With n = 7, the solutions to k^2 + k*n + n^2 = j^2 are k = 8 and k = 33, therefore A300728(7) = 8 and a(7) = 33. %t A367191 s[n_] := Solve[j > 0 && k > 0 && k^2 + k*n + n^2 == j^2, {j, k},Integers]; %t A367191 a[n_] := If[n == 0, 0, With[{sn = s[n]}, Which[sn == {}, 0, IntegerQ[k /. sn[[1]]], Max[k /. sn], True, 0]]]; %t A367191 Table[a[n], {n, 0, 100}] %o A367191 (Python) %o A367191 from sympy.abc import x,y %o A367191 from sympy.solvers.diophantine.diophantine import diop_quadratic %o A367191 def A367191(n): return max(diop_quadratic(x*(x+n)+n**2-y**2))[0] if n else 0 # _Chai Wah Wu_, Nov 11 2023 %Y A367191 Cf. A003136, A300728. %K A367191 nonn %O A367191 0,4 %A A367191 _Jean-François Alcover_, Nov 09 2023