Math Puzzle, finding a sequence with a certain property

190 Views Asked by At

A certain number of the $5000$ members of the Conway Mathematical Society (each of which has a different membership number between $1$ and $5000$) got together to discuss a puzzle. Much to their surprise, when they were lining up for lunch they discovered that their membership number formed a sequence of consecutive whole numbers and, moreover, that none of them was standing next to someone whose number was relatively prime to his own.

I have tried a brute force approach to the problem, but I think the problem has only the trivial solution (i.e, only one member).