first we use the fact that .
proof: using fermat's li'l theorem so either or . the latter implies .
so if has to be a cube then the inly admissible values of would be the ones satisfying . there are only trials needed to know which are those. the possible values of are . that's it.
in my last post i missed the numbers of the type .