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 A057164 #29 Jan 14 2024 09:00:36 %S A057164 0,1,2,3,4,6,5,7,8,9,14,11,16,19,10,15,12,17,20,13,18,21,22,23,37,28, %T A057164 42,51,25,39,30,44,53,33,47,56,60,24,38,29,43,52,26,40,31,45,54,34,48, %U A057164 57,61,27,41,32,46,55,35,49,58,62,36,50,59,63,64,65,107,79,121,149,70 %N A057164 Self-inverse permutation of natural numbers induced by reflections of the rooted plane trees and mountain ranges encoded by A014486. %C A057164 CatalanRankGlobal given in A057117 and the other Maple procedures in A056539. %C A057164 Composition with A057163 gives Donaghey's Map M (A057505/A057506). %H A057164 Rémy Sigrist, <a href="/A057164/b057164.txt">Table of n, a(n) for n = 0..6917</a> (first 197 terms from Indranil Ghosh) %H A057164 Antti Karttunen, <a href="http://www.iki.fi/~kartturi/matikka/Nekomorphisms/gatomorf.htm">Gatomorphisms</a> (includes the complete Scheme program for computing this sequence). %H A057164 Antti Karttunen, <a href="/A089408/a089408.c.txt">C program which implements this Catalan bijection</a>. %H A057164 Indranil Ghosh, <a href="/A057164/a057164_1.txt">Python program for computing the sequence</a>. %H A057164 Rémy Sigrist, <a href="/A057164/a057164.gp.txt">PARI program</a>. %H A057164 <a href="/index/Per#IntegerPermutationCatAuto">Index entries for signature-permutations induced by Catalan automorphisms</a> %F A057164 a(n) = A080300(A036044(A014486(n))) = A080300(A056539(A014486(n))). %e A057164 a(10)=14 and a(14)=10, A014486[10] = 172 (10101100 in binary), A014486[14] = 202 (11001010 in binary) and these encode the following mountain ranges (and the corresponding rooted plane trees), which are reflections of each other: %e A057164 ...../\___________/\ %e A057164 /\/\/__\_________/__\/\/\ %e A057164 ... %e A057164 ...../...........\ %e A057164 ..\|/.............\|/ %p A057164 a(n) = CatalanRankGlobal(runcounts2binexp(reverse(binexp2runcounts(A014486[n])))) # i.e., reverse and complement the totally balanced binary sequences %o A057164 (Scheme function implementing this automorphism on list-structures:) (define (DeepRev lista) (cond ((not (pair? lista)) lista) ((null? (cdr lista)) (cons (DeepRev (car lista)) (list))) (else (append (DeepRev (cdr lista)) (DeepRev (cons (car lista) (list))))))) %o A057164 (PARI) See Links section. %Y A057164 A057123(A057163(n)) = A057164(A057123(n)) for all n. Also the car/cdr-flipped conjugate of A069787, i.e., A057164(n) = A057163(A069787(A057163(n))). Fixed terms are given by A061856. Cf. also A057508, A069772. %Y A057164 Row 2 of tables A122287 and A122288. %K A057164 nonn %O A057164 0,3 %A A057164 _Antti Karttunen_, Aug 18 2000