# Thread: [SOLVED] Find number of questions?

1. ## [SOLVED] Find number of questions?

In a certain test there are $n$ questions. In the test, $4^{n - k}$ students gave wrong answers to at least $k$ questions, where $k = 1,2,\mbox{...},n$. If the total number of wrong answers is 341, then find the value of n.

2. ## Solution

Here's how to do it:

Spoiler:

The question states that the number of students with at least $k$ questions wrong is $4^{n-k}$. Hence the number that actually get exactly $k$ wrong, $N_k$ , must be the number that get at least $k$ wrong minus those that get at least $(k+1)$ wrong. So we have

$N_k = 4^{n-k} - 4^{n-k-1}$ .

So if we let $N_q$ be the total number of wrongly answered questions then

$N_q = n + \sum_{k=1}^{n-1} k N_k$,

$= n + \sum_{k=1}^{n-1} k (4^{n-k} - 4^{n-k-1})$,

$= n + \sum_{k=1}^{n-1} k 4^{n-k} - \sum_{k=1}^{n-1} k 4^{n-k-1}$,

$= n + \sum_{k=1}^{n-1} k 4^{n-k} - \sum_{k=1}^{n-1} (k+1) 4^{n-(k+1)} +
\sum_{k=1}^{n-1} 4^{n-(k+1)}$
,

$= n + \sum_{k=1}^{n-1} k 4^{n-k} - \sum_{m=2}^{n} m 4^{n-m} + \sum_{k=1}^{n-1} 4^{n-(k+1)}$ (letting $m= k+1$),

$= n + \sum_{k=1}^{n-1} k 4^{n-k} - \sum_{m=2}^{n} m 4^{n-m} + \sum_{k=1}^{n-1} 4^{n-(k+1)}$,

$= n + 4^{n-1} - n + \sum_{k=1}^{n-1} 4^{n-(k+1)}$,

$= \sum_{k=0}^{n-1} 4^{n-(k+1)}$,

$= \sum_{p=0}^{n-1} 4^{p}$ (letting $p = n-(k+1)$),

$= \frac{4^{n}-1}{4-1} = \frac{1}{3}(4^n -1)$.

(I know I could have explicitly written out the sum, 'spot the pattern' - as I did on paper, but decided this was typographically easier than using an array).

So we have that

$341 = \frac{1}{3}(4^n -1)$

and solving gives us that

$\color[rgb]{0,0,1} \boxed{n = 5}$.