(* Pre-compute the overshoot amount: A016269. *)
kmax=10;
overshoot=CoefficientList[1/((1-2x)(1-3x)(1-4x))+O[x]^kmax,x];

(* Plot the intervals and calculate the union thereof. *)
Manipulate[
ints=Table[Interval[{2(i-1)/(3^k),2i/(3^k)}],{i,1,(2^(k-1)(2^k+1))-overshoot[[k-1]]}];
union=IntervalUnion@@ints;
Column[{
"Union"->union,
"Error Term"->overshoot[[k-1]],
NumberLinePlot[#,
GridLines->{{Min[union],Max[union]},None},
GridLinesStyle->Directive[Thick],
ImageSize->Medium]
&@@{ints},
"Constituents"->ints
}],
{{k,3,"Degree of Cantor Set"},2,kmax,1,Appearance->"Labeled"}
]

(* Plot the generic Cantor Set. *)
With[{plotdepth=4},NumberLinePlot[
NestList[#/.{a_,b_}:>
Sequence[{a,2/3 a+1/3 b},{1/3 a+2/3 b,b}]
&,Interval[{0,1}],plotdepth]//Reverse,
{x,0,1},
PlotStyle->PointSize[0],
ImageSize->Medium
]]