login
A272570
Inverse permutation to A175500.
1
1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 14, 8, 16, 12, 18, 13, 20, 19, 22, 24, 28, 33, 35, 15, 25, 37, 39, 26, 41, 27, 43, 30, 45, 47, 49, 17, 51, 53, 62, 29, 55, 57, 64, 31, 66, 84, 82, 21, 58, 70, 88, 74, 86, 59, 90, 60, 94, 96, 92, 23, 98, 102, 76, 32, 112, 68
OFFSET
1,2
LINKS
MATHEMATICA
p = Last /@ Import["https://oeis.org/A175500/b175500.txt", "Table"]; n = First[ Complement[ Range[10^4], p]] - 1; ip = 0 Range@ n; Do[If[(v = p[[i]]) <= n, ip[[v]] = i], {i, Length@p}]; ip (* Giovanni Resta, May 21 2016 *)
PROG
(PARI) ok(j, va, vs, n) = {if (vecsearch(vs, j), return (0)); for (k=1, n-1, if ((numdiv(j) == numdiv(va[k])) && (numdiv(va[k-1]) == numdiv(va[n-1])), return (0)); ); 1; }
findnew(va, vs, n) = {my(j = 1); my(vs = vecsort(va)); until (ok(j, va, vs, n), j++); j; }
listb(nn) = {my(va = [1]); for (n=2, nn, vs = vecsort(va); newa = findnew(va, vs, n); va = concat(va, newa); ); va; }
invp(v) = {for (i=1, vecmax(v), found = 0; for (k=1, #v, if (v[k] == i, found = k; break); ); if (! found, break); print1(found, ", "); ); }
lista(nn) = invp(listb(nn)); \\ Michel Marcus, May 04 2016
CROSSREFS
Cf. A175500.
Sequence in context: A117730 A193838 A174328 * A123101 A071557 A331802
KEYWORD
nonn
AUTHOR
Max Barrentine, May 03 2016
STATUS
approved