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

Home > Numbers
Seven - with and without (Posted on 2013-08-09) Difficulty: 2 of 5
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

No Solution Yet Submitted by Ady TZIDON    
Rating: 3.6667 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
solution | Comment 1 of 6

there are 9*10^(n-1) n-digit numbers because there are 9 choices for the first digit and 10 for the other n-1.  Of these, there are 8*9^(n-1) which do not contain a 7 because there are 8 choices for the first digit and 9 for the other n-1.  Thus
q7(n) = 9*10^(n-1)-8*9^(n-1)
qw(n) = 8*9^(n-1)

q7(5)=9*10^4-8*9^4
qw(5)=8*9^4
q7(42)=9*10^42-8*9^42
qw(42)=8*9^42
q7(100)=9*10^100-8*9^100
qw(100)=8*9^100


  Posted by Daniel on 2013-08-09 11:35:30
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information