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-2 of 2 results.

A089408 Number of fixed points in range [A014137(n-1)..A014138(n-1)] of permutation A089864.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 4, 5, 10, 14, 28, 42, 84, 132, 264, 429, 858, 1430, 2860, 4862, 9724, 16796, 33592, 58786, 117572, 208012, 416024, 742900, 1485800, 2674440, 5348880, 9694845, 19389690, 35357670, 70715340, 129644790, 259289580, 477638700
Offset: 0

Views

Author

Antti Karttunen, Nov 29 2003

Keywords

Comments

The number of n-node binary trees fixed by the corresponding automorphism(s). Essentially A000108 interleaved with A068875.

Crossrefs

Cf. A089402.
Cf. A000108.

Programs

  • Maple
    seq(seq(binomial(2*j,j)/(1+j)*i, i=1..2),j=0..19); # Zerinvary Lajos, Apr 29 2007
  • Mathematica
    a[0] = 1; a[n_] := If[EvenQ[n], 2*CatalanNumber[n/2 - 1], CatalanNumber[(n-1)/2]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 24 2013 *)
  • Python
    from sympy import catalan
    def a(n): return 1 if n==0 else 2*catalan(n//2 - 1) if n%2==0 else catalan((n - 1)//2) # Indranil Ghosh, May 23 2017
  • Scheme
    (define (A089408 n) (cond ((zero? n) 1) ((even? n) (* 2 (A000108 (-1+ (/ n 2))))) (else (A000108 (/ (-1+ n) 2)))))
    

Formula

a(0)=1, a(2n) = 2*A000108(n-1), a(2n+1) = A000108(n)
G.f.: (1+4x-(1+2x)sqrt(1-4x^2))/(2x). - Paul Barry, Apr 11 2005
a(2*j+i) = i*C(2*j,j)/(1+j), i=1..2, j >= 0. - Zerinvary Lajos, Apr 29 2007
D-finite with recurrence: (n+1)*a(n) - 2*a(n-1) + 4(3-n)*a(n-2) = 0. - R. J. Mathar, Dec 17 2011, corrected by Georg Fischer, Feb 13 2020

A089864 Involution of natural numbers induced by the Catalan automorphism gma089864 acting on the binary trees/parenthesizations encoded by A014486/A063171.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 29 2003

Keywords

Comments

This "Catalan bijection" effects the following transformation on the binary trees (labels A,B,C,D refer to arbitrary subtrees located on those nodes and () stands for a terminal node.)
.A..B.C..D.....B..A.D..C.......B...C.......C...B.......A...B........B...A...
..\./.\./.......\./.\./.........\./.........\./.........\./..........\./....
...x...x....-->..x...x.......()..x..-->..()..x...........x..()...-->..x..().
....\./...........\./.........\./.........\./.............\./..........\./..
.....x.............x...........x...........x...............x............x...
i.e. we apply A069770 (that is, the corresponding automorphism) both to the left and right subtree of a binary tree and fix both the empty tree and the tree of one internal node.

Examples

			To obtain this signature permutation, we apply these transformations to the binary trees as encoded and ordered by A014486 and for each n, a(n) will be the position of the tree to which the n-th tree transforms to, as follows:
...................one tree of one internal........2 trees of 2 internal nodes
..empty tree.........(non-leaf) node.................................
........................................................\/.......\/..
......x......................\/........................\/.........\/.
n=....0......................1..........................2..........3.
a(n)=.0......................1..........................2..........3.(all these trees are fixed by this transformation)
however, the next 5 trees, with 3 internal nodes, in range [A014137[2], A014138[2]] = [4,8] change as follows:
........\/.....\/.................\/.....\/...
.......\/.......\/.....\/.\/.....\/.......\/..
......\/.......\/.......\_/.......\/.......\/.
n=.....4........5........6........7........8..
....................|.........................
....................|.........................
....................V.........................
......\/.........\/.............\/.........\/.
.......\/.......\/.....\/.\/.....\/.......\/..
......\/.......\/.......\_/.......\/.......\/.
a(n)=..5........4........6........8........7..
thus we obtain the first nine terms of this sequence: 0,1,2,3,5,4,6,8,7,...
		

Crossrefs

a(n) = A089859(A089859(n)) = A089863(A089863(n)). Row 1654694 of A089840.
Number of cycles: A089402. Number of fixed points: A089408. Max. cycle size & LCM of all cycle sizes: A046698 (in range [A014137(n-1)..A014138(n-1)] of this permutation).
Showing 1-2 of 2 results.