cp's OEIS Frontend

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.

Showing 1-10 of 14 results. Next

A057505 Signature-permutation of a Catalan Automorphism: Donaghey's map M acting on the parenthesizations encoded by A014486.

Original entry on oeis.org

0, 1, 3, 2, 8, 7, 5, 6, 4, 22, 21, 18, 20, 17, 13, 12, 15, 19, 16, 10, 11, 14, 9, 64, 63, 59, 62, 58, 50, 49, 55, 61, 57, 46, 48, 54, 45, 36, 35, 32, 34, 31, 41, 40, 52, 60, 56, 43, 47, 53, 44, 27, 26, 29, 33, 30, 38, 39, 51, 42, 24, 25, 28, 37, 23, 196, 195, 190, 194, 189
Offset: 0

Views

Author

Antti Karttunen, Sep 03 2000

Keywords

Comments

This is equivalent to map M given by Donaghey on page 81 of his paper "Automorphisms on ..." and also equivalent to the transformation procedure depicted in the picture (23) of Donaghey-Shapiro paper.
This can be also considered as a "more recursive" variant of A057501 or A057503 or A057161.

References

  • D. E. Knuth, The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees--History of Combinatorial Generation, vi+120pp. ISBN 0-321-33570-8 Addison-Wesley Professional; 1ST edition (Feb 06, 2006).

Crossrefs

Inverse: A057506.
The 2nd, 3rd, 4th, 5th and 6th "power": A071661, A071663, A071665, A071667, A071669.
Other related permutations: A057501, A057503, A057161.
Cycle counts: A057507. Maximum cycle lengths: A057545. LCM's of all cycles: A060114. See A057501 for other Maple procedures.
Row 17 of table A122288.
Cf. A080981 (the "primitive elements" of this automorphism), A079438, A079440, A079442, A079444, A080967, A080968, A080972, A080272, A080292, A083929, A080973, A081164, A123050, A125977, A126312.

Programs

  • Maple
    map(CatalanRankGlobal,map(DonagheysM, A014486)); or map(CatalanRankGlobal,map(DeepRotateTriangularization, A014486));
    DonagheysM := n -> pars2binexp(DonagheysMP(binexp2pars(n)));
    DonagheysMP := h -> `if`((0 = nops(h)),h,[op(DonagheysMP(car(h))),DonagheysMP(cdr(h))]);
    DeepRotateTriangularization := proc(nn) local n,s,z,w; n := binrev(nn); z := 0; w := 0; while(1 = (n mod 2)) do s := DeepRotateTriangularization(BinTreeRightBranch(n))*2; z := z + (2^w)*s; w := w + binwidth(s); z := z + (2^w); w := w + 1; n := floor(n/2); od; RETURN(z); end;

Formula

a(0) = 0, and for n>=1, a(n) = A085201(a(A072771(n)), A057548(a(A072772(n)))). [This recurrence reflects the S-expression implementation given first in the Program section: A085201 is a 2-ary function corresponding to 'append', A072771 and A072772 correspond to 'car' and 'cdr' (known also as first/rest or head/tail in some languages), and A057548 corresponds to unary form of function 'list'].
As a composition of related permutations:
a(n) = A057164(A057163(n)).
a(n) = A057163(A057506(A057163(n))).

A057501 Signature-permutation of a Catalan Automorphism: Rotate non-crossing chords (handshake) arrangements; rotate the root position of general trees as encoded by A014486.

Original entry on oeis.org

0, 1, 3, 2, 7, 8, 5, 4, 6, 17, 18, 20, 21, 22, 12, 13, 10, 9, 11, 15, 14, 16, 19, 45, 46, 48, 49, 50, 54, 55, 57, 58, 59, 61, 62, 63, 64, 31, 32, 34, 35, 36, 26, 27, 24, 23, 25, 29, 28, 30, 33, 40, 41, 38, 37, 39, 43, 42, 44, 47, 52, 51, 53, 56, 60, 129, 130, 132, 133, 134
Offset: 0

Views

Author

Antti Karttunen, Sep 03 2000; entry revised Jun 06 2014

Keywords

Comments

This is a permutation of natural numbers induced when "noncrossing handshakes", i.e., Stanley's interpretation (n), "n nonintersecting chords joining 2n points on the circumference of a circle", are rotated.
The same permutation is induced when the root position of plane trees (Stanley's interpretation (e)) is successively changed around the vertices.
For a good illustration how the rotation of the root vertex works, please see the Figure 6, "Rotation of an ordered rooted tree" in Torsten Mütze's paper (on page 24 in 20 May 2014 revision).
For yet another application of this permutation, please see the attached notes for A085197.
By "recursivizing" either the left or right hand side argument of A085201 in the formula, one ends either with A057161 or A057503. By "recursivizing" the both sides, one ends with A057505. - Antti Karttunen, Jun 06 2014

Crossrefs

Inverse: A057502.
Also, a "SPINE"-transform of A074680, and thus occurs as row 17 of A122203. (Also as row 65167 of A130403.)
Successive powers of this permutation, a^2(n) - a^6(n): A082315, A082317, A082319, A082321, A082323.
Cf. also A057548, A072771, A072772, A085201, A002995 (cycle counts), A057543 (max cycle lengths), A085197, A129599, A057517, A064638, A064640.

Programs

  • Maple
    map(CatalanRankGlobal,map(RotateHandshakes, A014486));
    RotateHandshakes := n -> pars2binexp(RotateHandshakesP(binexp2pars(n)));
    RotateHandshakesP := h -> `if`((0 = nops(h)),h,[op(car(h)),cdr(h)]); # This does the trick! In Lisp: (defun RotateHandshakesP (h) (append (car h) (list (cdr h))))
    car := proc(a) if 0 = nops(a) then ([]) else (op(1,a)): fi: end: # The name is from Lisp, takes the first element (head) of the list.
    cdr := proc(a) if 0 = nops(a) then ([]) else (a[2..nops(a)]): fi: end: # As well. Takes the rest (the tail) of the list.
    PeelNextBalSubSeq := proc(nn) local n,z,c; if(0 = nn) then RETURN(0); fi; n := nn; c := 0; z := 0; while(1 = 1) do z := 2*z + (n mod 2); c := c + (-1)^n; n := floor(n/2); if(c >= 0) then RETURN((z - 2^(floor_log_2(z)))/2); fi; od; end;
    RestBalSubSeq := proc(nn) local n,z,c; n := nn; c := 0; while(1 = 1) do c := c + (-1)^n; n := floor(n/2); if(c >= 0) then break; fi; od; z := 0; c := -1; while(1 = 1) do z := 2*z + (n mod 2); c := c + (-1)^n; n := floor(n/2); if(c >= 0) then RETURN(z/2); fi; od; end;
    pars2binexp := proc(p) local e,s,w,x; if(0 = nops(p)) then RETURN(0); fi; e := 0; for s in p do x := pars2binexp(s); w := floor_log_2(x); e := e * 2^(w+3) + 2^(w+2) + 2*x; od; RETURN(e); end;
    binexp2pars := proc(n) option remember; `if`((0 = n),[],binexp2parsR(binrev(n))); end;
    binexp2parsR := n -> [binexp2pars(PeelNextBalSubSeq(n)),op(binexp2pars(RestBalSubSeq(n)))];
    # Procedure CatalanRankGlobal given in A057117, other missing ones in A038776.

Formula

a(0) = 0, and for n>=1, a(n) = A085201(A072771(n), A057548(A072772(n))). [This formula reflects directly the given non-destructive Lisp/Scheme function: A085201 is a 2-ary function corresponding to 'append', A072771 and A072772 correspond to 'car' and 'cdr' (known also as first/rest or head/tail in some dialects), and A057548 corresponds to unary form of function 'list'].
As a composition of related permutations:
a(n) = A057509(A069770(n)).
a(n) = A057163(A069773(A057163(n))).
Invariance-identities:
A129599(a(n)) = A129599(n) holds for all n.

A057161 Signature-permutation of a Catalan Automorphism: rotate one step counterclockwise the triangulations of polygons encoded by A014486.

Original entry on oeis.org

0, 1, 3, 2, 7, 8, 5, 6, 4, 17, 18, 20, 21, 22, 12, 13, 15, 16, 19, 10, 11, 14, 9, 45, 46, 48, 49, 50, 54, 55, 57, 58, 59, 61, 62, 63, 64, 31, 32, 34, 35, 36, 40, 41, 43, 44, 47, 52, 53, 56, 60, 26, 27, 29, 30, 33, 38, 39, 42, 51, 24, 25, 28, 37, 23, 129, 130, 132, 133, 134
Offset: 0

Views

Author

Antti Karttunen, Aug 18 2000; entry revised Jun 06 2014

Keywords

Comments

This is a permutation of natural numbers induced when Euler's triangulation of convex polygons, encoded by the sequence A014486 in a straightforward way (via binary trees, cf. the illustration of the rotation of a triangulated pentagon, given in the Links section) are rotated counterclockwise.
The number of cycles in range [A014137(n-1)..A014138(n)] of this permutation is given by A001683(n+2), otherwise the same sequence as for Catalan bijections *A074679/*A074680, but shifted once left (for an explanation, see the related notes in OEIS Wiki).
E.g., in range [A014137(0)..A014138(1)] = [1,1] there is one cycle (as a(1)=1), in range [A014137(1)..A014138(2)] = [2,3] there is one cycle (as a(2)=3 and a(3)=2), in range [A014137(2)..A014138(3)] = [4,8] there is also one cycle (as a(4) = 7, a(7) = 6, a(6) = 5, a(5) = 8 and a(8) = 4), and in range [A014137(3)..A014138(4)] = [9,22] there are A001683(4+2) = 4 cycles.
From the recursive forms of A057161 and A057503 it is seen that both can be viewed as a convergent limits of a process where either the left or right side argument of A085201 in formula for A057501 is "iteratively recursivized", and on the other hand, both of these can then in turn be made to converge towards A057505 by the same method, when the other side of the formula is also "recursivized".

Crossrefs

Inverse: A057162.
Also, a "SPINE"-transform of A069774, and thus occurs as row 12 of A130403.
Other related permutations: A057163, A057164, A057501, A057504, A057505.
Cf. A001683 (cycle counts), A057544 (max cycle lengths).

Programs

  • Maple
    a(n) = CatalanRankGlobal(RotateTriangularization(A014486[n]))
    CatalanRankGlobal given in A057117 and the other Maple procedures in A038776.
    NextSubBinTree := proc(nn) local n,z,c; n := nn; c := 0; z := 0; while(c < 1) do z := 2*z + (n mod 2); c := c + (-1)^n; n := floor(n/2); od; RETURN(z); end;
    BinTreeLeftBranch := n -> NextSubBinTree(floor(n/2));
    BinTreeRightBranch := n -> NextSubBinTree(floor(n/(2^(1+binwidth(BinTreeLeftBranch(n))))));
    RotateTriangularization := proc(nn) local n,s,z,w; n := binrev(nn); z := 0; w := 0; while(1 = (n mod 2)) do s := BinTreeRightBranch(n); z := z + (2^w)*s; w := w + binwidth(s); z := z + (2^w); w := w + 1; n := floor(n/2); od; RETURN(z); end;

Formula

a(0) = 0, and for n>=1, a(n) = A085201(a(A072771(n)), A057548(A072772(n))). [This formula reflects the S-expression implementation given first in the Program section: A085201 is a 2-ary function corresponding to 'append', A072771 and A072772 correspond to 'car' and 'cdr' (known also as first/rest or head/tail in some languages), and A057548 corresponds to unary form of function 'list'.]
As a composition of related permutations:
a(n) = A069767(A069769(n)).
a(n) = A057163(A057162(A057163(n))).
a(n) = A057164(A057504(A057164(n))). [For a proof, see pp. 53-54 in the "Introductory survey ..." draft]

A072764 Tabular N X N -> N bijection induced by Lisp/Scheme function 'cons' combining the two planar binary trees/general trees/parenthesizations encoded by A014486(X) and A014486(Y).

Original entry on oeis.org

0, 1, 3, 2, 7, 6, 4, 8, 16, 14, 5, 17, 19, 42, 15, 9, 18, 44, 51, 43, 37, 10, 20, 47, 126, 52, 121, 38, 11, 21, 53, 135, 127, 149, 122, 39, 12, 22, 56, 154, 136, 385, 150, 123, 40, 13, 45, 60, 163, 155, 413, 386, 151, 124, 41, 23, 46, 128, 177, 164, 475, 414, 387, 152
Offset: 0

Views

Author

Antti Karttunen Jun 12 2002

Keywords

Crossrefs

Inverse permutation: A072765. a(n) = A069770(A072766(n)). Also transpose of A072766, i.e. a(n) = A072766(A038722(n)). The upper triangular region: A072773. Projection functions are A072771 ('car') & A072772 ('cdr'). The sizes of the corresponding Catalan structures: A072768. The first row: A057548, the first column: A072795, diagonal: A083938. Cf. also A080300, A025581, A002262.

Extensions

a(0)=0 prepended by Sean A. Irvine, Oct 25 2024

A085201 Array A(x,y): Position of the concatenation of binary strings A014486(x) & A014486(y) in A014486, listed antidiagonalwise as A(0,0), A(1,0), A(0,1), A(2,0), A(1,1), A(0,2), ...

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 4, 4, 3, 4, 6, 9, 5, 4, 5, 9, 14, 10, 9, 5, 6, 11, 23, 15, 23, 10, 6, 7, 14, 28, 24, 37, 24, 11, 7, 8, 16, 37, 29, 65, 38, 25, 12, 8, 9, 19, 42, 38, 79, 66, 39, 26, 13, 9, 10, 23, 51, 43, 107, 80, 67, 40, 27, 23, 10, 11, 25, 65, 52, 121, 108, 81, 68, 41, 65, 24, 11
Offset: 0

Views

Author

Antti Karttunen, Jun 23 2003

Keywords

Comments

This table is induced by the 2-ary form of the list-function 'append' present in the programming languages like Lisp, Scheme and Prolog.

Crossrefs

Transpose: A085202. Variant: A085203. Row 1: A085223, Column 1: A072795.

Formula

a(0, y)=y, a(x, y) = A072764bi(A072771(x), a(A072772(x), y))
a(x, y) = A080300(A085207bi(A014486(x), A014486(y))) = A085200(A085215bi(A071155(y), A071155(x)))

A085203 Array A(x,y): Position of the totally balanced binary string obtained by concatenating the binary strings A014486(x) & A014486(y) in such a way that the latter is inserted after the least significant 1-bit of the former, followed by the remaining 0-bits, if any. Listed antidiagonalwise as A(0,0), A(1,0), A(0,1), A(2,0), A(1,1), A(0,2), ...

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 3, 5, 7, 3, 4, 8, 12, 8, 4, 5, 10, 21, 13, 17, 5, 6, 13, 26, 22, 31, 18, 6, 7, 15, 35, 27, 58, 32, 20, 7, 8, 18, 40, 36, 73, 59, 34, 21, 8, 9, 22, 49, 41, 100, 74, 62, 35, 22, 9, 10, 24, 63, 50, 115, 101, 76, 63, 36, 45, 10, 11, 27, 68, 64, 142, 116, 104, 77, 64, 87, 46
Offset: 0

Views

Author

Antti Karttunen, Jun 23 2003

Keywords

Comments

This table is induced by the list-function 'app-to-xrt' whose Scheme-definition is given below, in the same way as A085201 is induced by the ordinary 'append'-function.

Crossrefs

Transpose: A085204. Variant: A085201. Row 1: A085225, Column 1: A057548.

Formula

a(0, y) = y, a(x, y) = A057548(a(A072771(x), y)) if A072772(x)=0, otherwise A072764bi(A072771(x), a(A072772(x), y)).
a(x, y) = A080300(A085211bi(A014486(x), A014486(y))) = A085200(A085219bi(A071155(y), A071155(x))).

A057503 Signature-permutation of a Catalan Automorphism: Deutsch's 1998 bijection on Dyck paths.

Original entry on oeis.org

0, 1, 3, 2, 8, 7, 5, 4, 6, 22, 21, 18, 17, 20, 13, 12, 10, 9, 11, 15, 14, 16, 19, 64, 63, 59, 58, 62, 50, 49, 46, 45, 48, 55, 54, 57, 61, 36, 35, 32, 31, 34, 27, 26, 24, 23, 25, 29, 28, 30, 33, 41, 40, 38, 37, 39, 43, 42, 44, 47, 52, 51, 53, 56, 60, 196, 195, 190, 189, 194
Offset: 0

Views

Author

Antti Karttunen, Sep 03 2000

Keywords

Comments

Deutsch shows in his 1998 paper that this automorphism maps the number of returns of Dyck path to the height of the last peak, i.e., that A057515(n) = A080237(A057503(n)) holds for all n, thus the two parameters have the same distribution.
From the recursive forms of A057161 and A057503 it is seen that both can be viewed as a convergent limits of a process where either the left or right side argument of A085201 in formula for A057501 is "iteratively recursivized", and on the other hand, both of these can then in turn be made to converge towards A057505, when the other side of the formula is also "recursivized" in the same way. - Antti Karttunen, Jun 06 2014

Crossrefs

Inverse: A057504. Row 17 of A122285. Cf. A057501, A057161, A057505.
The number of cycles, count of the fixed points, maximum cycle sizes and LCM's of all cycle sizes in range [A014137(n-1)..A014138(n)] of this permutation are given by LEFT(LEFT(A001683)), LEFT(A019590), A057544 and A057544, the same sequences as for A057162 because this is a conjugate of it (cf. the Formula section).

Formula

a(0) = 0, and for n >= 1, a(n) = A085201(A072771(n), A057548(a(A072772(n)))). [This formula reflects the S-expression implementation given first in the Program section: A085201 is a 2-ary function corresponding to 'append', A072771 and A072772 correspond to 'car' and 'cdr' (known also as first/rest or head/tail in some languages), and A057548 corresponds to the unary form of function 'list'].
a(n) = A057164(A057162(A057164(n))). [For the proof, see pp. 53-54 in the "Introductory survey ..." draft, eq. 144.]
Other identities:
A057515(n) = A080237(a(n)) holds for all n. [See the Comments section.]

Extensions

Equivalence with Emeric Deutsch's 1998 bijection realized Dec 15 2006 and entry edited accordingly by Antti Karttunen, Jan 16 2007

A072766 Transpose of A072764, 'cons' with arguments swapped.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 5, 14, 16, 8, 9, 15, 42, 19, 17, 10, 37, 43, 51, 44, 18, 11, 38, 121, 52, 126, 47, 20, 12, 39, 122, 149, 127, 135, 53, 21, 13, 40, 123, 150, 385, 136, 154, 56, 22, 23, 41, 124, 151, 386, 413, 155, 163, 60, 45, 24, 107, 125, 152, 387, 414, 475, 164
Offset: 0

Views

Author

Antti Karttunen, Jun 12 2002

Keywords

Crossrefs

Inverse permutation: A072767. a(n) = A069770(A072764(n)). Also transpose of A072764, i.e. a(n) = A072764(A038722(n)). Projection functions are A072772 & A072771. The sizes of the corresponding Catalan structures: A072768. The first column: A057548, the first row: A072795. Cf. also A025581, A002262.

Extensions

a(0)=0 prepended by Sean A. Irvine, Oct 25 2024

A083925 Inverse function of N -> N injection A057548.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 0, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 0, 11, 12, 13, 0, 0, 0, 14, 15, 0, 16, 17, 18, 0, 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, May 13 2003

Keywords

Comments

a(1)=0 because A057548(0)=1, but a(n) = 0 also for those n which do not occur as values of A057548. All positive natural numbers occur here once.

Crossrefs

a(A057548(n)) = n for all n. Cf. A083926-A083929, A083935.

Formula

a(n) = A083923(n)*A072771(n).

A072765 Inverse permutation to A072764.

Original entry on oeis.org

0, 1, 3, 2, 6, 10, 5, 4, 7, 15, 21, 28, 36, 45, 9, 14, 8, 11, 16, 12, 22, 29, 37, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 20, 27, 35, 44, 54, 13, 19, 17, 46, 56, 23, 67, 79, 92, 18, 25, 30, 106, 121, 38, 137, 154, 172, 47, 191, 211, 232, 254, 300
Offset: 0

Views

Author

Antti Karttunen, Jun 12 2002

Keywords

Crossrefs

Showing 1-10 of 14 results. Next