A student of mine observed the following \begin{align} \frac{1}{7}=0.\overline{142857} &\qquad \frac{2}{7}=0.\overline{285714} &\qquad \frac{3}{7}=0.\overline{428571} \\ \frac{4}{7}=0.\overline{571428} &\qquad \frac{5}{7}=0.\overline{714285} &\qquad \frac{6}{7}=0.\overline{857142} \end{align} whereas in the case of $17$: \begin{align} \frac{1}{17}=0.\overline{0588235294117647} &\qquad \frac{2}{17}=0.\overline{1176470588235294} \\ \frac{3}{17}=0.\overline{1764705882352941} &\qquad \frac{4}{17}=0.\overline{2352941176470588} \\ \frac{5}{17}=0.\overline{2941176470588235} &\qquad \frac{6}{17}=0.\overline{3529411764705882} \\ \frac{7}{17}=0.\overline{4117647058823529} &\qquad \frac{8}{17}=0.\overline{4705882352941176} \\ \frac{9}{17}=0.\overline{5294117647058823} &\qquad \frac{10}{17}=0.\overline{5882352941176470} \\ \frac{11}{17}=0.\overline{6470588235294117} &\qquad \frac{12}{17}=0.\overline{7058823529411764} \\ \frac{13}{17}=0.\overline{7647058823529411} &\qquad \frac{14}{17}=0.\overline{8235294117647058} \\ \frac{15}{17}=0.\overline{8823529411764705} &\qquad \frac{16}{17}=0.\overline{9411764705882352} \end{align} So in the case of seven, the period of the six fractions is six and the same digits and in the same order are used - only the starting one changes. And similarly in the case of seventeen exactly the same phenomenon.
The same happens also in the case of $p=19,23,29,47,59,61,97.$
But it does not happen for $p=3,11,31,37,41,43,53,67,71,73,79,83,89$.
Is there any general rule? Any simple explanation?
Update. Clearly, if $p$ is a prime, and $p\ne 2,5$, then $p\mid 10^{p-1}-1$. The primes $p$ which have the property described above are exactly those the minimum exponent $n$, such that $$ p \mid 10^n-1, $$ is $p-1$. Still the question remains: Which are these primes?
Wikipedia has an article on these, called cyclic number. Basically, the corresponding primes (which Wikipedia calls full reptend primes) are those $p$ such that $10$ is a primitive root modulo $p$, as given by OEIS sequence A001913. It begins: $$7, 17, 19, 23, 29, 47, 59, 61, 97, 109, 113, 131, 149, 167, 179, 181, 193,\dots.$$
The idea is the following. Note that for any $p$ with $\gcd(10, p) = 1$, there must be some power of $10$ that is $1$ mod $p$: there exists $k$ such that $10^k \equiv 1 \mod p$. The least such $k$ is called the order of $10$ modulo $p$ and always divides $p-1$ (Fermat's little theorem etc.). When it actually equals $p-1$, we say that $10$ is a primitive root modulo $p$.
This means that $p$ divides $10^{p-1} - 1 = \underbrace{99\dots9}_{\text{$p-1$ 9's}}$ but no smaller string of $9$s, and therefore $1/p$ has length $p-1$ for its periodic part. (Note that $0.\overline{abcd\dots efg} = \frac{abcd\dots efg}{9999\dots 999}$.)
And the reason multiples of $1/p$ consist of a cyclic permutation of the same digits is simple as well: note that, if you simply perform the long-division algorithm for calculating $a/p$, then the successive digits are determined by the successive remainders, with the whole sequence repeating when you get the first remainder ($a$) that you started with. As $1/p$ as period $p-1$ and there are exactly $p-1$ possible remainders $1$ to $p-1$, this means that all the remainders occur in some order when dividing $1$ by $p$. The digits of $a/p$ are therefore the same digits, as if you started at remainder $a$ and kept dividing until you saw remainder $a$ again.
Note another cute property (Midy's theorem): if you split the digits of $a/p$ into two equal parts and add them, you get a string of $p-1$ nines. For instance, $\frac{5}{17}=0.\overline{2941176470588235}$, and $29411764 + 70588235 = 99999999$.