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 10 results.

A065626 Table of permutations of N, each row being a generator of the "rotation group" of infinite planar binary tree. Inverse generators are given in A065625.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Crossrefs

The first row (rotate the top node left): A057115, 2nd row (rotate the top node's left child): A065628, 3rd row (rotate the top node's right child): A065630, 4th row: A065632, 5th row: A065634, 6th row: A065636, 7th row: A065638, 8th row: A065640. Maple procedure floor_log_2 given in A054429, for trinv, follow A065167.

Programs

  • Maple
    [seq(RotateLeftTable(j),j=0..119)];
    RotateLeftTable := n -> RotateNodeLeft(1+(n-((trinv(n)*(trinv(n)-1))/2)),(((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1);
    # Rewrites t-prefixed x's in the following way: t -> t0, t0... -> t00..., t1 -> t, t10... -> t01..., t11... -> t1... and leaves other x's intact.
    RotateNodeLeft := proc(t,x) local u,y; u := floor_log_2(t)+1; y := floor_log_2(x)+1; if(y < u) then RETURN(x); fi; if(floor(x/(2^(y-u))) <> t) then RETURN(x); fi; if(x = t) then RETURN(2*x); fi; if(0 = (floor(x/(2^(y-u-1))) mod 2)) then RETURN(x + (t * 2^(y-u))); fi; if(y = (u+1)) then RETURN((x-1)/2); fi; if(0 = (floor(x/(2^(y-u-2))) mod 2)) then RETURN(x - 2^(y-u-2)); fi; RETURN(x - ((t+1) * 2^(y-u-1))); end;

A065627 Permutation of N induced by rotating the node 2 right in the infinite planar binary tree. The second row of A065625. Inverse of A065628.

Original entry on oeis.org

1, 5, 3, 2, 11, 6, 7, 4, 10, 22, 23, 12, 13, 14, 15, 8, 9, 20, 21, 44, 45, 46, 47, 24, 25, 26, 27, 28, 29, 30, 31, 16, 17, 18, 19, 40, 41, 42, 43, 88, 89, 90, 91, 92, 93, 94, 95, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 32, 33, 34, 35, 36, 37, 38, 39, 80, 81, 82, 83, 84, 85, 86, 87, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Crossrefs

A065627[n] = A057114[A065631[A057115[n]]]. Stabilizes the set A004760.

Programs

  • Maple
    [seq(RotateNodeRight(2,j),j=1..120)];

A065631 Permutation of N induced by rotating the node 4 right in the infinite planar binary tree. The fourth row of A065625. Inverse of A065632.

Original entry on oeis.org

1, 2, 3, 9, 5, 6, 7, 4, 19, 10, 11, 12, 13, 14, 15, 8, 18, 38, 39, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 16, 17, 36, 37, 76, 77, 78, 79, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 32, 33, 34, 35, 72, 73, 74, 75, 152, 153, 154, 155, 156, 157, 158, 159, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Crossrefs

Programs

  • Maple
    [seq(RotateNodeRight(4,j),j=1..120)];

A065629 Permutation of N induced by rotating the node 3 right in the infinite planar binary tree. The third row of A065625. Inverse of A065630.

Original entry on oeis.org

1, 2, 7, 4, 5, 3, 15, 8, 9, 10, 11, 6, 14, 30, 31, 16, 17, 18, 19, 20, 21, 22, 23, 12, 13, 28, 29, 60, 61, 62, 63, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 24, 25, 26, 27, 56, 57, 58, 59, 120, 121, 122, 123, 124, 125, 126, 127, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Crossrefs

Stabilizes the set A004761.

Programs

  • Maple
    [seq(RotateNodeRight(3,j),j=1..120)];

A065637 Permutation of N induced by rotating the node 7 right in the infinite planar binary tree. The seventh row of A065625. Inverse of A065638.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 15, 8, 9, 10, 11, 12, 13, 7, 31, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 14, 30, 62, 63, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 28, 29, 60, 61, 124, 125, 126, 127, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Crossrefs

Programs

  • Maple
    [seq(RotateNodeRight(7,j),j=1..120)];

A065639 Permutation of N induced by rotating the node 8 right in the infinite planar binary tree. The eighth row of A065625. Inverse of A065640.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 17, 9, 10, 11, 12, 13, 14, 15, 8, 35, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 16, 34, 70, 71, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 32, 33, 68, 69, 140, 141, 142, 143, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Crossrefs

Programs

  • Maple
    [seq(RotateNodeRight(8,j),j=1..120)];

A065633 Permutation of N induced by rotating the node 5 right in the infinite planar binary tree. The fifth row of A065625. Inverse of A065634.

Original entry on oeis.org

1, 2, 3, 4, 11, 6, 7, 8, 9, 5, 23, 12, 13, 14, 15, 16, 17, 18, 19, 10, 22, 46, 47, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 21, 44, 45, 92, 93, 94, 95, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 40, 41, 42, 43, 88, 89, 90, 91, 184, 185, 186, 187, 188
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Programs

  • Maple
    [seq(RotateNodeRight(5,j),j=1..120)];

A065635 Permutation of N induced by rotating the node 6 right in the infinite planar binary tree. The sixth row of A065625. Inverse of A065636.

Original entry on oeis.org

1, 2, 3, 4, 5, 13, 7, 8, 9, 10, 11, 6, 27, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 12, 26, 54, 55, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 24, 25, 52, 53, 108, 109, 110, 111, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2001

Keywords

Programs

  • Maple
    [seq(RotateNodeRight(6,j),j=1..120)];

A065658 The table of permutations of N, each row induced by the rotation (to the right) of the n-th node in the infinite binary "decimal" fraction tree.

Original entry on oeis.org

7, 25, 1, 31, 22, 1, 1, 3, 2, 1, 223, 10, 247, 2, 1, 15, 94, 4, 3, 2815, 1, 127, 6, 5, 4, 3, 2, 1, 5, 7, 28, 5, 4, 115, 2, 1, 385, 20479, 127, 6, 94, 4, 3, 2, 1, 13, 175, 8, 7, 6, 5, 4, 3, 2, 1, 1792, 46, 9, 280, 7, 234881023, 5, 4, 3, 322, 1, 61, 382, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
Offset: 0

Views

Author

Antti Karttunen, Nov 22 2001

Keywords

Comments

Consider the following infinite binary tree, where the nodes are numbered in breadth-first, left-to-right fashion from the top as in A065625 and then assigned the following rational values:
--------------------------------------(0.1)---------------------------------------
----------------(0.01)-------------------------------------(0.11)-----------------
-----(0.001)--------------(0.011)---------------(0.101)--------------(0.111)------
(0.0001)-(0.0011)----(0.0101)-(0.0111)-----(0.1001)-(0.1011)-----(0.1101)-(0.1111)
i.e., the elements (1/2, 1/4, 3/4, 1/8, 3/8, 5/8, 7/8, 1/16, 3/16, ..., of the Quasicyclic group Z+((2a+1)/(2^b)) for prime 2) listed here in their binary "decimal" fraction form. Subjecting this tree to any similar binary tree rotation as used in A065625 induces a permutation of the rationals in range ]0,1[ (i.e., including also the ones having infinite binary expansions, corresponding to infinite paths in above tree), which we then convert to permutations of N by taking the positions of the mapped values at the ]0,1[ side of the Stern-Brocot Tree (A007305/A007306). See example at A065670.

Crossrefs

The first row (rotate the top node right): A065660, 2nd row (rotate the top node's left child): A065662, 3rd row (rotate the top node's right child): A065664, 4th row: A065666, 5th row: A065668, 6th row: A065670, 7th row: A065672. For the other needed Maple procedures follow A065625, A047679, A054424 and A054429. Cf. also A065674-A065676. Inverse permutations are given in A065659.
Cf. also A065934-A065935.

Programs

  • Maple
    [seq(RotateBinFracRightTable(j),j=0..119)]; RotateBinFracRightTable := n -> RotateBinFracNodeRight(1+(n-((trinv(n)*(trinv(n)-1))/2)),(((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1);
    RotateBinFracNodeRight := (t,n) -> frac2position_in_0_1_SB_tree(RotateBinFracNodeRight_x(t,SternBrocot0_1frac(n)));
    RotateBinFracNodeRight_x := proc(t,x) local num,den; den := 2^(1+floor_log_2(t)); num := (2*(t-(den/2)))+1; if((x <= (num-1)/den) or (x >= (num+1)/den)) then RETURN(x); fi; if(x <= ((2*(num-1))+1)/(2*den)) then RETURN((2*(x - ((num-1)/den))) + ((num-1)/den)); fi; if(x < (num/den)) then RETURN(x + (1/(2*den))); fi; RETURN((num/den) + ((x-((num-1)/den))/2)); end;
    SternBrocot0_1frac := proc(n) local m; m := n + 2^floor_log_2(n); SternBrocotTreeNum(m)/SternBrocotTreeDen(m); end;
    frac2position_in_0_1_SB_tree := r -> RETURN(ReflectBinTreePermutation(cfrac2binexp(convert(1/r,confrac))));

A057114 Permutation of N induced by the order-preserving permutation of the rational numbers (x -> x+1); positions in Stern-Brocot tree.

Original entry on oeis.org

3, 1, 7, 2, 6, 14, 15, 4, 5, 12, 13, 28, 29, 30, 31, 8, 9, 10, 11, 24, 25, 26, 27, 56, 57, 58, 59, 60, 61, 62, 63, 16, 17, 18, 19, 20, 21, 22, 23, 48, 49, 50, 51, 52, 53, 54, 55, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 96, 97, 98, 99, 100, 101, 102, 103
Offset: 1

Views

Author

Antti Karttunen, Aug 09 2000

Keywords

Comments

The "unbalancing operation" used here is what is usually called "rotation of binary trees" (e.g. in Lucas, Ruskey et al. article)

Examples

			Consider the following "extended" Stern-Brocot tree (on interval ]-inf,inf[):
....................................0/1
.................-1/1.................................1/1
......-2/1................-1/2...............1/2...............2/1
.-3/1......-3/2......-2/3......-1/3.....1/3.......2/3.....3/2.......3/1
Enumerate the fractions breadth-first (0/1 = 1, -1/1 = 2, 1/1 = 3, -2/1 = 4, -1/2 = 5, etc.) then use this sequence to pick third, first, 7th, 2nd, etc. fractions. We get a bijection (0/1 -> 1/1, -1/1 -> 0/1, 1/1 -> 2/1, -2/1 -> -1/1, -1/2 -> 1/2, etc.) which is the function x -> x+1.
In other words, we cut the edge between 1/1 and 1/2, make 1/1 the new root and create a new edge between 0/1 and 1/2 to get an "unbalanced" Stern-Brocot tree. If we instead make a similar change to subtree 1/1 (cut {2/1,3/2}, create {1/1,3/2} and make 2/1 the new root of the positive side, leaving the negative side as it is), we get the function given in Maple procedure sbtree_perm_1_1_right.
Both mappings belong to Cameron's group "A" of permutations of the rational numbers which preserve their linear order and by applying such unbalancing operations successively (possibly infinitely many times) to the "extended" Stern-Brocot tree given above, the whole group "A" can be generated.
		

References

  • Joan Lucas, Dominique Roelants van Baronaigien and Frank Ruskey, On Rotations and the Generation of Binary Trees, Journal of Algorithms, 15 (1993) 343-366.

Crossrefs

SternBrocotNum given in A007305, SternBrocotDen in A047679, frac2position_in_whole_SB_tree in A054424. Inverse permutation: A057115. Cf. also A065249 and A065250.
The first row of A065625, i.e. a(n) = RotateNodeRight(1, n).

Programs

  • Maple
    sbtree_perm_1_1_right := x -> (`if`((x <= 0),x,(`if`((x < (1/2)),(x/(1-x)),(`if`((x < 1),(3-(1/x)),(x+1)))))));

Formula

a(n) = frac2position_in_whole_SB_tree (sbtree_perm_1_1_right (SternBrocotTreeNum(n) / SternBrocotTreeDen(n))).
Showing 1-10 of 10 results.