# To find number of questions in a test when number of wrong answers is given

In a certain test there are $n$ questions, in this test $2^{n-i}$ students gave wrong answer to at least $i$ questions where $i=1,2,3,\ldots,n$. If the total number of wrong answers given is $2047$,what is the value of $n$?

My attempt:From the question $2^{n-1}$ students gave wrong answer to at least one question, $2^{n-2}$ students to at least 2 and so on.Hence there's one student who answered all $n$ questions wrong.Now $(2^{n-1})-(2^{n-2})$ gives number of wrong questions by those students who got one question wrong. Continuing this way I arrived at $(2^{n-1})-1=2047$ which gave me $n=11$. Is my answer right?

• your question has been downvoted because you have not shown any effort to solve this problem, which is expected here. Please discuss what you've tried, and then we may help you further. – Newb Apr 10 '15 at 6:56
• it doesn't matter whether you don't know how to start, it is just generally requested that you make some effort, no matter whether your work is correct or incorrect. This informal policy exists to prevent people from using the site to get others to do their homework for them. If you're interested in this problem, surely you can make some attempt or share your thoughts? – Newb Apr 10 '15 at 6:59
• Welcome to Stackexchange. You'll find that simple "Here's the statement of my exercise, solve it for me" posts will be poorly received. What is better is for you to add context: What you understand about the problem, what you've tried so far, etc. Something to both show you are part of the learning experience and to help us guide you to the appropriate help. You can consult this link for further guidance. – RE60K Apr 10 '15 at 7:43

If you add up all the powers of two from $2^{n-1}$ down to $2^0$, you'll get the total number of incorrect answers. That is just $2^n-1$. If we set that to $2047$, we get $2^n = 2048$, or $n = 11$, so you are indeed correct.
ETA: Although, you wrote $2^{n-1}-1 = 2047$, which is not right. It's $2^n-1 = 2047$.