Guys, some help

Guys, some help...

Whats the best math formula to resolve this ?
(i came out with that one, pic related, but i'm not sure)
"All natural numbers bellow 1000000 i can form using only the 0~9 digits, without repeating them and not accepting only zero nor zeros to the left.

bump!

Drop out of college lol

...

i tried

...

i'll buy you anons

...

Sauce?

...

Rocco - Animal trainer, some number...i dont remember, just watch the damn serie, its all good.

...

You're forgetting an entire digit's place, the correct formula is as in pic.

There's no closed form for this sum in general, so its the best you're gonna get.

Who's the girl though

...

Your solution is correct. Confirmed by bruteforcing in python:

$$$ def is_valid(n):
... s = str(n)
... return len(s) == len(set(s)) and n != 0
...
$$$ sum(1 for i in range(1000000) if is_valid(i))
168570

...

...

...

...

Is that x is an element in N or IN?