[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115881 a(n) is the largest positive y satisfying the Diophantine equation x^2=y(y+n). a(n)=0 if there are no solutions. 4
0, 0, 1, 0, 4, 2, 9, 1, 16, 8, 25, 4, 36, 18, 49, 9, 64, 32, 81, 16, 100, 50, 121, 25, 144, 72, 169, 36, 196, 98, 225, 49, 256, 128, 289, 64, 324, 162, 361, 81, 400, 200, 441, 100, 484, 242, 529, 121, 576, 288, 625, 144, 676, 338, 729, 169, 784, 392, 841, 196 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
The corresponding least y is given by A067721(n).
LINKS
FORMULA
Empirical g.f.: -x^3*(x^9+x^8+2*x^7+4*x^6+x^5+6*x^4+2*x^3+4*x^2+1) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - Colin Barker, Jun 26 2014
From empirical g.f.: a(n) = 1/2 - n/2 + 11*n^2/64 + (1/4 - 1/32*n^2) * (2*floor(n/4) + 2*floor((n+1)/4) - n + 1) + (1/4 - 5/64*n^2)*(-1)^n. - Vaclav Kotesovec, Jun 26 2014
From Chai Wah Wu, Aug 21 2024: (Start)
a(4*j) = j^2 - 2*j + 1,
a(4*j+1) = 4*j^2,
a(4*j+2) = 2*j^2,
a(4*j+3) = 4*j^2+4*j+1 (see A115880).
(End)
EXAMPLE
a(15)=49, since the solutions (x,y) to x^2=y(y+15) are (4,1), (10,5), (18, 12) and (56, 49). The largest y is 49, from (x,y)=(56,49).
MATHEMATICA
Table[Max[y/.Solve[{x^2==y*(y+n), y>0}, {x, y}, Integers]], {n, 1, 100}]/.y->0 (* Vaclav Kotesovec, Jun 26 2014 *)
PROG
(Python)
def A115881(n):
a, b = divmod(n, 4)
return ((c:=a**2)-(a<<1)+1, (d:=c<<2), c<<1, d+(a<<2)+1)[b] # Chai Wah Wu, Aug 21 2024
CROSSREFS
Sequence in context: A322550 A201531 A021237 * A180434 A201574 A077809
KEYWORD
nonn,changed
AUTHOR
Giovanni Resta, Feb 02 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 21:13 EDT 2024. Contains 375518 sequences. (Running on oeis4.)