Let $A$ be a finite set of prime numbers. Then the set $X_r = \{x \in \Bbb{N}: \Omega(x) = r,$ and all the primes comprising $x$ are in $A\}$.
Has size formula ?
For example:
$$ |A| = \{2,3,5,7\} \\ r = 2\\ $$
We have:
$$ 2 \cdot 2 \\ 2 \cdot 3 \\ 2 \cdot 5 \\ 2 \cdot 7 \\ 3 \cdot 3 \\ 3\cdot 5\\ 3 \cdot 7\\ 5\cdot 5 \\ 5 \cdot 7 \\ 7 \cdot 7 \\ $$
or $10$ possibilities. Does the formula for $|X_r|$ have a closed form expression in terms of $|A|$ and $|r|$?
I currently think it's ${|A|r\choose r}$ since there are up to $r$ copies of each of $|A|$ things, and you are choosing a combination (set) of the items of size $r$. However computing it on $|A|=4, r=2$ produces $4\cdot 3 = 12$ as an answer not $10$.
Let $x$ be a number that you form doing this. Then $$x=p_1^{\alpha _1}\cdots p_k^{\alpha _k},$$ where $\sum _{i=1}^k\alpha _i=r$ notice that you can treat this as a tuple $(b_1,\cdots ,b_{|A|})$ such that $b_{i}\geq 0$ and $\sum _{i=0}^{|A|}b_i=r.$ By the stars and bars method, you get $$\binom{|A|+r-1}{|A|-1}.$$ In the case you have you are getting $$\binom{4+2-1}{3}=\binom{5}{2}=10.$$