Question on (Semi) Prime Counting Functions

I'm looking for a function counting all numbers, let's call them power semi-primes for the moment, of the form $a^nb^m\leq t$. $a,b$ are primes and might be equal.

Edit: $n$ and $m$ are fixed.

I think this is related to the standard semi-prime counting function $\pi_2(t)$, since all semi-primes $ab$ can be mapped to $a^nb^m$.

What I got so far, is the following: Since $\pi_1(t^{1/n})$ counts the $n$th power of primes below $t$, I conclude that, if $n=m$, $\pi_2(t^{1/n})$ counts the number of power semi-primes $(ab)^n$ less than $t$.

But what if $n\neq m$? How does the argument of $\pi_2(\cdot)$ look like in this case?

I tried $\pi_2(t^{1/\sqrt{(n+m)}})$, that to my own surprise worked well for a restricted set or primes ($a,b<10000$) and a few values of $t$(<1000), $n$ and $m$. Unfortunately, the exponent of $t$ doesn't match in the case $n=m$, since $1/n\neq 1/\sqrt{2n}$, so I assume that, this is nothing but mere accidential coincidence. Additional question: Can anyone disprove this?

-
Your numbers are numbers with 1 or 2 distinct prime factors. There are quite a few papers on the distribution of numbers with a specified number of prime factors. Here is one by Hildebrand and Tenenbaum that might help you: projecteuclid.org/… –  Matthew Conroy Feb 8 '12 at 22:53
It does if you need an exact count. It doesn't very much if you're just looking for an estimate. Almost all prime powers are prime. –  Charles Feb 8 '12 at 23:18
Do you mean that $m$ and $n$ are fixed, or that you want to count over all possibilities for $m$ and $n$? –  Greg Martin Feb 8 '12 at 23:52
@GregMartin $m$ and $n$ are fixed. –  draks ... Feb 9 '12 at 7:58
@Charles They appear in a integral as $d(\pi_2(t))$. Can I use an estimate there? –  draks ... Feb 9 '12 at 8:03

Suppose without loss of generality that $m<n$. Then we can write the number of integers of the form $p^m q^n$ ($p,q$ prime) less than $x$ as $$\sum_{q\le x^{1/n}} \sum_{p<(x/q^n)^{1/m}} 1 = \sum_{q\le x^{1/n}} \pi\bigg( \Big( \frac x{q^n} \Big)^{1/m} \bigg) \approx \frac{x^{1/m}}{\log x^{1/m}} \sum_{q\le x^{1/n}} \frac1{q^{n/m}} \sim C_{n,m} \frac{x^{1/m}}{\log x}$$ for some constant $C_{n,m}$, since the last sum converges. In other words, integers of the form $p^m q^n$ are not that much more numerous than integers of the form $p^m 2^n$.

(The $\approx$ step above can be made rigorous by summing only over $q<x^{1/(m+n)}$ say, and dealing with the other integers in the sum by first summing over $p$ instead of over $q$.)

-
I think @Charles is discussing the case where $m$ and $n$ may vary. –  Greg Martin Feb 10 '12 at 8:38
I'm a bit puzzled: Does your answer hold also for $n=m$? It'll give $C_{n,n}\sim \log \log x$, which is fine for $n=1$, since $\pi_2(t)\sim \left( \frac{t}{\log t} \right) \log\log t$, but for other $n$, it doesn't look like, what I concluded (see above), it should look like: $\pi_2(t^{1/n})=\left( \frac{t^{1/n}}{\log t^{1/n}} \right) \log\log t^{1/n} \neq \left( \frac{t^{1/n}}{\log t} \right) \log\log t$, where the last one is using your expressions. I think I was wrong with my assumption. What do you think? –  draks ... Feb 15 '12 at 23:03
@draks: I think if you run my proof through when $m=n$, you do indeed get $\sim (t^{1/n}/\log t^{1/n})\log\log t$. (Note that $\log\log t \sim \log\log t^{1/n}$ for any fixed $n$.) That being said, though, your proof is already fine when $m=n$. –  Greg Martin Feb 15 '12 at 23:58
Two things: (i) Do you mean $\sum_{q\le x^{1/n}}$ after the first "="? (ii) I'd like to extend your answer to more prime powers. Is the following a correct start for 3 of them: $\displaystyle \sum_{q\le x^{1/n}}\sum_{p< (x/q^n)^{1/m}}\sum_{r< (x/(p^mq^n))^{1/o}} 1$? –  draks ... Apr 28 '12 at 19:19
@draks: (i) You're right (fixed it). It was actually true as written but only accidentally.... (ii) That looks right to me. –  Greg Martin Apr 30 '12 at 9:12
Count the prime powers up to t; this is pretty easy (list the primes up to t, then the primes up to $\sqrt t$ squared, then the prime up to $\sqrt[3]t$ cubed, etc.).
Now all you need is to count the numbers of the form $p^nq^m$ with $p<q$ prime and $m,n>0.$ Loop over the prime powers $p^n\le t/2$ (just like the above), and for each count the prime powers (with primes $q>p$) up to $\lfloor t/p^n\rfloor,$ just like the first step.
I mean $p^n\le t/2$. I handle the case $p=q$ in the first paragraph; in the second this is not allowed. –  Charles Feb 8 '12 at 23:16