OFFSET
1,3
COMMENTS
Values y such that x^2 + y^2 = z^3 has a solution 0 <= x <= y with integer x, y and z.
Differs from A282093 because solutions with x=0 are admitted; (x,y) = (0,t^3) solves the equation with z = t^2.
EXAMPLE
0^2 + 0^2 = 0^3, so 0 is in. 0^2 + 1^2 = 1^3, so 1 is in. 2^2 + 2^2 = 2^3, so 2 is in. 0^2 + 8^2 = 4^3, so 8 is in. 5^2 + 10^2 = 5^3, so 10 is in.
MAPLE
isA282094 := proc(y)
local x, z3 ;
for x from 0 to y do
z3 := x^2+y^2 ;
if isA000578(z3) then
return true ;
end if;
end do:
return false ;
end proc:
for y from 0 to 800 do
if isA282094(y) then
printf("%d, ", y) ;
end if;
end do:
MATHEMATICA
isA282094[y_] := If[IntegerQ[y^(1/3)], True, Module[{x, z3}, For[x = 1, x <= y, x++, z3 = x^2 + y^2; If[IntegerQ[z3^(1/3)], Return[True]]]; Return[False]]];
Reap[For[y = 0, y <= 800, y++, If[isA282094[y], Print[y]; Sow[y]]]][[2, 1]] (* Jean-François Alcover, Nov 03 2023, after R. J. Mathar *)
PROG
(Python)
from sympy import factorint
def is_cube(n):
if n==0: return True
return all(i%3==0 for i in factorint(n).values())
def ok(n):
return any(is_cube(x**2 + n**2) for x in range(n + 1))
print([n for n in range(501) if ok(n)]) # Indranil Ghosh, Jun 30 2017
(PARI) is(n)=my(n2=n^2); for(x=0, n, if(ispower(n2+x^2, 3), return(1))); 0 \\ Charles R Greathouse IV, Jun 30 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
R. J. Mathar, Feb 06 2017
STATUS
approved