OFFSET
1,3
EXAMPLE
a(15)=4 since the solutions (x,y) to x^2=y(y+15) are (4,1), (10,5), (18, 12) and (56, 49). The least x values is 4, from (x,y)=(4,1).
PROG
(Python)
from itertools import takewhile
from collections import deque
from sympy import divisors
def A115879(n): return -(a:=next(iter(deque((d for d in takewhile(lambda d:d<n, divisors(n**2)) if not (d-n**2//d)&3), 1)), 0))+(n**2//a if a else 0)>>2 # Chai Wah Wu, Aug 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Giovanni Resta, Feb 02 2006
STATUS
approved