Reinhard.Zumkeller@gmail.com May 24 2010 a178254.txt A178254 Example for n=42 ======= ================ The proper divisors of 42 = 2*3*7: 1, 2, 3, 7, 6, 14, and 21; there are A178254(42)=36 permutations such that adjacent elements are coprime. 01 [2, 21, 1, 6, 7, 3, 14] 02 [2, 21, 1, 14, 3, 7, 6] 03 [3, 14, 1, 6, 7, 2, 21] 04 [3, 14, 1, 21, 2, 7, 6] 05 [6, 1, 14, 3, 7, 2, 21] 06 [6, 1, 21, 2, 7, 3, 14] 07 [6, 7, 1, 14, 3, 2, 21] 08 [6, 7, 1, 21, 2, 3, 14] 09 [6, 7, 2, 3, 14, 1, 21] 10 [6, 7, 2, 21, 1, 3, 14] 11 [6, 7, 2, 21, 1, 14, 3] 12 [6, 7, 3, 2, 21, 1, 14] 13 [6, 7, 3, 14, 1, 2, 21] 14 [6, 7, 3, 14, 1, 21, 2] 15 [7, 6, 1, 14, 3, 2, 21] 16 [7, 6, 1, 21, 2, 3, 14] 17 [14, 1, 6, 7, 3, 2, 21] 18 [14, 1, 21, 2, 3, 7, 6] 19 [14, 3, 1, 6, 7, 2, 21] 20 [14, 3, 1, 21, 2, 7, 6] 21 [14, 3, 2, 7, 6, 1, 21] 22 [14, 3, 2, 21, 1, 6, 7] 23 [14, 3, 2, 21, 1, 7, 6] 24 [14, 3, 7, 2, 21, 1, 6] 25 [14, 3, 7, 6, 1, 2, 21] 26 [14, 3, 7, 6, 1, 21, 2] 27 [21, 1, 6, 7, 2, 3, 14] 28 [21, 1, 14, 3, 2, 7, 6] 29 [21, 2, 1, 6, 7, 3, 14] 30 [21, 2, 1, 14, 3, 7, 6] 31 [21, 2, 3, 7, 6, 1, 14] 32 [21, 2, 3, 14, 1, 6, 7] 33 [21, 2, 3, 14, 1, 7, 6] 34 [21, 2, 7, 3, 14, 1, 6] 35 [21, 2, 7, 6, 1, 3, 14] 36 [21, 2, 7, 6, 1, 14, 3] Generally for p, q, and r prime, with p < q < r (multiplication signs omitted): 01 [p, qr, 1, pq, r, q, pr] 02 [p, qr, 1, pr, q, r, pq] 03 [q, pr, 1, pq, r, p, qr] 04 [q, pr, 1, qr, p, r, pq] 05 [pq, 1, pr, q, r, p, qr] 06 [pq, 1, qr, p, r, q, pr] 07 [pq, r, 1, pr, q, p, qr] 08 [pq, r, 1, qr, p, q, pr] 09 [pq, r, p, q, pr, 1, qr] 10 [pq, r, p, qr, 1, q, pr] 11 [pq, r, p, qr, 1, pr, q] 12 [pq, r, q, p, qr, 1, pr] 13 [pq, r, q, pr, 1, p, qr] 14 [pq, r, q, pr, 1, qr, p] 16 [r, pq, 1, pr, q, p, qr] 15 [r, pq, 1, qr, p, q, pr] 17 [pr, 1, pq, r, q, p, qr] 18 [pr, 1, qr, p, q, r, pq] 19 [pr, q, 1, pq, r, p, qr] 20 [pr, q, 1, qr, p, r, pq] 21 [pr, q, p, r, pq, 1, qr] 22 [pr, q, p, qr, 1, pq, r] 23 [pr, q, p, qr, 1, r, pq] 24 [pr, q, r, p, qr, 1, pq] 25 [pr, q, r, pq, 1, p, qr] 26 [pr, q, r, pq, 1, qr, p] 27 [qr, 1, pq, r, p, q, pr] 28 [qr, 1, pr, q, p, r, pq] 29 [qr, p, 1, pq, r, q, pr] 30 [qr, p, 1, pr, q, r, pq] 31 [qr, p, q, r, pq, 1, pr] 32 [qr, p, q, pr, 1, pq, r] 33 [qr, p, q, pr, 1, r, pq] 34 [qr, p, r, q, pr, 1, pq] 35 [qr, p, r, pq, 1, q, pr] 36 [qr, p, r, pq, 1, pr, q] Seen symbolically the defining property can be stated as ?all permutations of (1, p, q, r, pq, pr, qr) such that adjacent words have no common letter?.