I have a solution for an instance of langford's numbers problem, and I want to generalize it, but I'm lacking some prolog tools.
For n=3 and k=2
I would write a predicate as following:
sequence([_,_,_,_,_,_]).
solve(L):-
sequence(L),
sublist([3,_,_,_,3],L),
sublist([2,_,_,2],L)...