We are given an orthonormal basis \( \{ e_k : k \in \mathbb{N} \} \) for the Hilbert space \( H \), and the definitions for \( f_k \) and \( g_j \). We need to evaluate the sum \( \sum_{k=1}^{\infty} | \langle g_j, f_k \rangle |^2 \).
Step 1: Analyze the inner product
First, express \( f_k \) and \( g_j \) as:
\[
f_k = e_k + e_{k+1}, \quad g_j = \sum_{n=1}^{j} (-1)^{n+1} e_n.
\]
The inner product \( \langle g_j, f_k \rangle \) can be computed as:
\[
\langle g_j, f_k \rangle = \left\langle \sum_{n=1}^{j} (-1)^{n+1} e_n, e_k + e_{k+1} \right\rangle.
\]
Using the linearity and orthonormality properties, we expand this as:
\[
\langle g_j, f_k \rangle = \sum_{n=1}^{j} (-1)^{n+1} \langle e_n, e_k \rangle + \sum_{n=1}^{j} (-1)^{n+1} \langle e_n, e_{k+1} \rangle.
\]
Since \( \langle e_n, e_k \rangle = \delta_{nk} \) (Kronecker delta), the first sum contributes \( (-1)^{k+1} \) and the second sum contributes \( (-1)^{k+2} \). Therefore:
\[
\langle g_j, f_k \rangle = (-1)^{k+1} + (-1)^{k+2}.
\]
Step 2: Simplify the sum
Now, compute \( | \langle g_j, f_k \rangle |^2 \):
\[
| \langle g_j, f_k \rangle |^2 = | (-1)^{k+1} + (-1)^{k+2} |^2.
\]
For any \( k \), this simplifies to \( 4 \), since \( (-1)^{k+1} + (-1)^{k+2} = 2 \) when \( k \) is odd, and \( -2 \) when \( k \) is even.
Step 3: Final computation
The sum is then:
\[
\sum_{k=1}^{\infty} | \langle g_j, f_k \rangle |^2 = \sum_{k=1}^{\infty} 4 = 1.
\]
Thus, the value of the sum is 1.