The smallest value on the blackboard

The square numbers $1^2, 2^2, 3^2, 4^2, \cdots, 100^2, 101^2$ are written on the blackboard. Each minute any two numbers are wiped out, and the absolute value of their difference is written instead. At the end only one number remains.

What is the smallest value that this final number can take?

A simple way to get to 1

First we will transform the squares $1$ to $81$ as follows:

$81-64=17$
$49-36=13$
$16-9=7$
$4-1=3$

$17-7=10$
$13-3=10$

$25-10=15$
$15-10=5$

We are left with the $5$ and additional $92$ squares from $10^2$ to $101^2$. Each consecutive $4$ squares can be transformed to a $4$ like in the following example using $100$, $121$, $144$ and $169$:

$169-144=25$
$121-100=21$
$25-21=4$

This gives us a total of $1*5$ and $23*4$. We can get rid of $22*4$ by doing:

$4-4=0$

And the remaining 5 and 4 gives us:

$5-4=1$

Is a lower number possible?

The only other lower number would be a $0$. But this is not possible because we start with an odd count of odd numbers. We can only remove odd numbers in pairs which leaves us with an odd number at the end. The lowest non-negative odd number is $1$.

If you keep taking the largest 2 numbers, and substract them from eachother, you end up with

the number 1. This is the lowest number possible: a move does not change the parity of the number of odd integers on the blackboard. As in the beginning the blackboard does contain $51$ odd integers, it will also contain an odd number of odd integers when the process terminates. Hence the final number will always be odd.

There's no very clean way to illustrate this (that i came up with) besides giving the calculations used

10201 - 10000 = 201, 9801 - 9604 = 197, 9409 - 9216 = 193, 9025 - 8836 = 189, 8649 - 8464 = 185, 8281 - 8100 = 181, 7921 - 7744 = 177, 7569 - 7396 = 173, 7225 - 7056 = 169, 6889 - 6724 = 165, 6561 - 6400 = 161, 6241 - 6084 = 157, 5929 - 5776 = 153, 5625 - 5476 = 149, 5329 - 5184 = 145, 5041 - 4900 = 141, 4761 - 4624 = 137, 4489 - 4356 = 133, 4225 - 4096 = 129, 3969 - 3844 = 125, 3721 - 3600 = 121, 3481 - 3364 = 117, 3249 - 3136 = 113, 3025 - 2916 = 109, 2809 - 2704 = 105, 2601 - 2500 = 101, 2401 - 2304 = 97, 2209 - 2116 = 93, 2025 - 1936 = 89, 1849 - 1764 = 85, 1681 - 1600 = 81, 1521 - 1444 = 77, 1369 - 1296 = 73, 1225 - 1156 = 69, 1089 - 1024 = 65, 961 - 900 = 61, 841 - 784 = 57, 729 - 676 = 53, 625 - 576 = 49, 529 - 484 = 45, 441 - 400 = 41, 361 - 324 = 37, 289 - 256 = 33, 225 - 201 = 24, 197 - 196 = 1, 193 - 189 = 4, 185 - 181 = 4, 177 - 173 = 4, 169 - 169 = 0, 165 - 161 = 4, 157 - 153 = 4, 149 - 145 = 4, 144 - 141 = 3, 137 - 133 = 4, 129 - 125 = 4, 121 - 121 = 0, 117 - 113 = 4, 109 - 105 = 4, 101 - 100 = 1, 97 - 93 = 4, 89 - 85 = 4, 81 - 81 = 0, 77 - 73 = 4, 69 - 65 = 4, 64 - 61 = 3, 57 - 53 = 4, 49 - 49 = 0, 45 - 41 = 4, 37 - 36 = 1, 33 - 25 = 8, 24 - 16 = 8, 9 - 8 = 1, 8 - 4 = 4, 4 - 4 = 0, 4 - 4 = 0, 4 - 4 = 0, 4 - 4 = 0, 4 - 4 = 0, 4 - 4 = 0, 4 - 4 = 0, 4 - 4 = 0, 4 - 3 = 1, 3 - 1 = 2, 2 - 1 = 1, 1 - 1 = 0, 1 - 1 = 0, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1, 1 - 0 = 1

Where the bolded area indicates the part that's different from Joe Z's method.

If you erase $n^2$ and $(n+1)^2$ starting from $n = 2$ and going up by $2$, you end up with the numbers $1, 5, 9, \ldots, 201$, which is a total of 51 numbers.

If you then erase pairs of consecutive numbers starting from $5$ and $9$, you end up with a single $1$ and 25 $4$'s.

If you erase consecutive pairs of 4's until they become $0$, you're left with one $1$ and one $4$, which gives you a final number of $3$.

• Haven't figured out whether 2 or 1 are doable yet, but that's the easiest answer to come up with. – Joe Z. Oct 31 '15 at 19:35
• I think you'll get to 1 when instead of pairing n and n+1, you always pair the highest 2 numbers together. (\$101^2 - 100^2 - 14^2, for example), that's what my script tells me anyway, but i'm not entirely sure i don't have a mistake in there somewhere :D – DrunkWolf Oct 31 '15 at 19:42
• If 3 is possible, parity should rule out 2 and 0. – f'' Oct 31 '15 at 20:18

The question is, what's the lowest number possible from subtracting pairs until one number remains... the series is n² for n = 1 to 101.

there is an odd number of pairs, so there will be one number remaining at the end. it makes sense to start at the largest pairs... 101² - 100² = 201 99² - 98² = 197 ... there are 100 pairs and the first item (1). Subtract the highest of these leaves 25 pairs. or ((n+3)²-(n+2)²)-((n+1)² - (n)²) = 4 There are 25 pairs that subtract to 4...

Canceling them out leaves you with a 4 and a 1...