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

 


Smallest error in trying to solve n^3 = x^3 + y^3. That is, for each n, find positive integers x <= y < n such that | n^3 - x^3 - y^3 | is minimal and let a(n) := n^3 - x^3 - y^3.
4

%I #19 Feb 04 2024 18:32:23

%S 6,11,10,-3,27,2,44,1,-24,-12,-1,-43,16,-81,-8,-28,8,19,-29,54,56,71,

%T -8,64,69,27,72,-46,-133,47,-64,161,-8,79,-27,-99,-57,-263,-133,8,254,

%U -62,-155,109,-15,-56,-64,2,259,107,-17,269,216,-78,-20,316,164,-28,-27,333,181,47,-70,6,704,63,-64,253,343,-389,-216

%N Smallest error in trying to solve n^3 = x^3 + y^3. That is, for each n, find positive integers x <= y < n such that | n^3 - x^3 - y^3 | is minimal and let a(n) := n^3 - x^3 - y^3.

%C a(n) is never zero, by Fermat's last theorem for cubes. There are infinitely many n for which a(n) = 1, -1 and 2. It is not known if a(n) is ever 3, besides a(5). By congruence considerations, a(n) is never +-4 mod 9. Presumably a(n) is roughly of order n.

%C The current definition leaves an abiguity when there is (x,y) and (x',y') that yield the same minimal difference but with opposite sign, e.g., for n = 994 or n = 1700, see examples. The sign of a(n) is currently not well defined in that case. - _M. F. Hasler_, Feb 03 2024

%H Daniel Bernstein, <a href="http://cr.yp.to/threecubes.html">Representations using three cubes</a>.

%e a(7) = 2 because 7^3 - 5^3 - 6^3 = 2 and this can't be improved,

%e a(12) = -1 because 12^3 - 9^3 - 10^3 = -1 and this can't be improved.

%e From _M. F. Hasler_, Feb 03 2024: (Start)

%e a(994) = +- 1503 because 994^3 - 718^3 - 849^3 = 1503, 994^3 - 496^3 - 951^3 = -1503, and there is no smaller difference in absolute value.

%e a(1700) = +- 3375 because 1700^3 - 1070^3 - 1545^3 = 3375, 1700^3 - 719^3 - 1656^3 = -3375, and these are minimal in absolute value. (End)

%t a[n_] := SortBy[n^3-Flatten[Table[x^3+y^3, {x, n-1}, {y, x}]], Abs][[1]];

%t Table[a[n], {n, 2, 72}] (* _Jean-François Alcover_, Jul 05 2019, after _Giovanni Resta_ in A308834 *)

%o (PARI) A135998(n, p=3) = { my(np=n^p, m=np); for(y=max(sqrtnint(np\2, p), 1), n-1, my(x = sqrtnint(np - y^p, p), dy = np-y^p, d = if(dy-x^p > (x+1)^p-dy && x < n-1, dy-(x+1)^p, dy-x^p)); abs(d) < abs(m) && abs(m=d) < 2 && break); m} \\ _M. F. Hasler_, Feb 03 2024

%Y Cf. A308834 (equivalent for 4th powers).

%K sign

%O 2,1

%A _Moshe Shmuel Newman_, Mar 03 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 21 03:08 EDT 2024. Contains 376079 sequences. (Running on oeis4.)