login
A235489
Self-inverse and multiplicative permutation of integers: For n < 8, a(n) = n, a(8)=9 and a(9)=8, a(p_i) = p_{a(i)} for primes with index i, and for composites > 9, a(u*v) = a(u) * a(v).
9
0, 1, 2, 3, 4, 5, 6, 7, 9, 8, 10, 11, 12, 13, 14, 15, 18, 17, 16, 23, 20, 21, 22, 19, 27, 25, 26, 24, 28, 29, 30, 31, 36, 33, 34, 35, 32, 37, 46, 39, 45, 41, 42, 43, 44, 40, 38, 47, 54, 49, 50, 51, 52, 61, 48, 55, 63, 69, 58, 59, 60, 53, 62, 56, 81, 65, 66, 83, 68, 57, 70, 71, 72, 73, 74, 75, 92, 77, 78, 79, 90, 64
OFFSET
0,3
COMMENTS
The permutation satisfies A000040(a(n)) = a(A000040(n)) for all positive n, and is self-inverse. It swaps 8 & 9, maps any prime p_i with index i to p_{a(i)}, and lets the multiplicativity take care of the rest.
This can be viewed also as a "signature-permutation" for a bijection of non-oriented rooted trees, mapped through Matula-Goebel numbers (cf. A061773). This bijection will swap the subtrees encoded by numbers 8 and 9, wherever they occur as the terminal branches of the tree:
.......................
.................o...o.
.................|...|.
.o.o.o...........o...o.
..\|/.............\./..
...x.....<--->.....x...
...8...............9...
Thus, any terminal configuration in the tree that consists of three or more single edges next to each other (in "parallel") will be transformed so that maximal 3k number of those single edges will be replaced by k subtrees Matula-Goebel-encoded by 9 (see above, or equally: replaced by 2k two-edges-long branches encoded by 3), and one or two left-over single edges, if present, will stay as they are. Vice versa, any terminal configuration in the tree that consists of more than one two-edges-long branches next to each other (in "parallel") will be transformed so that maximal even number (2k) of those double-edges will be replaced by 3k single edges, and an extra odd double-edge, if present, will stay as it is.
Note how in contrast to A235487, A235201 and A235199, this bijection is not size-preserving (the number of edges will change), which has implications when composing this with other such permutations (cf. e.g. A235493/A235494).
FORMULA
Multiplicative with a(3^(2k)) = 2^3k = 8^k, a(3^(2k+1)) = 3*2^3k, a(2^(3k)) = 3^2k = 9^k, a(2^(3k+1)) = 2*9^k, a(2^(3k+2)) = 4*9^k, a(p_i) = p_{a(i)} for primes with index i, and a(u*v) = a(u) * a(v) for composites other than 8 or 9.
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(definec (A235489 n) (cond ((< n 8) n) ((zero? (modulo n 8)) (* 9 (A235489 (/ n 8)))) ((zero? (modulo n 9)) (* 8 (A235489 (/ n 9)))) ((= 1 (A010051 n)) (A000040 (A235489 (A000720 n)))) (else (reduce * 1 (map A235489 (ifactor n))))))
CROSSREFS
Composition with A235201 gives A235493/A235494.
List below gives similarly constructed permutations, which all force a swap of two small numbers, with (the rest of) primes permuted with the sequence itself and the new positions of composite numbers defined by the multiplicative property:
A234840 (swaps 2 & 3, conjugates A008578 back to itself).
A235200 (swaps 3 & 5, conjugates A065091 back to itself).
A235201 (swaps 3 & 4, conjugates A000040 back to itself).
A235199 (swaps 5 & 7, conjugates A000040 back to itself).
A235487 (swaps 7 & 8, conjugates A000040 back to itself).
Sequence in context: A031978 A304481 A222254 * A065306 A065307 A372655
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Jan 11 2014
STATUS
approved