Why does plotting $\frac{3n+1}{2^k}$ give several apparently straight lines? Here's the plot for $f(n)=\frac{3n+1}{2^k}$ ($n$ integer, positive, odd) where $k$ is the number of 2 factors in $3n+1$:

Just to be clear, here's a zoom in:

Why do we see those straight lines? I assume it should be something trivial, but I fail to prove this.

Edit #1 Here's how $k(n)$ looks like:

 A: $f_k (n) = \frac{3}{2^k} n + \frac{1}{2^k} = a_k n + b_k $ which is a linear function.
A: Let's assume for the following $j \in \mathbb N$ 
First look at each number taken by $\small n = 4j+3$ giving $\small 3(4j+3)+1 = 12j+10 =2^1 (6j+5) $
Second look at each number taken by $\small n = 8j+1$ giving $\small 3(8j+1)+1 = 24j+4 =2^2 (6j+1) $
Third look at each number taken by $\small n = 16j+13$ giving $\small 3(16j+13)+1 = 48j+40 =2^3 (6j+5) $
Fourth look at each number taken by $\small n = 32j+5$ giving $\small 3(32j+5)+1 = 96j+16 =2^4 (6j+1) $
and so on...          
Now look at the list of the results with a fixed $k$, for instance $k=4$, which occurs in the exponent of $2^k$ in the last entries. Then we have the curve $x=n = 32j+5 \to 2^4(6j+1) \to y=6j+1 $ or $x=32j+5, y=6j+1$ and then 
$$ 16y-3x=1 $$
and then, as expected,
$$  y = f_4(x) = {3x+1 \over 16}  $$
which is a linear function with slope roughly $y'(x) \approx 1/5$.
Now by your own introductional function-definition you have, that for that type of numbers $x(j)=2^4 \cdot 2 j+5 \to y(j)=6j+1$ only odd integers for $x$ and $y$ may occur so you have a discrete graph, thus dots, but lying on a linear pattern.                  
For each $k$ you have one dotted "line" in the same way, which we "see" (actually interpolate...) in your pictures.  Four our example $k=4$, this is the fourth dotted line and for instance at $x=5000$ it is $y=15001/16 \approx  937.5$ which is near $y=1000$ (with small error) which we can immediately see in the first picture.                   
Last step is to prove, that the introducing table covers all odd integers. But I think that's easy enough for you?
