A very nice pattern involving prime factorization

940 Views Asked by At

A while ago I was fiddling around with prime numbers and C++. I defined: $$f_a(b)= \text{ the amount of numbers } 2^a\leq n<2^{a+1}\text{ with } b \text{ prime factors}$$

I calculated $f_a(b)$ for $2\leq a\leq20$ using a quick and dirty C++ progam and these are the results: enter image description here

The horizontal axis represents $b$ and the vertical axis represents $a$. As you can clearly, see a pattern is emerging along the diagonals. It looks like they converge to certain numbers, which form the following sequence: $$2,5,8,22,47,103,234...$$ the next element maybe being $493$. Also it looks like the ratio a number and the number above it goes to about $2$ for high numbers.

I'm not claiming I've found something special, but I just thought it looked pretty cool. I have some questions though:

1) Does anyone have a solid explanation why this sequence appears and especially why it sort of converges to these numbers?

2) Is there a formula for calculating or otherwise approximating the numbers in this sequence?

3) Why does the ratio between a number and the one above it approach $2$? (or something close to it)