### Langford's Problem

Posted:

**Mon Jun 16, 2003 5:02 am****Background:**

Link: http://www.lclark.edu/~miller/langford.html

In short:

1. The sequence contains

**2N**integers, where

**N = 4x or 4x-1**.

2. Each of the integers between 1 and

**N**appears twice in the sequence.

3. The two integers

**K**in the sequence are separated by exactly

**K**other numbers.

e.g. Solution for

**N = 3**is

**"3 1 2 1 3 2"**

Now, I have to write a Pascal program to generate a single solution for any valid

**N**(3 <=

**N**<= 200). However, my program is extremely slow when

**N**> 64 ... >_<

So, could anyone help me? Thx in advance!