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 A115880 #25 Aug 21 2024 16:37:25 %S A115880 0,0,2,0,6,4,12,3,20,12,30,8,42,24,56,15,72,40,90,24,110,60,132,35, %T A115880 156,84,182,48,210,112,240,63,272,144,306,80,342,180,380,99,420,220, %U A115880 462,120,506,264,552,143,600,312,650,168,702,364,756,195,812,420,870 %N A115880 Largest positive x satisfying the Diophantine equation x^2 = y*(y+n), a(n)=0 if there are no solutions. %C A115880 Notice that x^2 = y*(y+n) is equivalent to (n+2*y+2*x)*(n+2*y-2*x) = n^2. We take the factorization of n^2 into two factors congruent mod 4 where one is as small as possible and the other is as large as possible. For n == 0 mod 4 the factors are 4 and n^2/4, for n == 2 mod 4 they are 2 and n^2/2, for n odd they are 1 and n^2. - _Robert Israel_, Jun 27 2014 %H A115880 Vincenzo Librandi, <a href="/A115880/b115880.txt">Table of n, a(n) for n = 1..1000</a> %F A115880 Empirical g.f.: x^3*(x^9-2*x^6-3*x^5-6*x^4-4*x^3-6*x^2-2) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - _Colin Barker_, Jun 26 2014 %F A115880 a(4*j) = j^2 - 1, %F A115880 a(4*j+1) = 4*j^2+2*j, %F A115880 a(4*j+2) = 2*j^2+2*j, %F A115880 a(4*j+3) = 4*j^2+6*j+2. (see Comments) - _Robert Israel_, Jun 27 2014 %e A115880 a(15)=56 since the solutions (x,y) to x^2=y(y+15) are (4,1), (10,5), (18, 12) and (56, 49). The largest x is 56, from (x,y)=(56,49). %t A115880 Table[Max[x/.Solve[{x^2==y(y+n),x>0},{x,y},Integers]],{n,1,100}]/.x->0 (* _Vaclav Kotesovec_, Jun 26 2014 *) %o A115880 (Python) %o A115880 def A115880(n): %o A115880 a, b = divmod(n,4) %o A115880 return (a**2-1,(c:=a<<1)*(c+1),c*(a+1),c*(c+3)+2)[b] # _Chai Wah Wu_, Aug 21 2024 %Y A115880 Cf. A067721, A115878, A115879, A115881. %K A115880 nonn %O A115880 1,3 %A A115880 _Giovanni Resta_, Feb 02 2006