Langford's problem asks for an arrangement of two copies of the integers 1, ..., , for a positive integer, with exactly entries between the two occurrences of for each , ..., . For example, the unique (modulo reversal) solution is 231213, and the unique (again modulo reversal)
solution is 23421314.
Davies (1959) showed that solutions to Langford's problem exist iff (cf. Assarpour et al.
2017), so the next solutions occur for . There are 26 of these, as
exhibited by Lloyd (1971). Listed by increasing and then in lexicographic
order, with each solution represented by the smaller of it and its reversal,
the first few Langford sequences are 231213, 23421314, 14156742352637, 14167345236275,
15146735423627, ... (OEIS A050998).
The number of solutions for , 4, 5, ... (modulo reversal
of the entries) are 1, 1, 0, 0, 26, 150, 0, 0, 17792, 108144, ... (OEIS A014552).
No formula is known for the number of solutions of a given order , but Assarpour et al. (2017) computed their
counts up to , making the smallest unknown case (since there are no Langford
sequences of order 29 or 30).