Find all reals x, y such that 1<=x<=a , 1<=y <=b and (x^(1/3) + y^(1/3))^3 is integer.

37 Views Asked by At

The question was asked in a Twitter interview.

For given integers $a$ and $b$, find all reals $x$, $y$ such that $1\leq x\leq a$ , $1\leq y\leq b$ and $(x^{1/3} + y^{1/3})^3$ is an integer.

1

There are 1 best solutions below

1
On BEST ANSWER

By continuity, $(x^{1/3}+y^{1/3})^3$ assumes every real value between $(1^{1/3}+1^{1/3})^3=8$ and $(a^{1/3}+b^{1/3})^3$, including every integer in between. No other integers are achievable.

Once the integer is chosen, the set of $(x,y)$ values that yield that integer forms a curve between the $x=1$ and $y=1$ axes, that bulges toward the origin.

There isn't really a cute or nice answer to this question, except perhaps a picture.