Let us divide a set of all n-digit numbers into two subsets:
N7- whose members contain at least one 7 and Nw - whose members are 7-free ,e.g. for n=2 there are 18 members in N7: 17,27,37,... 70, 71,72, …79, and there are 72 members in Nw.
Let us denote those quantities by q7 and qw: q7(2)=18 and qw(2)=72.
Evaluate q7(n) and qw(n) for the following values of n: