login
A104973
Numbers with 6 distinct digits {1,2,3,4,5,6} such that all adjacent digits (as well as first and last digits) are coprime.
2
123456, 143256, 165234, 165432, 216543, 234165, 234561, 256143, 321654, 325614, 341652, 345612, 416523, 432165, 432561, 456123, 523416, 543216, 561234, 561432, 612345, 614325, 652341, 654321
OFFSET
1,1
MATHEMATICA
aaadcpQ[n_]:=And@@CoprimeQ@@@Partition[n, 2, 1]&&CoprimeQ[n[[1]], n[[-1]]]; FromDigits/@Select[Permutations[Range[6]], aaadcpQ] (* Harvey P. Dale, Mar 22 2018 *)
CROSSREFS
Sequence in context: A254024 A254891 A178476 * A077301 A371845 A209734
KEYWORD
full,nonn,base,fini
AUTHOR
Zak Seidov, Mar 30 2005
STATUS
approved