Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A072796
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A072796 Self-inverse permutation of natural numbers induced by the gatomorphism gmA072796! acting on the parenthesizations encoded by A014486. +0
49
0, 1, 2, 3, 4, 6, 5, 7, 8, 9, 10, 14, 16, 19, 11, 15, 12, 17, 18, 13, 20, 21, 22, 23, 24, 25, 26, 27, 37, 38, 42, 44, 47, 51, 53, 56, 60, 28, 29, 39, 43, 52, 30, 40, 31, 45, 46, 32, 48, 49, 50, 33, 41, 34, 54, 55, 35, 57, 58, 59, 36, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 (list; graph; listen)
OFFSET

0,3

COMMENT

This gatomorphism swaps the two leftmost branches of the general plane trees if the degree of the root > 1, and keeps the tree intact if it is planted (root's degree = 1). Together with the gatomorphism A069770 it is used to recursively compose the whole infinite sequence of gatomorphisms of simple type B given in the array A073200.

LINKS

A. Karttunen, Table of n, a(n) for n = 0..196

A. Karttunen, Gatomorphisms (with the complete Scheme source)

Index entries for sequences that are permutations of the natural numbers

PROGRAM

(Scheme function implementing this automorphism on list-structures, first the constructive variant:)

(define (gmA072796 s) (cond ((not (pair? s)) s) ((not (pair? (cdr s))) s) (else (cons (cadr s) (cons (car s) (cddr s))))))

(THEN the destructive variant:)

(define (gmA072796! s) (cond ((not (pair? s)) s) ((not (pair? (cdr s))) s) (else (swap! s) (robr! s) (swap! (cdr s)) 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))

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

CROSSREFS

Row 2 of A089840.

The car/cdr-flipped conjugate of A072797, i.e. A072796(n) = A057163(A072797(A057163(n))). Occurs for first time in A073200 as row 1. Fixed point counts and cycle counts are given in A073190 and A073191.

Sequence in context: A130340 A130339 A058812 this_sequence A130374 A122363 A122364

Adjacent sequences: A072793 A072794 A072795 this_sequence A072797 A072798 A072799

KEYWORD

nonn

AUTHOR

Antti Karttunen Jun 12 2002

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 July 26 13:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research