All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Seven - with and without (Posted on 2013-08-09)
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:

n=5
n=42
n=100

Comments: ( Back to comment list | You must be logged in to post comments.)
 Just the Formula (spoiler) | Comment 2 of 6 |
If there is no 7, then the first digit can have 8 different values (because we are not apparently allowing leading zeroes) and the n-1 subsequent digits can have 9 different values.

So, qw(n) = 8*(9^(n-1)).

The total number of n digit numbers are 9*(10^(n-1)).

So, q7(n) = 9*(10^(n-1)) - 8*(9^(n-1)).

I am going to decline to evaluate these.

 Posted by Steve Herman on 2013-08-09 11:37:52

 Search: Search body:
Forums (0)