A pattern in distribution of near-primes less than $2^n$ Let $\pi_k(2^n)$ be the number of almost-primes (numbers with k factors including repetitions) less than $2^n$. I noticed that for large values of n and values of k near n, a sequence $\{\pi_k\}$ emerges. For example, for n = 17, for k = 17,...,12, the sequence is  {1,2,7,15,37,84}. The terms of the sequence emerge as n grows. 
The sequence is in OEIS as A052130, and there is a brief comment there that may explain the sequence. Could someone elaborate a bit on the comment or provide something a little more substantive? 
Thanks.
 A: You are seeing that for every $k \ge 0$, the sequence $(\pi_n(2^{n+k}))_{(n \ge 1)}$ is stationary :
Let $k \ge 0$. If $x$ is any $n$-almost prime number less than $2^{n+k}$, then $2x$ is an $(n+1)$-almost prime number less than $2^{n+1+k}$, so $\pi_n(2^{n+k}) \le \pi_{n+1}(2^{n+1+k})$ : the sequences are increasing.
Let $x$ be any $n$-almost prime number less than $2^{n+k}$, and write it as $x=2^a y$ with odd $y$. Then $y$ is an $(n-a)$-almost prime number less than $2^{n+k-a}$.
Since $y$ is odd, all its prime factors are $3$ or higher, so $3^{n-a} \le y \le 2^{n+k-a}$.
This shows that $n-a \le \frac {k \log 2}{\log 3 - \log 2}$.
Let $c_k = \lfloor \frac {k \log 2}{\log 3 - \log 2} \rfloor$. Then $y$ has to be an odd number less than $2^{c_k+k}$. 
Conversely, for every odd number $y$ less than $2^{c_k+k}$, if $b$ is the number of prime factors of $y$, then the only $n$-almost-prime number $x$ corresponding to $y$ is $2^{n-b}y$ if $n \ge b$, and there is no corresponding $x$ otherwise.
So  $\pi_n(2^{n+k})$ is less than the number of odd numbers less than $2^{c_k+k}$, i.e. $\pi_n(2^{n+k}) \le 2^{c_k+k-1}$.
An increasing bounded sequence of integers has to be stationary, so there is a sequence $(l_k)_{k \ge0} = (1, 2, 7, 15, \ldots)$ such that for every $k\ge 0$, for every $n$ large enough, $\pi_n(2^{n+k}) = l_k$
