Prime numbers which 1/p has decimal period of p-1

1.1k Views Asked by At

How to find prime numbers where $\frac{1}{p}$ has decimal period of $p-1$? Is there any formula? please help. Example: $\frac{1}{7}=0.142857142857...$ with decimal period of $7-1=6$ also $17$ satisfies this condition, but $13$ does not.