This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A074680 #9 Jul 09 2025 01:42:47 %S A074680 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 A074680 49,50,54,55,57,58,59,61,62,63,64,23,24,25,26,27,28,29,30,31,32,33,34, %U A074680 35,36,37,38,39,40,41,42,43,44,47,51,52,53,56,60,129,130,132,133,134 %N A074680 Signature permutation of the seventeenth nonrecursive Catalan automorphism in table A089840. (Rotate binary tree right if possible, otherwise swap its sides.) %C A074680 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 A074680 A...B..............B...C %C A074680 .\./................\./ %C A074680 ..x...C..-->.....A...x................()..B.......B..() %C A074680 ...\./............\./..................\./...-->...\./. %C A074680 ....x..............x....................x...........x.. %C A074680 ((a . b) . c) -> (a . (b . c)) ____ (() . b) --> (b . ()) %C A074680 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. %C A074680 See also the comments at A074679. %D A074680 A. Karttunen, paper in preparation, draft available by e-mail. %H A074680 A. Karttunen, <a href="/A074680/b074680.txt">Table of n, a(n) for n = 0..2055</a> %H A074680 A. Karttunen, <a href="/A089840/a089840p.txt">Prolog-program which illustrates the construction of this and similar nonrecursive Catalan automorphisms.</a> %H A074680 <a href="/index/Per#IntegerPermutationCatAuto">Index entries for signature-permutations of Catalan automorphisms</a> %o A074680 (Scheme implementations of this automorphism. These act on S-expressions, i.e. list-structures:) %o A074680 (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 A074680 (DESTRUCTIVE VERSION:) (define (*A074680! s) (cond ((pair? s) (cond ((pair? (car s)) (robr! s)) (else (swap! s))))) s) %o A074680 (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 A074680 (define (swap! s) (let ((ex-car (car s))) (set-car! s (cdr s)) (set-cdr! s ex-car) s)) %Y A074680 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 A074680 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 A074680 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 A074680 nonn %O A074680 0,3 %A A074680 _Antti Karttunen_, Sep 11 2002 %E A074680 Description clarified Oct 10 2006