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 A057506 #39 Jun 23 2017 08:58:01 %S A057506 0,1,3,2,8,6,7,5,4,22,19,20,15,14,21,16,18,13,11,17,12,10,9,64,60,61, %T A057506 52,51,62,53,55,41,39,54,40,38,37,63,56,57,43,42,59,47,50,36,33,48,34, %U A057506 29,28,58,44,49,35,30,46,32,27,25,45,31,26,24,23,196,191,192,178,177 %N A057506 Signature-permutation of a Catalan Automorphism: (inverse of) "Donaghey's map M", acting on the parenthesizations encoded by A014486. %C A057506 This is inverse of A057505, which is a signature permutation of Catalan automorphism (bijection) known as "Donaghey's map M". See A057505 for more comments, links and references. %H A057506 Antti Karttunen, <a href="/A057506/b057506.txt">Table of n, a(n) for n = 0..23713</a> %H A057506 A. Karttunen (et al) at OEIS Wiki, <a href="https://oeis.org/wiki/Source_code_for_Catalan_ranking_and_unranking_functions#Implementation_in_Maple">Maple implementations of CatalanRankGlobal, CatalanSequences, car, cdr, binexp2pars and pars2binexp functions</a> %H A057506 A. Karttunen at OEIS WIki, <a href="https://oeis.org/wiki/Source_code_for_Catalan_ranking_and_unranking_functions#Implementation_in_Scheme_for_S-expressions">Scheme implementations of CatalanRankSexp and CatalanUnrankSexp</a> %H A057506 Indranil Ghosh, <a href="/A057506/a057506.txt">Python program for computing this sequence</a> (after the functions mentioned in the OEIS wiki) %H A057506 <a href="/index/Per#IntegerPermutationCatAuto">Index entries for signature-permutations of Catalan automorphisms</a> %F A057506 a(n) = A057163(A057164(n)). %F A057506 a(n) = A057163(A057505(A057163(n))) = A057164(A057505(A057164(n))). %p A057506 map(CatalanRankGlobal,map(DonagheysA057506,CatalanSequences(196))); # Where CatalanSequences(n) gives the terms A014486(0..n). %p A057506 DonagheysA057506 := n -> pars2binexp(deepreverse(DonagheysA057505(deepreverse(binexp2pars(n))))); %p A057506 DonagheysA057505 := h -> `if`((0 = nops(h)), h, [op(DonagheysA057505(car(h))), DonagheysA057505(cdr(h))]); %p A057506 # The following corresponds to automorphism A057164: %p A057506 deepreverse := proc(a) if 0 = nops(a) or list <> whattype(a) then (a) else [op(deepreverse(cdr(a))), deepreverse(a[1])]; fi; end; %p A057506 # The rest of required Maple-functions: see the given OEIS Wiki page. %o A057506 (Scheme) %o A057506 (define (A057506 n) (CatalanRankSexp (*A057506 (CatalanUnrankSexp n)))) %o A057506 (define (*A057506 bt) (let loop ((lt bt) (nt (list))) (cond ((not (pair? lt)) nt) (else (loop (cdr lt) (cons nt (*A057506 (car lt)))))))) %o A057506 ;; Functions CatalanRankSexp and CatalanUnrankSexp can be found at OEIS Wiki page. %Y A057506 Inverse: A057505. %Y A057506 Cf. A057161, A057162, A057163, A057164, A057501, A057502, A057503, A057504 (for similar signature permutations of simple Catalan automorphisms). %Y A057506 Cf. A057507 (cycle counts). %Y A057506 The 2nd, 3rd, 4th, 5th and 6th "powers" of this permutation: A071662, A071664, A071666, A071668, A071670. %Y A057506 Row 12 of table A122287. %Y A057506 Cf. also A014486, A080300, A080069, A080070. %K A057506 nonn,look %O A057506 0,3 %A A057506 _Antti Karttunen_, Sep 03 2000 %E A057506 Entry revised by _Antti Karttunen_, May 30 2017