How to select a number from all the integers list?

I want to find the numbers from all the integers list such that these will satisfy the condition. Ex:

Select[{1,3,8,9},#^3==27&]


But instead of giving {1,3,8,9} I want to give all the integers.

I think you want FindInstance:

FindInstance[x^3 == 27, x]

{{x -> 3}}


Although not necessary in this case you can restrict the domain with the third parameter, i.e. FindInstance[x^3 == 27, x, Integers].

Why not simply

Solve[x^3 == 27, x, Integers]


{{x -> 3}}

?

• For some reason I had in mind a case with infinite solutions, but Solve is more direct here. In any case it seems we are guessing what the OP wants. – Mr.Wizard Dec 24 '16 at 18:33