Let the numbers in a row be a1,a2,…,a125. By conditions, we have ai+1>2ai+ai+2 for every i=1,2,…,123, which is equivalent to ai+1−ai>ai+2−ai+1. Denoting di=ai+1−ai, we have d1>d2>⋯>d124.
Let am be the largest among a1,…,a125; then d1,d2,…,dm−1 are positive and dm,dm+1,…,d124 are negative. If both 1 and −1 occurred among the differences d1,d2,…,d124, then they should be consecutive, i.e., di=1 and di+1=−1 for some i, whence ai+1=ai−1. Contradiction to the assumption that the given numbers are distinct shows that either 1 or −1 is missing among the differences. W.l.o.g., assume that 1 is missing (if −1 is missing, we can reverse the numeration of the given numbers).
Then am=a1+(d1+d2+⋯+dm−1)≥1+(m+(m−1)+⋯+2)=1+2+⋯+m and am=a125−(dm+dm+1+⋯+d124)≥1+(1+2+⋯+(125−m)). Among numbers m and 125−m, one is at least 63, whence the previously established inequalities imply am≥1+2+⋯+63.
On the other hand, taking a1=1 and di=64−i, 1≤i≤62, and di=62−i, 63≤i≤124, the largest number a63 equals 1+2+⋯+63, while all numbers ai are positive, as 1=a1<a2<⋯<a63 and a63>a64>⋯>a125=(1+2+⋯+63)−(1+2+⋯+62)=63. All these numbers are distinct, since for every i=64,65,…,125, ai=(1+2+⋯+63)−(1+2+⋯+(i−63))=(i−62)+(i−61)+⋯+63=a127−i−1, whence ai lies strictly between a126−i and a127−i. Consequently, the largest number written in the row is 1+2+⋯+63, i.e., 2016.