Theorem

It has been shown that, for N= 3, 4, 7 and 8, a list can be written of two copies of each of the numbers T = 1 to N with T other numbers between the two copies of the number T. There are no such arrangements for N=1, 2, 5, 6 or 9 or any number that leaves a remainder of 1 or 2 when divided by 4.

[Note: This problem is not, of course, restricted to single digit numbers. To generalise the problem further for N>9 we could use 2N cards, write the numbers on the cards, and try to arrange them in the required order or, alternatively, use a single, specially chosen, symbol for each number. We have proved that for solutions to exist it is necessary that N has remainder 0 or 3 when divided by 4 but can you prove that this is a sufficient condition? To do this you would need to prove that solutions exist for all such values of N.]

Proof

For N pairs of digits there are 2N positions labelled 1, 2, 3...2N.
Suppose: 1 is at positions A(1) and A(1) + 2
  2 is at positions A(2) and A(2) + 3
  3 is at positions A(3) and A(3) + 4
  ....
and N is at positions A(N) and A(N) + N + 1

Assuming a solution exists then the numbers A(1), A(1)+2, A(2), A(2)+3,...,A(N) + N + 1 must give the position labels 1, 2, 3,...,2N in some order, with each position label occurring once and only once. From this we get:
1 + 2 + 3 + ... + 2N = 2[A(1) + A(2) + ... + A(N)] + [2 + 3 + ... + (N+1)].

Summing the series in this expression gives:
2N(2N+1)/2 = 2[A(1) + A(2) + ... + A(N)] + (N+1)(N+2)/2 - 1.

Re-arranging and simplifying this expression gives:
4[A(1) + A(2) + ... + A(N)] = 2N(2N+1) - (N+1)(N+2) + 2
4[A(1) + A(2) + ... + A(N)] = N(3N-1).

Hence there can only be solutions when N(3N-1) is a multiple of 4. There are four possible cases where, for some whole number K, either N = 4K or N=4K+1 or N=4K+2 or N=4K+3. We shall check these cases in turn.

If N=4K then N(3N-1) is a multiple of 4 because N is a multiple of 4.
If N=4K+1 then N(3N-1) = (4K+1)(12K+2); which is not a multiple of 4 so there cannot be any solutions for such values of N.
If N=4K+2 then N(3N-1) = (4K+1)(12K+5) which is not a multiple of 4 so there cannot be any solutions for these values of N.
If N=4K+3 then N(3N-1) = (4K+1)(12K+8) which is a multiple of 4.