For every positive integer $k$ let $a(k)$ be the largest integer such that $2^{a(k)}$ divides $k$. For every positive integer $n$ determine $a(1)+a(2)+\cdots+a(2^n)$.
To solve the problem, we need to determine the sum \( a(1) + a(2) + \cdots + a(2^n) \) for a given positive integer \( n \). Here, \( a(k) \) is defined as the largest integer such that \( 2^{a(k)} \) divides \( k \).

1. **Understanding \( a(k) \)**:
   - For any positive integer \( k \), \( a(k) \) is the exponent of the highest power of 2 that divides \( k \). This is equivalent to the number of trailing zeros in the binary representation of \( k \).

2. **Summing \( a(k) \) for \( k = 1 \) to \( 2^n \)**:
   - We need to find the sum \( a(1) + a(2) + \cdots + a(2^n) \).

3. **Pattern Observation**:
   - Let's observe the values of \( a(k) \) for small values of \( n \):
     - For \( n = 1 \): \( 1, 2 \)
       \[
       a(1) = 0, \quad a(2) = 1 \quad \Rightarrow \quad \text{Sum} = 0 + 1 = 1
       \]
     - For \( n = 2 \): \( 1, 2, 3, 4 \)
       \[
       a(1) = 0, \quad a(2) = 1, \quad a(3) = 0, \quad a(4) = 2 \quad \Rightarrow \quad \text{Sum} = 0 + 1 + 0 + 2 = 3
       \]
     - For \( n = 3 \): \( 1, 2, 3, 4, 5, 6, 7, 8 \)
       \[
       a(1) = 0, \quad a(2) = 1, \quad a(3) = 0, \quad a(4) = 2, \quad a(5) = 0, \quad a(6) = 1, \quad a(7) = 0, \quad a(8) = 3 \quad \Rightarrow \quad \text{Sum} = 0 + 1 + 0 + 2 + 0 + 1 + 0 + 3 = 7
       \]

4. **Generalizing the Pattern**:
   - Notice that for \( n = 1 \), the sum is \( 1 \).
   - For \( n = 2 \), the sum is \( 3 \).
   - For \( n = 3 \), the sum is \( 7 \).
   - This suggests a pattern: the sum \( S(n) \) for \( n \) is \( 2^n - 1 \).

5. **Proof by Induction**:
   - **Base Case**: For \( n = 1 \), \( S(1) = 1 = 2^1 - 1 \).
   - **Inductive Step**: Assume \( S(k) = 2^k - 1 \) holds for some \( k \). We need to show \( S(k+1) = 2^{k+1} - 1 \).
     - Consider the sum \( a(1) + a(2) + \cdots + a(2^{k+1}) \).
     - This can be split into two parts: \( a(1) + a(2) + \cdots + a(2^k) \) and \( a(2^k+1) + a(2^k+2) + \cdots + a(2^{k+1}) \).
     - By the inductive hypothesis, the first part sums to \( 2^k - 1 \).
     - For the second part, each \( a(2^k + j) \) is \( a(j) + 1 \) for \( j = 1, 2, \ldots, 2^k \).
     - Therefore, the second part sums to \( (a(1) + 1) + (a(2) + 1) + \cdots + (a(2^k) + 1) = (a(1) + a(2) + \cdots + a(2^k)) + 2^k = (2^k - 1) + 2^k = 2^{k+1} - 1 \).

Thus, by induction, the sum \( a(1) + a(2) + \cdots + a(2^n) = 2^n - 1 \).

The final answer is \( \boxed{ 2^n - 1 } \).