A115880 Largest positive x satisfying the Diophantine equation x^2 = y*(y+n), a(n)=0 if there are no solutions.
0, 0, 2, 0, 6, 4, 12, 3, 20, 12, 30, 8, 42, 24, 56, 15, 72, 40, 90, 24, 110, 60, 132, 35, 156, 84, 182, 48, 210, 112, 240, 63, 272, 144, 306, 80, 342, 180, 380, 99, 420, 220, 462, 120, 506, 264, 552, 143, 600, 312, 650, 168, 702, 364, 756, 195, 812, 420, 870
Offset: 1
Keywords
Examples
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).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Table[Max[x/.Solve[{x^2==y(y+n),x>0},{x,y},Integers]],{n,1,100}]/.x->0 (* Vaclav Kotesovec, Jun 26 2014 *)
-
Python
def A115880(n): a, b = divmod(n,4) return (a**2-1,(c:=a<<1)*(c+1),c*(a+1),c*(c+3)+2)[b] # Chai Wah Wu, Aug 21 2024
Formula
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
a(4*j) = j^2 - 1,
a(4*j+1) = 4*j^2+2*j,
a(4*j+2) = 2*j^2+2*j,
a(4*j+3) = 4*j^2+6*j+2. (see Comments) - Robert Israel, Jun 27 2014
Comments