the basic form is that if you have some function Ax^n + (other lower powers of x) + B where A and B are just integers, all the possible factors you need to try are factors of B over factors of A, both positive and negative values.
So, for example, for:
6x^4 + 3x^3 - 5x^2 +x -8
your number...