# Subtract a square

Subtract-a-square (also referred to as take-a-square) is a two-player mathematical game of strategy. It is played by two people with a pile of coins (or other tokens) between them. The players take turns removing coins from the pile, always removing a non-zero square number of coins. The game is usually played as a normal play game, which means that the player who removes the last coin wins.[1][2] It is an impartial game, meaning that the set of moves available from any position does not depend on whose turn it is. Solomon W. Golomb credits the invention of this game to Richard A. Epstein.[3]

## Illustration

A normal play game starting with 13 coins is a win for the first player provided (s)he starts with a subtraction of 1:

```player 1: 13 - 1*1 = 12
```

Player 2 now has three choices: subtract 1, 4 or 9. In each of these cases, player 1 can ensure that within a few moves the number 2 gets passed on to player 2:

```player 2: 12 - 1*1 = 11        player 2:       12 - 2*2 = 8               player 2: 12 - 3*3 = 3
player 1: 11 - 3*3 =  2        player 1:        8 - 1*1 = 7               player 1:  3 - 1*1 = 2
player 2:  7 - 1*1 = 6 or: 7 - 2*2 = 3
player 1:  6 - 2*2 = 2     3 - 1*1 = 2
```

Now player 2 has to subtract 1, and player 1 subsequently does the same:

```player 2:  2 - 1*1 = 1
player 1:  1 - 1*1 = 0
player 2 loses
```
Other Languages