OFFSET
1,3
COMMENTS
See A336240 for border case x^2 + y^2 + z^2 = x^3 + y^3 + z^3.
What is the natural density of this sequence?
There are infinitely many infinite parametric families of solutions which have negative values in (x,y,z). For example, 8*(3*a-1)^2*m^6 + 12*(3*a-1)*(a-1)*m^4 - 6*(2*a-1)*m^2 + 2*a^3 + 1 are terms for all a >= 0, m >= 0. (x = 1 - (6*a-2)*m^2, y = a - m*(1-(6*a-2)*m^2), z = a + m*(1-(6*a-2)*m^2)). - Altug Alkan, Jul 17 2020
By definition, corresponding (x,y,z) variables are produced by equation x^3 + y^3 + z^3 = x^2 + y^2 + z^2 + t with t >= 0. That is, x^2*(x-1) + y^2*(y-1) + z^2*(z-1) >= 0. Conjecture: Every even integer can be represented as x^2*(x-1) + y^2*(y-1) + z^2*(z-1) where x, y, z are integers. - Altug Alkan, Jul 19 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..8000
Rémy Sigrist, C program for A336205
EXAMPLE
11 is not a term because there is no (x,y,z) with x^2 + y^2 + z^2 <= 11 when x^3 + y^3 + z^3 = 11.
18 is a term because (-1)^3 + (-2)^3 + 3^3 = 18 and (-1)^2 + (-2)^2 + 3^2 <= 18.
61 is a term because (-4)^3 + 0^3 + 5^3 = 61 and (-4)^2 + 0^2 + 5^2 <= 61.
354 is a term because (-11)^3 + (-8)^3 + 13^3 = (-11)^2 + (-8)^2 + 13^2 = 354.
MAPLE
filter:= proc(n) local x, y, z, e1, e2;
for x from 0 while 3*x^2 <= n do
for y from 0 while x^2 + 2*y^2 <= n do
for e1 in [-1, 1] do for e2 in [-1, 1] do
z:= surd(n + e1*x^3 + e2*y^3, 3);
if z::integer and x^2 + y^2 + z^2 <= n then return true fi;
od od od od;
false
end proc:
select(filter, [$0..200]); # Robert Israel, Jul 12 2020
MATHEMATICA
filter[n_] := Module[{x, y, z, e1, e2},
For[x = 0, 3*x^2 <= n, x++,
For[y = 0, x^2 + 2*y^2 <= n, y++,
For[e1 = -1, e1 <= 1, e1 += 2, For[e2 = -1, e2 <= 1, e2 += 2,
z = (n + e1*x^3 + e2*y^3)^(1/3);
If[IntegerQ[z] && x^2 + y^2 + z^2 <= n, Return[True]]
]]]]; False];
Select[Range[0, 200], filter] (* Jean-François Alcover, Aug 11 2023, after Robert Israel *)
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Jul 12 2020
STATUS
approved