The formula you give for the primitive cohomology group is not correct. I think you meant to write
$$P^k(X, \mathbb{C}) = \ker(L^{n-k+1}: H^{k}(X, \mathbb{C}) \longrightarrow H^{2n-k+2}(X, \mathbb C)).$$
What's going on here is that the hard Lefschetz theorem says that the map $L^{n-k}: H^k \to H^{2n-k}$ is an isomorphism (as is the map you wrote down, which is the same map shifted in $k$ by $1$). To get an interesting kernel, you want to take one more power of $L$ than that, or $L^{n-k+1}$.
How do we remember that exactly $n-k$ powers gives an isomorphism? Well Poincare duality says $H^k $ and $H^{2n-k}$ have the same dimension, so it's very plausible that they are isomorphic. It takes $n-k$ powers of $L$ to get from $H^k$ to $H^{n-k}$.
So: Think of Poincare duality, then remember the hard Lefschetz isomorphism, then shift by 1.
(This is not the fastest route, but remembering how hard Lefschetz works is good for a number of other things.)
Why shift only by $1$? We want to take only the most interesting cohomology classes, so we want our condition to be as strict as possible while still containing nonzero vectors. Since we're taking a kernel, we want to take the kernel of a map that just barely fails to be injective, so we shift by $1$ instead of a larger number.
Why increase by $1$ and not decrease? The cohomology groups increase towards the center and decrease towards the end, so applying one fewer Lefschetz operator would give a map that is injective but usually not surjective, and applying one more Lefschetz operator would give a map that is surjective but usually not injective. We're looking at the kernel, so we want the surjective but not injective one.
The other approach is to look via the representation theory of $SL_2$. The operator $L$ is one part of an action of the Lie algebra $\mathfrak{sl}_2$ on $\bigoplus_{i=0}^{2n} H^i ( X, \mathbb C)$. Specifically, it's a nilpotent element.
We can break $\bigoplus_{i=0}^{2n} H^i ( X, \mathbb C)$ into a sum of irreducible representations, and think about how $L$ acts on each one.
The $r+1$-dimensional representation of $SL_2$ is the sum of $r+1$ copies of $\mathbb C$, where $L$ sends each copy to the next one in the sequence. Viewed as cohomology classes, the degree of each copy is shifted from the last by $2$. Since representations of $SL_2$ are self-dual, they're symmetric around the central degree $n$. So the degrees are $$n-r, n+2-r, \dots, n+r-2, n+r.$$
The goal of the primitive cohomology is to detect a single representation. Specifically, in degree $k$, we want to detect the representation that just barely intersects degree $k$, which is why we take $r= n-k$ so that $n-r = k$. The other representations that contribute to cohomology in degree $k$ have larger values $r>n-k$. We want to choose a map that zeroes out or chosen representation and then take the kernel. $L^{r}$ is an isomorphism on lowest-degree piece of the $r$-dimensional representation, so we take $L^{r+1} = L^{n-k+1}$, which vanishes.