(* A program to compute desired circular permutations for n = 7. *)
V[i_]:=Part[Permutations[{2, 3, 4, 5, 6, 7}], i]
m=0
Do[If[Length[Union[Table[Mod[If[j==0, 1, Part[V[i], j]]^2+If[j<6, Part[V[i], j+1], 1], 7], {j, 0, 6}]]]<7, Goto[aa]];
m=m+1; Print[m, ":", " ", 1, " ", Part[V[i], 1], " ", Part[V[i], 2], " ", Part[V[i], 3], " ", Part[V[i], 4], " ", Part[V[i], 5], " ", Part[V[i], 6]]; Label[aa]; Continue, {i, 1, 6!}]