3. If $a-$ is the first term and $d-$ is the common difference of an arithmetic progression, $\left\{\begin{array}{l}a+16 d=52, \\ a+29 d=13\end{array} \Leftrightarrow d=-3, a=100\right.$.

The sum of the first $n$ terms of an arithmetic progression $S_{n}$ reaches its maximum value if $a_{n}>0$, and $a_{n+1} \leq 0$. Since $a_{n}=a+d(n-1)$, from the inequality $100-3(n-1)>0$ we find $n=[103 / 3]=34$. Then $\max S_{n}=S_{34}=0.5 \cdot(100+100-3 \cdot 33) \cdot 34=1717$.
Answer: 1717

![](https://cdn.mathpix.com/cropped/2024_05_06_797a639488ab43e0ad60g-01.jpg?height=180&width=1642&top_left_y=1258&top_left_x=181)

Consider the equation of the system $\sqrt{2} \cos \frac{\pi y}{8}=\sqrt{1+2 \cos ^{2} \frac{\pi y}{8} \cos \frac{\pi x}{4}-\cos \frac{\pi x}{4}}$. Given the condition $\sqrt{2} \cos \frac{\pi y}{8} \geq 0$, i.e., $-4+16 k \leq y \leq 4+16 k, k \in \mathbb{Z}$, we have

$2 \cos ^{2} \frac{\pi y}{8}-1-2 \cos ^{2} \frac{\pi y}{8} \cos \frac{\pi x}{4}+\cos \frac{\pi x}{4}=0 \quad \Leftrightarrow \quad\left(2 \cos ^{2} \frac{\pi y}{8}-1\right)\left(1-\cos \frac{\pi x}{4}\right)=0 \quad \Leftrightarrow \sqrt{2} \cos \frac{\pi y}{8}=1$ or $\cos \frac{\pi x}{4}=1 \quad \Leftrightarrow y=2+16 k, y=-2+16 k, k \in \mathbb{Z}$, or $\quad x=8 n, n \in \mathbb{Z}$. The integer solutions of the system will be points $(l ; 2+16 k),(l ;-2+16 k),(8 n ; m), l, k, n, m \in \mathbb{Z}, \quad-4+16 s \leq m \leq 4+16 s, s \in \mathbb{Z}$, lying in the square centered at the point $(0 ; 4)$, with side $4 \sqrt{2}$, diagonals parallel to the coordinate axes, and in the half-plane $y<x+2$. Such points will be $(0 ; 0),(0 ; 1),(1 ; 2),(2 ; 2)$.

Answer: $(0 ; 0),(0 ; 1),(1 ; 2),(2 ; 2)$