login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A127300
Signature-permutation of A057164-conjugate of the inverse of Elizalde's and Deutsch's 2003 bijection for Dyck paths.
5
0, 1, 3, 2, 8, 4, 7, 6, 5, 22, 11, 17, 16, 12, 21, 9, 20, 19, 10, 18, 14, 13, 15, 64, 33, 48, 47, 34, 58, 23, 57, 56, 24, 49, 37, 35, 38, 63, 30, 45, 44, 31, 62, 28, 61, 60, 29, 46, 42, 32, 43, 59, 25, 54, 53, 26, 50, 39, 36, 40, 55, 51, 27, 52, 41, 196, 102, 145, 144, 103
OFFSET
0,3
COMMENTS
Used to construct the inverse for A127291.
REFERENCES
Emeric Deutsch and Sergi Elizalde, A simple and unusual bijection for Dyck paths and its consequences, Annals of Combinatorics, 7 (2003), no. 3, 281-297.
PROG
(MIT/GNU Scheme)
(define (A127300 n) (A080300 (transpos-list->A014486 (A127300-aux1 (A014486 n)))))
(define (transpos-list->A014486 tplist) (fold-left (lambda (s p) (+ s (expt 2 (max (car p) (cdr p))))) 0 tplist))
(define (a127300-aux1 n) (if (zero? n) (list) (let loop ((n n) (tplist1 (list)) (tplist2 (list)) (i 0) (j (A000523 n)) (b 1)) (cond ((zero? n) (append tplist1 tplist2)) ((even? n) (loop (/ n 2) tplist2 (cons (cons '() i) tplist1) j (+ i b) (- b))) ((assq '() tplist1) => (lambda (p) (set-car! p i) (loop (/ (- n 1) 2) tplist2 tplist1 j (+ i b) (- b)))) ((rassq '() tplist2) => (lambda (p) (set-car! p i) (loop (/ (- n 1) 2) tplist2 tplist1 j (+ i b) (- b)))) (else (error "n not in A014486!")))))) ;; Returns a list of non-crossing transpositions.
(define (rassq key al) (let loop ((al al) (last-found #f)) (cond ((null? al) last-found) ((eq? (caar al) key) (loop (cdr al) (car al))) (else (loop (cdr al) last-found))))) ;; (rassq key al) is essentially the same as: (assq key (reverse al))
CROSSREFS
Inverse: A127299. a(n) = A057164(A127292(A057164(n))) = A127290(A057164(n)). Cf. A014486.
Sequence in context: A143515 A082333 A162728 * A129199 A211164 A097018
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 16 2007
STATUS
approved