I have a simple question..
Assume that I have an arbitrary polynomial $f$ in $F_q[x]$.
Is there a practical way to find the smallest integer $n$ for which $f$ divides $x^n-1$ ?
A small example would be appreciated.
Thanks, in advance.
-I have my own answer for now for anyone interested, but not as practical as I would prefer-
At last I wrote this small script in Magma; let $\deg(f)=k$.
This works fine for small $k$: write in place of $'m'$ here, the following; if $f=f_1.f_2...f_t$ for each $f_j$ being irreducible factors of $f$, then $m=q^{(\operatorname{lcm}({\deg f_j}))}-1$, which will be exactly the place where $f$ splits.
See this example;
If you also desire the condition that $\deg(f)$ divides $n$, then you should do;
For the above example this gives the result $728$.
But for larger $k$'s, the algorithm needs much time..