10.5. All natural numbers from 1 to 100 are written in some order in a circle. For each pair of adjacent numbers, the sum is calculated. Out of the hundred resulting numbers, what is the maximum number that can be divisible by 7?
Answer: 96.

Solution. For the sum of a pair of adjacent numbers to be divisible by 7, their remainders when divided by 7 must sum to 7: 0+0, 1+6, 2+5, and 3+4. Let's call such pairs of remainders suitable pairs. Among the numbers from 1 to 100, there are 14, 15, 15, 14, 14, 14, and 14 numbers with remainders 0, 1, 2, 3, 4, 5, and 6, respectively. A sequence of numbers with alternating suitable pairs of remainders will be called a correct series. If a correct series consists of \( x \) numbers, it will yield \( x-1 \) sums that are divisible by 7. If there are \( n \) such series, they will yield \( 15+14-n=29-n \) or \( 14+14-n=28-n \) such sums. Similarly, for other groups of remainders, we see that the total number of sums divisible by 7 is 100 minus the number of correct series into which all numbers from 1 to 100 are divided. For each pair of suitable remainders, there is at least one correct series, so the total number of sums divisible by 7 does not exceed \( 100-4=96 \).

An example for 96 can be constructed easily: first, all numbers divisible by 7 go in a row, then numbers with remainders 1 and 6 alternate, followed by numbers with remainders 2 and 5 alternating, and finally, all numbers with remainders 3 and 4 alternate. Since the quantities of numbers in groups with different remainders differ by no more than 1, this is possible.