# Minimal sum of a row in a spiral matrix

Consider a spiral arrangement of a $5\times6$ matrix with entries from $0$ to $29$.

\begin{pmatrix}20& 21 &22 &23 &24 &25\\ 19 &06 &07 &08& 09 &26\\ 18 &05 &00 &01 &10 &27\\ 17 &04 &03 &02 &11 &28\\ 16 &15 &14 &13 &12 &29 \end{pmatrix}

Now consider a $100\times100$ matrix and consider sum of each row of the matrix. The minimum sum obtained in all such sums will be between $1501$ and $3000$.

Prove this.

Here's what I tried : The minimum sum can be obtained from the 3rd row in this $5\times 6$ matrix which when extended to a $100\times100$ matrix makes a series, whose first order differences are in AP. I found the sum to be $19,503$ which way is above the given limits.

• Have edited your quesiton with MathJax, take a look and see how to format the matrix :D – lioness99a Jun 13 '17 at 15:20
• Hey,thanks a lot! – Epsilon zero Jun 13 '17 at 15:23
• The question is definitely wrong. It is fairly easy to see that the smallest sum will be in the row containing 0 and 1. The 50 entries on the right half are given by $4n^2+5n+1$, for $n=1 ... 50$. Those on the left are $4n^2+n$, for $n=0 ... 49$. I make the sum $341050$. I may be wrong, but it's definitely not in the $3000$ ballpark. Single numbers from the outermost spiral of the matrix are in the order of $10000$, obviously too large. – Jaap Scherphuis Jun 13 '17 at 15:32
• Isn't the sum to n terms of the series 1+10+27+52+.. is (n²+n)(8n-5)/6 ? – Epsilon zero Jun 13 '17 at 17:19
• Wolfram gets $n(8n^2+27n+25)/2$. In my previous comment I should have summed up to $n=49$. The last term in the sum is $4*49^2+5*49+1=9850$, which is far larger than the value that the question claims the whole sum should be, so the question is very wrong. – Jaap Scherphuis Jun 14 '17 at 12:51