1. Let $n$ be a natural number. Denote by $p_{k}$ the number of non-negative integer solutions to the equation $k x+(k+1) y=n-k+1$. Determine the sum $p_{1}+p_{2}+\ldots+p_{n+1}$.
Solution. The given equation can be written in the form

$$
k(x+y+1)+y=n+1
$$

or $k a+b=n+1$, where $0 \leq b=y<x+y+1=a$. Conversely, each solution of the equation $k a+b=n+1$, under the given conditions, corresponds to exactly one solution of the original equation. Therefore, we need to determine the total number of triples $(k, a, b)$, where $a$ and $b$ are non-negative, and $k$ is a positive integer, $k \leq n+1$, for which $k a+b=n+1$ and $b<a$. Since each $k \in\{1,2, \ldots, n+1\}$ corresponds to one representation of the number $n+1$ in the given form (division theorem), we get that the desired sum is equal to $n+1$.