This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A074680 Signature permutation of the seventeenth nonrecursive Catalan automorphism in table A089840. (Rotate binary tree right if possible, otherwise swap its sides.) 33

%I

%S 0,1,3,2,7,8,4,5,6,17,18,20,21,22,9,10,11,12,13,14,15,16,19,45,46,48,

%T 49,50,54,55,57,58,59,61,62,63,64,23,24,25,26,27,28,29,30,31,32,33,34,

%U 35,36,37,38,39,40,41,42,43,44,47,51,52,53,56,60,129,130,132,133,134

%N Signature permutation of the seventeenth nonrecursive Catalan automorphism in table A089840. (Rotate binary tree right if possible, otherwise swap its sides.)

%C This automorphism effects the following transformation on the unlabeled rooted plane binary trees (letters A, B, C refer to arbitrary subtrees located on those nodes and () stands for an implied terminal node.)

%C A...B..............B...C

%C .\./................\./

%C ..x...C..-->.....A...x................()..B.......B..()

%C ...\./............\./..................\./...-->...\./.

%C ....x..............x....................x...........x..

%C ((a . b) . c) -> (a . (b . c)) ____ (() . b) --> (b . ())

%C That is, we rotate the binary tree right, in case it is possible and otherwise (if the left hand side of a tree is a terminal node) swap the right and left subtree (so that the terminal node ends to the right hand side), i.e. apply the automorphism *A069770. Look at the example in A069770 to see how this will produce the given sequence of integers.

%D A. Karttunen, paper in preparation, draft available by e-mail.

%H A. Karttunen, <a href="/A074680/b074680.txt">Table of n, a(n) for n = 0..2055</a>

%H A. Karttunen, <a href="/A089840/a089840p.txt">Prolog-program which illustrates the construction of this and similar nonrecursive Catalan automorphisms.</a>

%H <a href="/index/Per#IntegerPermutationCatAuto">Index entries for signature-permutations of Catalan automorphisms</a>

%o (Scheme implementations of this automorphism. These act on S-expressions, i.e. list-structures:)

%o (CONSTRUCTIVE VERSION:) (define (*A074680 s) (cond ((not (pair? s)) s) ((pair? (car s)) (cons (caar s) (cons (cdar s) (cdr s)))) (else (cons (cdr s) (car s)))))

%o (DESTRUCTIVE VERSION:) (define (*A074680! s) (cond ((pair? s) (cond ((pair? (car s)) (robr! s)) (else (swap! s))))) s)

%o (define (robr! s) (let ((ex-cdr (cdr s))) (set-cdr! s (caar s)) (set-car! (car s) ex-cdr) (swap! (car s)) (swap! s) s))

%o (define (swap! s) (let ((ex-car (car s))) (set-car! s (cdr s)) (set-cdr! s ex-car) s))

%Y This automorphism has several variants, where the first clause is same (rotate binary tree to the right, if possible), but something else is done (than just swapping sides), in case the left hand side is empty: A082336, A082350, A123500, A123696. The following automorphisms can be derived recursively from this one: A057501, A074682, A074684, A074686, A074688, A074689, A089866, A120705, A122322, A122331. See also somewhat similar ones: A069774, A071659, A071655, A071657, A072090, A072094, A072092.

%Y Inverse: A074679. Row 17 of A089840. Occurs also in A073200 as row 2156396687 as a(n) = A072796(A073280(A073282(n))). a(n) = A083927(A123497(A057123(n))).

%Y Number of cycles: LEFT(A001683). Number of fixed points: LEFT(A019590). Max. cycle size & LCM of all cycle sizes: A089410 (in range [A014137(n-1)..A014138(n-1)] of this permutation).

%K nonn

%O 0,3

%A _Antti Karttunen_, Sep 11 2002, description clarified Oct 10 2006.

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 9 08:20 EST 2019. Contains 329877 sequences. (Running on oeis4.)