An integer $m$ is acceptable iff in it's decimal representation all digits are different. For example $9876543210$ is the largest acceptable integer. For each $n\in \Bbb N$, $\theta(n)$ is the number of all acceptable positive integers not greater than $n$.
Is there a simple formula for $\theta(n)$?
This is not a math answer, but if you're only interested in the results I guess my approach is much simpler to understand. I simply let the computer calculate the numbers.
Simple Python solution
This one works, but is slow:
It took over 5 minutes on my machine for 98765432. The result was 2,345,850.
I'm currently implementing this in Java. For 98765432 it takes only 32 seconds and I'm currently improving it.
Java solution
For $n = 9876543210$ there are 8,877,690 acceptable numbers. For this range, it took 56 seconds to execute. For every other range it will be less.
By the way, this sounds like a Project Euler task. Is it one? Which task is it?