Fractal Points on a Line
Python 2, 137

n=input()
l=[0]*2**n;i=0
while~i%2:i=i/2%2**n;l[i]=1;i=sum([k for k,v in enumerate(l*4)if(k&gt;i)*v][1:3])
print''.join(['.X'[x]for x in l])


Quite straightforward.

Pyth, 49

More or less a translation. Main difference is that I don't use a list representing the line, I use a string. 

J*\.^2QW!%Z2K%/Z2lJ=JXJK\X=Zs&lt;tf&amp;q\X@JT&gt;TKU*4J2)J


Try it online. 

                         Q=input(); Z=0 #implicit
J*\.^2Q                  J = "."*(2^Q)
W!%Z2                    while !(Z%2):
  K%/Z2lJ                  K=(Z/2)%(len(J))
  =JXJK\X                  change J, the point at index K is changed to a "X"
       f          U*4J     filter all elements T in [0, 1, 2, ..., 4*len(J)-1]:
        &amp;q\X@JT&gt;TK           where J[T]=='X' and T&gt;K
     &lt;t               2    only us the second and third element
  =Zs                      and store the sum to Z
)J                       end while and print J