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!)
A357019 a(n) is the largest possible x in n = x^2 - x*y + y^2 with integers x > y >= 0, or 0 if n cannot be expressed in this form. 1
0, 1, 0, 2, 2, 0, 0, 3, 0, 3, 0, 0, 4, 4, 0, 0, 4, 0, 0, 5, 0, 5, 0, 0, 0, 5, 0, 6, 6, 0, 0, 6, 0, 0, 0, 0, 6, 7, 0, 7, 0, 0, 0, 7, 0, 0, 0, 0, 8, 8, 0, 0, 8, 0, 0, 0, 0, 8, 0, 0, 0, 9, 0, 9, 8, 0, 0, 9, 0, 0, 0, 0, 0, 9, 0, 10, 10, 0, 0, 10, 0, 9, 0, 0, 10, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
PROG
(PARI) dloesch(n) = {my(L=List()); foreach([-1, 1], qs, my (D=qfbsolve(Qfb(1, qs, 1), factor(n), 3), dnp=#D); for (k=1, dnp, if(D[k][1]^2+D[k][2]^2-abs(D[k][1]*D[k][2])==n, listput (L, [abs(D[k][1]), abs(D[k][2])])))); Set(L)};
for (k=1, 85, my(D=dloesch(k), d=#D, m=0); for (j=1, d, m=max(m, D[j][1])); print1(m, ", "))
(Python)
from sympy.abc import x, y
from sympy.solvers.diophantine.diophantine import diop_quadratic
def A357019(n): return max((a for a, b in diop_quadratic(x*(x-y)+y**2-n)), default=0) # Chai Wah Wu, Sep 12 2022
CROSSREFS
Sequence in context: A158092 A145264 A300333 * A352562 A362326 A352909
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Sep 10 2022
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 April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)