Rudin's proof that the Cantor set has no segments In Principles of Mathematical Analysis, on page 42, Rudin proves that the Cantor set has no segments by stating that every segment $(\alpha,\beta)$ contains a segment of the form $(\frac{3k+1}{3^{n}},\frac{3k+2}{3^{n}})$ if $3^{-n}\lt\frac{\beta-\alpha}{6}$. I don't know how $\frac{\beta-\alpha}{6}$ is obtained.
We want to show that there is an integer $k$ such that $\alpha\le\frac{3k+1}{3^n}$ and $\frac{3k+2}{3^n}\le\beta$, 

so we want to have $\frac{\alpha(3^n)-1}{3}\le k\le\frac{\beta(3^n)-2}{3}$.  

Such an integer $k$ will exist if $\frac{\beta(3^n)-2}{3}-\frac{\alpha(3^n)-1}{3}\ge1$, so

$(\beta-\alpha)3^n\ge4$ gives $3^{-n}\le\frac{\beta-\alpha}{4}$.
If Cantor set contains a segment $(\alpha,\beta)$, then it contains an interval $$\left(\frac {3k+1}{3^m}, \frac {3k+2}{3^m}\right)$$ for some $k$ and $m$. This surely contradicts the claim that the Cantor set has no common points with any such intervals. 

From the above, we can see that $$\beta-\alpha &gt;3^{-m}$$ is needed. If we have $$\frac {\beta-\alpha}{6}&gt;3^{-m},$$
then it is more than needed. 

-------Edited by the author: to see why we just need $3^{-m}&lt;\beta-\alpha$. ----

Suppose that Cantor set $P$ contains an interval $(\alpha,\beta). $ We expand $\alpha$ in base-3. 
$$\alpha = \frac {a_1}{3}+\frac {a_2}{3^2}+\cdots+ \frac {a_n}{3^n}+\cdots,a_i=0,1,2,$$
We want to find two rational numbers, one is strictly larger than $\alpha,$ the other is strictly less than $\beta$. Let $m$ to be determined. We construct the first one from the $m$-th position of the decimal expansion of $\alpha$: $a_m$ is at most $2$; moreover the tail of the series expansion is at most $3^{-m}$; we sum the first $m-1$ terms using common denominators to see that there exists an integer $k$. To be strictly larger than $\alpha,$, adding one more $\frac {1}{3^m}$, we obtain the first rational is $$\frac {3k+2+1+1}{3^m}.$$
For the second rational, in order for the numerator of the above adding $1$ so that $(\frac {3k+2+1+1}{3^m}, \frac {3k+2+1+1+1}{3^m})$ is in $(\alpha,\beta)$, we need 
$$\frac {1}{3^m}&lt;\beta-\alpha.$$
This alternatively gives $$3^{-m}&lt;\beta-\alpha.$$