login
A235199
Self-inverse and multiplicative permutation of integers: For n < 4, a(n)=n, a(5)=7 and a(7)=5, a(p_i) = p_{a(i)} for primes with index i > 4, and a(u * v) = a(u) * a(v) for u, v > 0.
11
0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 14, 17, 12, 13, 10, 21, 16, 11, 18, 19, 28, 15, 34, 23, 24, 49, 26, 27, 20, 43, 42, 59, 32, 51, 22, 35, 36, 37, 38, 39, 56, 41, 30, 29, 68, 63, 46, 73, 48, 25, 98, 33, 52, 53, 54, 119, 40, 57, 86, 31, 84, 61, 118, 45, 64, 91, 102
OFFSET
0,3
COMMENTS
The permutation satisfies A000040(a(n)) = a(A000040(n)) for all positive n except n=3 or 4, and is self-inverse. It swaps 5 & 7, maps all larger primes p_i (with index i > 4) to p_{a(i)}, and lets the multiplicativity take care of the rest.
It can be viewed also as a "signature-permutation" for a bijection of non-oriented rooted trees, mapped through Matula-Goebel numbers (cf. A061773). The bijection will swap the subtrees encoded by primes 5 and 7, wherever they occur as the terminal branches of the tree:
....................
.o..................
.|..................
.o.............o...o
.|..............\./.
.o.....<--->.....o..
.|...............|..
.x...............x..
.5...............7..
That is, any branch which ends at least in three edges long unbranched stem, will be changed so that its last two edges will become V-branch. Vice versa, any branch of the tree that ends with three edges in Y-formation, will be transformed so that those three edges will be straightened to an unbranching stem of three edges.
This permutation commutes with A235201, i.e. a(A235201(n)) = A235201(a(n)) for all n.
Permutation fixes n! for n=0, 1, 2, 3, 4, 7, 8 and 9.
Note also that a(5!) = a(120) = 168 = 120+(2*4!) and a(10!) = 5080320 = 3628800+(4*9!).
FORMULA
For n < 4, a(n)=n, a(5)=7 and a(7)=5, a(p_i) = p_{a(i)} for primes with index i > 4, and a(u * v) = a(u) * a(v) for u, v > 0.
A000035(a(n)) = A000035(n) = (n mod 2) for all n. [Even terms occur only on even indices and odd terms only on odd indices, respectively]
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(definec (A235199 n) (cond ((< n 4) n) ((= n 5) 7) ((= n 7) 5) ((= 1 (A010051 n)) (A000040 (A235199 (A000720 n)))) (else (reduce * 1 (map A235199 (ifactor n))))))
CROSSREFS
Composition with A234840 gives A234743 & A234744.
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).
A235487 (swaps 7 & 8, conjugates A000040 back to itself).
A235489 (swaps 8 & 9, conjugates A000040 back to itself).
Sequence in context: A269377 A072026 A332213 * A270426 A270425 A332212
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Jan 04 2014
STATUS
approved