2021 AMC 10 A Problem #22 
Question: Hiram's algebra notes are $50$ pages long and are printed on $25$ sheets of paper; the first sheet contains pages $1$ and $2$, the second sheet contains pages $3$ and $4$, and so on. One day he leaves his notes on the table before leaving for lunch, and his roommate decides to borrow some pages from the middle of the notes. When Hiram comes back, he discovers that his roommate has taken a consecutive set of sheets from the notes and that the average (mean) of the page numbers on all remaining sheets is exactly $19$. How many sheets were borrowed?
$\textbf{(A)} ~10\qquad\textbf{(B)} ~13\qquad\textbf{(C)} ~15\qquad\textbf{(D)} ~17\qquad\textbf{(E)} ~20$

Does anyone have a solution that's easy to understand?

So here's what I've tried so far: I set $x$ as the first page his roommate took and $y$ as the total number of sheets his roommate took. I tried setting up an equation to find the average (19):
$$
\frac{1275-\text{sum of the  pages his roomate took}}{50-2y}=19.
$$
1275 is the sum of all the pages and 50-2y is the number of pages that are left. But I can't figure out how to express sum of the  pages his roommate took in terms of x and y
 A: HINT
I would like you show some work on this problem so it becomes easier to guide you. Here is a hint to get you started. Note that in the taken pages, the first one is odd and the last one must be even. Let's say the pages $[a,b]$ are taken. Can you find the mean of the remaining numbers?
HINT
If $x$ is the first page taken, and total number is $y$, then the taken pages are
$x, x+1, x+2, \ldots, x+y-1$ so sum of total pages taken is the arithmetic series
$$
\sum_{k=x}^{x+y-1} k
 = \sum_{k=0}^{y-1} (k+x)
 = x(y-1) + \sum_{k=1}^{y-1} k
 = x(y-1) + \frac{y(y-1)}{2}
 = \frac{(y-1)(2x + y)}{2}
$$
A: Let $n$ be the number of sheets borrowed with average page number $k+25.5$. Since the sheets start with an odd number and end with an even number, we have $k\in \mathbb N$, and the sum of all page numbers are
$$\sum_{i=1}^{50} i = 50 \times 25.5 = 2n\times (k+25.5) + 2(25-n)\times 19 \tag 1$$
$$ \implies 0 = 2nk + 2(25-n)(19-25.5) = 2nk - 13(25-n)\tag 2$$
$$ \implies 13(25-n)=2nk \implies 13 | 2nk \implies 13 |n \text{ or }13|k$$
Case 1: If $13|n$, since $n<25$ we have $n=13, k=6$.
Case 2: If $13|k$, notice that $k \le (49+50)/2-25.5=24$ so $k=13 \implies 25-n=2n$, impossible because $n\in \mathbb N$.

Remark 1: We could obtain $(2)$ directly without $(1)$ by arguing the weighted decrease of average page number (from $25.5$ to $19$) is compensated by weighted increase of average page number (from $25.5$ to $k+25.5$), with the weights being the page (or sheet) number in each group (left vs. borrowed). In fact the first thing I wrote down when I solved this problem was $$(25-n)(25.5-19)=nk$$
Remark 2: if I were in the contest I'd plug in $n=13$, get $k=6$ and move on to the next problem.)
