How many numbers are there which only contain digits 4 and 7 in them?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I wanna know how many numbers n are there which only contain digits 4 and 7 in them, where n (1  ≤  n  ≤ 10 9).
Ex: 4, 7, 44, 47, 74, 77, ....
I am trying to find a general equation to compute the numbers, given how many digits which is 2 in this case and the range which (1  ≤  n  ≤ 10 9).
combinatorics discrete-mathematics
add a comment |Â
up vote
2
down vote
favorite
I wanna know how many numbers n are there which only contain digits 4 and 7 in them, where n (1  ≤  n  ≤ 10 9).
Ex: 4, 7, 44, 47, 74, 77, ....
I am trying to find a general equation to compute the numbers, given how many digits which is 2 in this case and the range which (1  ≤  n  ≤ 10 9).
combinatorics discrete-mathematics
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I wanna know how many numbers n are there which only contain digits 4 and 7 in them, where n (1  ≤  n  ≤ 10 9).
Ex: 4, 7, 44, 47, 74, 77, ....
I am trying to find a general equation to compute the numbers, given how many digits which is 2 in this case and the range which (1  ≤  n  ≤ 10 9).
combinatorics discrete-mathematics
I wanna know how many numbers n are there which only contain digits 4 and 7 in them, where n (1  ≤  n  ≤ 10 9).
Ex: 4, 7, 44, 47, 74, 77, ....
I am trying to find a general equation to compute the numbers, given how many digits which is 2 in this case and the range which (1  ≤  n  ≤ 10 9).
combinatorics discrete-mathematics
combinatorics discrete-mathematics
asked 53 mins ago


Basma Ashour
134
134
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
4
down vote
Well, how do you create a number of $i$ digits where all the digits are $4$ and $7$? For each of the $i$ digits you have to choose if it will be $4$ or $7$, so for each digit you have $2$ options. Hence the number of such numbers is $2^i$. Now, how is that related to your problem? You are interested in finding how many numbers are there that contain only digits $4$ and $7$ when the number of digits is between $1$ and $9$. Well, there are $2^1$ numbers with $1$ digit, $2^2$ with $2$ digits and so on. So the final answer is:
$sum_k=1^9 2^k=2(2^9-1)$
I used the formula for geometric sum.
I got it, thanks for the great and straightforward explanation!
– Basma Ashour
41 mins ago
add a comment |Â
up vote
1
down vote
There are $2$ with length $1$, $2^2$ with length $2$, $2^3$ with length $3$, et cetera.
That observation leads to a total of:$$2+2^2+2^3+cdots+2^9=2^10-2$$
The last equation on base of: $$(2-1)(2+2^2+2^3+cdots+2^9)=(2^2+2^3+cdots+2^10)-(2+2^2+2^3+cdots+2^9)=2^10-2$$
Nice explanation, thanks for your help.
– Basma Ashour
32 mins ago
add a comment |Â
up vote
0
down vote
You may consider the following recursive formula:
$$f(n) = 2f(n-1)+f(n-1), f(1) = 2$$
1
It's nice to think about it recursively, thank you.
– Basma Ashour
33 mins ago
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
Well, how do you create a number of $i$ digits where all the digits are $4$ and $7$? For each of the $i$ digits you have to choose if it will be $4$ or $7$, so for each digit you have $2$ options. Hence the number of such numbers is $2^i$. Now, how is that related to your problem? You are interested in finding how many numbers are there that contain only digits $4$ and $7$ when the number of digits is between $1$ and $9$. Well, there are $2^1$ numbers with $1$ digit, $2^2$ with $2$ digits and so on. So the final answer is:
$sum_k=1^9 2^k=2(2^9-1)$
I used the formula for geometric sum.
I got it, thanks for the great and straightforward explanation!
– Basma Ashour
41 mins ago
add a comment |Â
up vote
4
down vote
Well, how do you create a number of $i$ digits where all the digits are $4$ and $7$? For each of the $i$ digits you have to choose if it will be $4$ or $7$, so for each digit you have $2$ options. Hence the number of such numbers is $2^i$. Now, how is that related to your problem? You are interested in finding how many numbers are there that contain only digits $4$ and $7$ when the number of digits is between $1$ and $9$. Well, there are $2^1$ numbers with $1$ digit, $2^2$ with $2$ digits and so on. So the final answer is:
$sum_k=1^9 2^k=2(2^9-1)$
I used the formula for geometric sum.
I got it, thanks for the great and straightforward explanation!
– Basma Ashour
41 mins ago
add a comment |Â
up vote
4
down vote
up vote
4
down vote
Well, how do you create a number of $i$ digits where all the digits are $4$ and $7$? For each of the $i$ digits you have to choose if it will be $4$ or $7$, so for each digit you have $2$ options. Hence the number of such numbers is $2^i$. Now, how is that related to your problem? You are interested in finding how many numbers are there that contain only digits $4$ and $7$ when the number of digits is between $1$ and $9$. Well, there are $2^1$ numbers with $1$ digit, $2^2$ with $2$ digits and so on. So the final answer is:
$sum_k=1^9 2^k=2(2^9-1)$
I used the formula for geometric sum.
Well, how do you create a number of $i$ digits where all the digits are $4$ and $7$? For each of the $i$ digits you have to choose if it will be $4$ or $7$, so for each digit you have $2$ options. Hence the number of such numbers is $2^i$. Now, how is that related to your problem? You are interested in finding how many numbers are there that contain only digits $4$ and $7$ when the number of digits is between $1$ and $9$. Well, there are $2^1$ numbers with $1$ digit, $2^2$ with $2$ digits and so on. So the final answer is:
$sum_k=1^9 2^k=2(2^9-1)$
I used the formula for geometric sum.
answered 46 mins ago
Mark
3,995114
3,995114
I got it, thanks for the great and straightforward explanation!
– Basma Ashour
41 mins ago
add a comment |Â
I got it, thanks for the great and straightforward explanation!
– Basma Ashour
41 mins ago
I got it, thanks for the great and straightforward explanation!
– Basma Ashour
41 mins ago
I got it, thanks for the great and straightforward explanation!
– Basma Ashour
41 mins ago
add a comment |Â
up vote
1
down vote
There are $2$ with length $1$, $2^2$ with length $2$, $2^3$ with length $3$, et cetera.
That observation leads to a total of:$$2+2^2+2^3+cdots+2^9=2^10-2$$
The last equation on base of: $$(2-1)(2+2^2+2^3+cdots+2^9)=(2^2+2^3+cdots+2^10)-(2+2^2+2^3+cdots+2^9)=2^10-2$$
Nice explanation, thanks for your help.
– Basma Ashour
32 mins ago
add a comment |Â
up vote
1
down vote
There are $2$ with length $1$, $2^2$ with length $2$, $2^3$ with length $3$, et cetera.
That observation leads to a total of:$$2+2^2+2^3+cdots+2^9=2^10-2$$
The last equation on base of: $$(2-1)(2+2^2+2^3+cdots+2^9)=(2^2+2^3+cdots+2^10)-(2+2^2+2^3+cdots+2^9)=2^10-2$$
Nice explanation, thanks for your help.
– Basma Ashour
32 mins ago
add a comment |Â
up vote
1
down vote
up vote
1
down vote
There are $2$ with length $1$, $2^2$ with length $2$, $2^3$ with length $3$, et cetera.
That observation leads to a total of:$$2+2^2+2^3+cdots+2^9=2^10-2$$
The last equation on base of: $$(2-1)(2+2^2+2^3+cdots+2^9)=(2^2+2^3+cdots+2^10)-(2+2^2+2^3+cdots+2^9)=2^10-2$$
There are $2$ with length $1$, $2^2$ with length $2$, $2^3$ with length $3$, et cetera.
That observation leads to a total of:$$2+2^2+2^3+cdots+2^9=2^10-2$$
The last equation on base of: $$(2-1)(2+2^2+2^3+cdots+2^9)=(2^2+2^3+cdots+2^10)-(2+2^2+2^3+cdots+2^9)=2^10-2$$
answered 39 mins ago


drhab
90.1k542123
90.1k542123
Nice explanation, thanks for your help.
– Basma Ashour
32 mins ago
add a comment |Â
Nice explanation, thanks for your help.
– Basma Ashour
32 mins ago
Nice explanation, thanks for your help.
– Basma Ashour
32 mins ago
Nice explanation, thanks for your help.
– Basma Ashour
32 mins ago
add a comment |Â
up vote
0
down vote
You may consider the following recursive formula:
$$f(n) = 2f(n-1)+f(n-1), f(1) = 2$$
1
It's nice to think about it recursively, thank you.
– Basma Ashour
33 mins ago
add a comment |Â
up vote
0
down vote
You may consider the following recursive formula:
$$f(n) = 2f(n-1)+f(n-1), f(1) = 2$$
1
It's nice to think about it recursively, thank you.
– Basma Ashour
33 mins ago
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You may consider the following recursive formula:
$$f(n) = 2f(n-1)+f(n-1), f(1) = 2$$
You may consider the following recursive formula:
$$f(n) = 2f(n-1)+f(n-1), f(1) = 2$$
answered 38 mins ago
Maged Saeed
1597
1597
1
It's nice to think about it recursively, thank you.
– Basma Ashour
33 mins ago
add a comment |Â
1
It's nice to think about it recursively, thank you.
– Basma Ashour
33 mins ago
1
1
It's nice to think about it recursively, thank you.
– Basma Ashour
33 mins ago
It's nice to think about it recursively, thank you.
– Basma Ashour
33 mins ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2943101%2fhow-many-numbers-are-there-which-only-contain-digits-4-and-7-in-them%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password