Calculating finite field and factoring $x^n - 1$ over $GF(q)$ first step is to calculate cyclotomic cosets.
For example :
For $n=9,q=2$
$C_1=\{1,2,4,8,7,5\} = C_4 = C_8 = C_7 = C_5$
$C_3=\{3,6\} = C_6$
$C_0=\{0\}$
And the set of cyclotomic cosets of 2 mod 9 is then $C= \{C_0,C_1,C_3\}$
How to calculate those values?