Find the sum of 101 numbers on a blackboard Alyssa writes 101 distinct positive integers on a blackboard, in a row, so that the sum of any two consecutive integers is divisible by 5. Let N be the smallest possible sum of all 101 integers. Find N. I started with 1, then 4, then 6.... How do I find the sum? What will be the 101th term? Is there an easier way? Thanks.
 A: Assume $x$ is the remainder of the first number when divided by $5$, then it follows that the second number must have $5-x$ as the remainder when divided by $5$. Then the third number must have $x$ as the remainder, and the fourth number must have $5-x$ as the remainder when divided by $5$ ...
Hence, the $i$-th numbers all have remainder $x$ when divided by $5$ when $i$ is odd, and the $i$th numbers all have remainder $5-x$ when divided by $5$ when $i$ is even.
So, for a sequence of $101$ numbers, we have to get the smallest $51$ positive integers which have remainder $x$ when divided by $5$, and the smallest $50$ positive integers which have remainder $5-x$ when divided by $5$. Hence $x$ should be $1$ if we want to minimize the sum. This means your $101$ numbers are $1, 6, 11, 16, \dots, ... 251$, and $4, 9, 14, 19, \dots, ... 249$. Adding them together give you the total $= 12751$.
However, there is no distinct answer for your second part of the question "what is the $101$-th term". This is because the question does not specify whether the sequence of numbers must be strictly increasing. So, any one of the smallest $51$ positive integers which have remainder $1$ when divided by $5$, i.e., $1, 6, 11, 16, \dots, 251$, can be the $101$-th term.
A: A fairly brute force approach works quite nicely.
HINT: Let the numbers be $a_0,a_1,\ldots,a_{100}$. Since $5$ divides both $a_{k-1}+a_k$ and $a_k+a_{k+1}$, it’s clear that $a_{k+1}\equiv a_{k-1}\pmod5$ for $k=1,\ldots,99$. In particular, $a_{2k}\equiv a_0\pmod5$ for $k=0,\ldots,50$, and $a_{2k+1}\equiv a_1\pmod5$ for $k=0,\ldots49$.


*

*If $a_0\equiv 0\pmod5$, then all $101$ integers are multiples of $5$, and the smallest possibility is that they are $5,10,\ldots,505$; these form an arithmetic progression and are therefore easily summed.

*If $a_0\equiv 1\pmod5$, then $a_1\equiv 4\pmod5$, and the smallest possibility is that the even-indexed numbers are the integers $5k+1$ for $k=0,\ldots,50$, and the odd-indexed numbers are the integers $5k+4$ for $k=0,\ldots,49$. These are two arithmetic progressions and can again be easily summed.
The other three cases are similar. With a little extra thought you can eliminate the cases $a_0\equiv3\pmod5$ and $a_0\equiv4\pmod5$, but even if you don’t see why this is so, it’s not a great lot of work simply to calculate the smallest possible sum for each of the five cases and pick the smallest.
