I was wondering if the following is already a known result in mathematics. I have tested it and it seems to work every single time.
If I write the Fibonacci sequence in $\bmod (a)$ form and it repeats after $b$ terms, I will call this the period, and one of the two conditions is true then $a$ is a prime.
If $$b = \frac{a - 1}{n}$$ such that $\frac{a - 1}{n}$ yields a natural number.
Or:
If $b = n(a + 1)$
Then $a$ must be a prime number.
However if $a$ is a prime will not necessarily exhibit these properties.
I would really appreciate your help.