Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A089851
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A089851 Permutation of natural numbers induced by the Catalan automorphism gma089851 acting on the binary trees/parenthesizations encoded by A014486/A063171. +0
19
0, 1, 2, 3, 5, 6, 4, 7, 8, 12, 13, 15, 16, 19, 11, 14, 9, 17, 18, 10, 20, 21, 22, 31, 32, 34, 35, 36, 40, 41, 43, 44, 47, 52, 53, 56, 60, 30, 33, 39, 42, 51, 28, 37, 23, 45, 46, 24, 48, 49, 50, 29, 38, 25, 54, 55, 26, 57, 58, 59, 27, 61, 62, 63, 64, 87, 88, 90, 91, 92, 96, 97, 99 (list; graph; listen)
OFFSET

0,3

COMMENT

This "gatomorphism" rotates car, cadr and cddr of an S-exp as (a . (b . c)) -> (b . (c . a)) if its length > 1, otherwise keeps it intact.

LINKS

A. Karttunen, C-program for computing this sequence

Index entries for signature-permutations induced by Catalan automorphisms

PROGRAM

(Scheme functions implementing this automorphism on list-structures:)

(define (gma089851! s) (cond ((not (pair? s)) s) ((not (pair? (cdr s))) s) (else (swap! s) (robr! s) s)))

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

(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))

CROSSREFS

Inverse of A089853. a(n) = A089850(A072796(n)) = A057163(A089857(A057163(n))). Row 4 of A089840.

Number of cycles: A089847. Number of fixed-points: A089848. (In range [A014137(n-1)..A014138(n-1)] of this permutation, possibly shifted one term left or right).

Sequence in context: A130381 A130948 A122343 this_sequence A122310 A122305 A131143

Adjacent sequences: A089848 A089849 A089850 this_sequence A089852 A089853 A089854

KEYWORD

nonn

AUTHOR

Antti Karttunen (Firstname.Surname(AT)iki.fi), Nov 29 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 18 21:37 EST 2009. Contains 171024 sequences.


AT&T Labs Research