Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A057502
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A057502 Permutation of natural numbers: rotations of non-crossing handshakes encoded by A014486. (to opposite direction of A057501). +0
29
0, 1, 3, 2, 7, 6, 8, 4, 5, 17, 16, 18, 14, 15, 20, 19, 21, 9, 10, 22, 11, 12, 13, 45, 44, 46, 42, 43, 48, 47, 49, 37, 38, 50, 39, 40, 41, 54, 53, 55, 51, 52, 57, 56, 58, 23, 24, 59, 25, 26, 27, 61, 60, 62, 28, 29, 63, 30, 31, 32, 64, 33, 34, 35, 36, 129, 128, 130, 126, 127 (list; graph; listen)
OFFSET

0,3

COMMENT

In A057501 and A057502, the cycles between A014138[n-1]+1-th and A014138[n]th term partition A000108[n] objects encoded by the corresponding terms of A014486 into A002995[n+1] equivalence classes of planar trees, thus the latter sequence can be produced also with Maple procedure RotHandshakesPermutationCycleCounts given below.

LINKS

Index entries for sequences that are permutations of the natural numbers

A. Karttunen, Gatomorphisms (Includes the complete Scheme program for computing this sequence)

MAPLE

map(CatalanRankGlobal, map(RotateHandshakesR, A014486));

RotateHandshakesR := n -> pars2binexp(deepreverse(RotateHandshakesP(deepreverse(binexp2pars(n)))));

deepreverse := proc(a) if 0 = nops(a) or list <> whattype(a) then (a) else [op(deepreverse(cdr(a))), deepreverse(a[1])]; fi; end;

with(group); CountCycles := b -> (nops(convert(b, 'disjcyc')) + (nops(b)-convert(map(nops, convert(b, 'disjcyc')), `+`)));

RotHandshakesPermutationCycleCounts := proc(upto_n) local u, n, a, r, b; a := []; for n from 0 to upto_n do b := []; u := (binomial(2*n, n)/(n+1)); for r from 0 to u-1 do b := [op(b), 1+CatalanRank(n, RotateHandshakes(CatalanUnrank(n, r)))]; od; a := [op(a), CountCycles(b)]; od; RETURN(a); end;

# For other procedures, follow A057501.

PROGRAM

(Scheme function implementing this automorphism on list-structures:) (define (RotateHandshakesInv! s) (cond ((not (pair? s))) ((not (pair? (cdr s))) (swap! s)) (else (RotateHandshakesInv! (cdr s)) (robl! s))) s)

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

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

CROSSREFS

Inverse of A057501 and the car/cdr-flipped conjugate of A069774, i.e. A057502(n) = A057163(A069774(A057163(n))). Cf. also A057507, A057510, A057513, A069771, A069772.

Sequence in context: A139285 A080398 A082321 this_sequence A071656 A130963 A130930

Adjacent sequences: A057499 A057500 A057501 this_sequence A057503 A057504 A057505

KEYWORD

nonn

AUTHOR

Antti Karttunen Sep 03 2000

page 1

Search completed in 0.003 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 November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research