Let\'s define eleven-non-free numbers:
If we consider a number as a string, then if any substring inside is a (non-zero) power of 11, then this
10^18 is really, really big. Brute force is not your friend.
However, let us note some conveniences:
s represents a eleven-non-free number, then trivially so does d s (where d is a string of digits).k-digit numbers are eleven-non-free, you could base that off of how many k-1-digit numbers are eleven-non-free.Finally, throw some binary-search style logic on top, and you should be able to find exactly which number is the N-th eleven-non-free number.