Floors are numbered by skipping fours, Find actual number of floors.
$begingroup$
How do you find the number of floors,in a tetraphobic numbering system like 1,2,3,5,6,7,..,12,13,15..,39,50.
I am trying to find the pattern and the mathematical algorithm to solve for floor numbered n.
for eg
n = 3 : ans = 3
n = 8 : ans = 7
n = 22 : ans = 20
Note: This is not a HW problem , I read about it and tried to solve it as fun, I am stuck so I am asking here
combinatorics elementary-number-theory
$endgroup$
add a comment |
$begingroup$
How do you find the number of floors,in a tetraphobic numbering system like 1,2,3,5,6,7,..,12,13,15..,39,50.
I am trying to find the pattern and the mathematical algorithm to solve for floor numbered n.
for eg
n = 3 : ans = 3
n = 8 : ans = 7
n = 22 : ans = 20
Note: This is not a HW problem , I read about it and tried to solve it as fun, I am stuck so I am asking here
combinatorics elementary-number-theory
$endgroup$
1
$begingroup$
Why do you have 12 in there?
$endgroup$
– Mohammad Zuhair Khan
Jan 26 at 7:46
$begingroup$
@MohammadZuhairKhan I think the OP is leaving out all numbers in which the digit $4$ occurs. That's why he skips from $39$ to $50.$
$endgroup$
– saulspatz
Jan 26 at 9:24
add a comment |
$begingroup$
How do you find the number of floors,in a tetraphobic numbering system like 1,2,3,5,6,7,..,12,13,15..,39,50.
I am trying to find the pattern and the mathematical algorithm to solve for floor numbered n.
for eg
n = 3 : ans = 3
n = 8 : ans = 7
n = 22 : ans = 20
Note: This is not a HW problem , I read about it and tried to solve it as fun, I am stuck so I am asking here
combinatorics elementary-number-theory
$endgroup$
How do you find the number of floors,in a tetraphobic numbering system like 1,2,3,5,6,7,..,12,13,15..,39,50.
I am trying to find the pattern and the mathematical algorithm to solve for floor numbered n.
for eg
n = 3 : ans = 3
n = 8 : ans = 7
n = 22 : ans = 20
Note: This is not a HW problem , I read about it and tried to solve it as fun, I am stuck so I am asking here
combinatorics elementary-number-theory
combinatorics elementary-number-theory
asked Jan 26 at 7:27
Ajinkya GawaliAjinkya Gawali
212
212
1
$begingroup$
Why do you have 12 in there?
$endgroup$
– Mohammad Zuhair Khan
Jan 26 at 7:46
$begingroup$
@MohammadZuhairKhan I think the OP is leaving out all numbers in which the digit $4$ occurs. That's why he skips from $39$ to $50.$
$endgroup$
– saulspatz
Jan 26 at 9:24
add a comment |
1
$begingroup$
Why do you have 12 in there?
$endgroup$
– Mohammad Zuhair Khan
Jan 26 at 7:46
$begingroup$
@MohammadZuhairKhan I think the OP is leaving out all numbers in which the digit $4$ occurs. That's why he skips from $39$ to $50.$
$endgroup$
– saulspatz
Jan 26 at 9:24
1
1
$begingroup$
Why do you have 12 in there?
$endgroup$
– Mohammad Zuhair Khan
Jan 26 at 7:46
$begingroup$
Why do you have 12 in there?
$endgroup$
– Mohammad Zuhair Khan
Jan 26 at 7:46
$begingroup$
@MohammadZuhairKhan I think the OP is leaving out all numbers in which the digit $4$ occurs. That's why he skips from $39$ to $50.$
$endgroup$
– saulspatz
Jan 26 at 9:24
$begingroup$
@MohammadZuhairKhan I think the OP is leaving out all numbers in which the digit $4$ occurs. That's why he skips from $39$ to $50.$
$endgroup$
– saulspatz
Jan 26 at 9:24
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
I'll do an example. You can elaborate it into an algorithm. Which floor has number $7619?$
The way to approach this is to count how many floors we skip. Call $10$ consecutive two-digit numbers where the first ends in $1$ and the last in $0$ a "decade." Similarly define a "century" and a "millennium." In a decade that starts with $4$ we skip $10$ numbers, and in a decade that doesn't start with $4$ we skip $1$ number, so in a century that doesn't start with $4$ we skip $19$ numbers and in a millennium that doesn't start with $4$ we skip $100+9cdot19=271$ numbers.
Now back to $7619.$ There are $7$ millennia up to $7000$. In one of them we skip $1000$ number and in $6$ of them we skip $271$ giving $2626.$ Now we have to figure out how many are skipped from $7001$ to $7619.$ This is clearly the same number that are skip from $1$ to $619$. There are $6$ centuries up to $600$ and in one of them we skip $100$ numbers, and in the other $5$ we skip $19$, making $195,$ and a total of $2821$ so far. Now we have to count how many number are skipped from $601$ to $619$ which is the same as the number skipped from $1$ to $19$. We can apply the same idea and get $2,$ so that $2823$ numbers are skipped in all.
The final answer is $7619-2823=4796$
$endgroup$
add a comment |
$begingroup$
I found a better answer. The floor number are in basically in base-9 as it never uses one number (0-3 and 5-9) where as the number of floors is in base-10 (0-9) because it uses all decimal digits.
We convert the floor number to proper base-9 number decrementing all digits that are greater than 4 by 1. Once you have a base-9 number , convert it to base-10.
Eg. Floor-number : 56
Base -9. : 45
Base-10 (Ans): 41
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3087992%2ffloors-are-numbered-by-skipping-fours-find-actual-number-of-floors%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
I'll do an example. You can elaborate it into an algorithm. Which floor has number $7619?$
The way to approach this is to count how many floors we skip. Call $10$ consecutive two-digit numbers where the first ends in $1$ and the last in $0$ a "decade." Similarly define a "century" and a "millennium." In a decade that starts with $4$ we skip $10$ numbers, and in a decade that doesn't start with $4$ we skip $1$ number, so in a century that doesn't start with $4$ we skip $19$ numbers and in a millennium that doesn't start with $4$ we skip $100+9cdot19=271$ numbers.
Now back to $7619.$ There are $7$ millennia up to $7000$. In one of them we skip $1000$ number and in $6$ of them we skip $271$ giving $2626.$ Now we have to figure out how many are skipped from $7001$ to $7619.$ This is clearly the same number that are skip from $1$ to $619$. There are $6$ centuries up to $600$ and in one of them we skip $100$ numbers, and in the other $5$ we skip $19$, making $195,$ and a total of $2821$ so far. Now we have to count how many number are skipped from $601$ to $619$ which is the same as the number skipped from $1$ to $19$. We can apply the same idea and get $2,$ so that $2823$ numbers are skipped in all.
The final answer is $7619-2823=4796$
$endgroup$
add a comment |
$begingroup$
I'll do an example. You can elaborate it into an algorithm. Which floor has number $7619?$
The way to approach this is to count how many floors we skip. Call $10$ consecutive two-digit numbers where the first ends in $1$ and the last in $0$ a "decade." Similarly define a "century" and a "millennium." In a decade that starts with $4$ we skip $10$ numbers, and in a decade that doesn't start with $4$ we skip $1$ number, so in a century that doesn't start with $4$ we skip $19$ numbers and in a millennium that doesn't start with $4$ we skip $100+9cdot19=271$ numbers.
Now back to $7619.$ There are $7$ millennia up to $7000$. In one of them we skip $1000$ number and in $6$ of them we skip $271$ giving $2626.$ Now we have to figure out how many are skipped from $7001$ to $7619.$ This is clearly the same number that are skip from $1$ to $619$. There are $6$ centuries up to $600$ and in one of them we skip $100$ numbers, and in the other $5$ we skip $19$, making $195,$ and a total of $2821$ so far. Now we have to count how many number are skipped from $601$ to $619$ which is the same as the number skipped from $1$ to $19$. We can apply the same idea and get $2,$ so that $2823$ numbers are skipped in all.
The final answer is $7619-2823=4796$
$endgroup$
add a comment |
$begingroup$
I'll do an example. You can elaborate it into an algorithm. Which floor has number $7619?$
The way to approach this is to count how many floors we skip. Call $10$ consecutive two-digit numbers where the first ends in $1$ and the last in $0$ a "decade." Similarly define a "century" and a "millennium." In a decade that starts with $4$ we skip $10$ numbers, and in a decade that doesn't start with $4$ we skip $1$ number, so in a century that doesn't start with $4$ we skip $19$ numbers and in a millennium that doesn't start with $4$ we skip $100+9cdot19=271$ numbers.
Now back to $7619.$ There are $7$ millennia up to $7000$. In one of them we skip $1000$ number and in $6$ of them we skip $271$ giving $2626.$ Now we have to figure out how many are skipped from $7001$ to $7619.$ This is clearly the same number that are skip from $1$ to $619$. There are $6$ centuries up to $600$ and in one of them we skip $100$ numbers, and in the other $5$ we skip $19$, making $195,$ and a total of $2821$ so far. Now we have to count how many number are skipped from $601$ to $619$ which is the same as the number skipped from $1$ to $19$. We can apply the same idea and get $2,$ so that $2823$ numbers are skipped in all.
The final answer is $7619-2823=4796$
$endgroup$
I'll do an example. You can elaborate it into an algorithm. Which floor has number $7619?$
The way to approach this is to count how many floors we skip. Call $10$ consecutive two-digit numbers where the first ends in $1$ and the last in $0$ a "decade." Similarly define a "century" and a "millennium." In a decade that starts with $4$ we skip $10$ numbers, and in a decade that doesn't start with $4$ we skip $1$ number, so in a century that doesn't start with $4$ we skip $19$ numbers and in a millennium that doesn't start with $4$ we skip $100+9cdot19=271$ numbers.
Now back to $7619.$ There are $7$ millennia up to $7000$. In one of them we skip $1000$ number and in $6$ of them we skip $271$ giving $2626.$ Now we have to figure out how many are skipped from $7001$ to $7619.$ This is clearly the same number that are skip from $1$ to $619$. There are $6$ centuries up to $600$ and in one of them we skip $100$ numbers, and in the other $5$ we skip $19$, making $195,$ and a total of $2821$ so far. Now we have to count how many number are skipped from $601$ to $619$ which is the same as the number skipped from $1$ to $19$. We can apply the same idea and get $2,$ so that $2823$ numbers are skipped in all.
The final answer is $7619-2823=4796$
answered Jan 26 at 9:48
saulspatzsaulspatz
17k31435
17k31435
add a comment |
add a comment |
$begingroup$
I found a better answer. The floor number are in basically in base-9 as it never uses one number (0-3 and 5-9) where as the number of floors is in base-10 (0-9) because it uses all decimal digits.
We convert the floor number to proper base-9 number decrementing all digits that are greater than 4 by 1. Once you have a base-9 number , convert it to base-10.
Eg. Floor-number : 56
Base -9. : 45
Base-10 (Ans): 41
$endgroup$
add a comment |
$begingroup$
I found a better answer. The floor number are in basically in base-9 as it never uses one number (0-3 and 5-9) where as the number of floors is in base-10 (0-9) because it uses all decimal digits.
We convert the floor number to proper base-9 number decrementing all digits that are greater than 4 by 1. Once you have a base-9 number , convert it to base-10.
Eg. Floor-number : 56
Base -9. : 45
Base-10 (Ans): 41
$endgroup$
add a comment |
$begingroup$
I found a better answer. The floor number are in basically in base-9 as it never uses one number (0-3 and 5-9) where as the number of floors is in base-10 (0-9) because it uses all decimal digits.
We convert the floor number to proper base-9 number decrementing all digits that are greater than 4 by 1. Once you have a base-9 number , convert it to base-10.
Eg. Floor-number : 56
Base -9. : 45
Base-10 (Ans): 41
$endgroup$
I found a better answer. The floor number are in basically in base-9 as it never uses one number (0-3 and 5-9) where as the number of floors is in base-10 (0-9) because it uses all decimal digits.
We convert the floor number to proper base-9 number decrementing all digits that are greater than 4 by 1. Once you have a base-9 number , convert it to base-10.
Eg. Floor-number : 56
Base -9. : 45
Base-10 (Ans): 41
answered Jan 27 at 8:45
Ajinkya GawaliAjinkya Gawali
212
212
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3087992%2ffloors-are-numbered-by-skipping-fours-find-actual-number-of-floors%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
Why do you have 12 in there?
$endgroup$
– Mohammad Zuhair Khan
Jan 26 at 7:46
$begingroup$
@MohammadZuhairKhan I think the OP is leaving out all numbers in which the digit $4$ occurs. That's why he skips from $39$ to $50.$
$endgroup$
– saulspatz
Jan 26 at 9:24