OFFSET
0,4
COMMENTS
a(n)=0 iff n = m^(6*k).
Values d=x^3-y^2 of extremal points of elliptic Mordell curves. Definition extremal points see A200656. Each value x have only one value of distance d when coordinate x is extremal point, but for many fixed distances d elliptic curve have more than 1 extremal point. - _Artur Jasiński_, Nov 30 2011
Theorem (*Artur Jasinski*): If a(n)>0 then a(n)<(4n^(3/2)-1)/4 for every n. If a(n)<0 then a(n)>(-4n^(3/2)-1)/4 for every n. a(n)=0 then n is perfect square. - _Artur Jasiński_, Dec 08 2011
EXAMPLE
A077118(10)=1024=32^2 is the nearest square to 10^3=1000, therefore a(10)=1024-1000=24.
MAPLE
MATHEMATICA
Table[Round[Sqrt[x^3]]^2 - x^3, {x, 0, 100}] (* Artur Jasinski, Nov 30 2011 *)
PROG
(Magma) [Round(Sqrt(n^3))^2-n^3: n in [0..60]]; // Vincenzo Librandi, Mar 24 2015
(Python)
from math import isqrt
def A077119(n): return ((m:=isqrt(k:=n**3))+int((k-m*(m+1)<<2)>=1))**2-k # Chai Wah Wu, Jul 29 2022
CROSSREFS
KEYWORD
sign
AUTHOR
Reinhard Zumkeller, Oct 29 2002
STATUS
approved