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.

Previous Showing 11-15 of 15 results.

A258241 Irregular triangle (Beatty tree for r = sqrt(3)), T, of all nonnegative integers, each exactly once, as determined in Comments.

Original entry on oeis.org

0, 1, 3, 2, 6, 4, 5, 12, 7, 8, 10, 22, 15, 19, 13, 39, 9, 11, 24, 27, 23, 34, 69, 14, 16, 17, 20, 48, 60, 40, 41, 43, 121, 31, 36, 25, 28, 29, 35, 72, 76, 84, 105, 70, 71, 211, 18, 21, 45, 51, 64, 42, 44, 49, 50, 55, 61, 62, 126, 147, 183, 122, 124, 133, 367
Offset: 1

Views

Author

Clark Kimberling, Jun 05 2015

Keywords

Comments

Suppose that r is an irrational number > 1, and let s = r/(r-1), so that the sequences u and v defined by u(n) = floor(r*n) and v(n) = floor(s*n), for n >=1 are the Beatty sequences of r and s, and u and v partition the positive integers.
The tree T has root 0 with an edge to 1, and all other edges are determined as follows: if x is in u(v), then there is an edge from x to floor(r + r*x) and an edge from x to ceiling(x/r); otherwise there is an edge from x to floor(r + r*x). (Thus, the only branchpoints are the numbers in u(v).)
Another way to form T is by "backtracking" to the root 0. Let b(x) = floor[x/r] if x is in (u(n)), and b(x) = floor[r*x] if x is in (v(n)). Starting at any vertex x, repeated applications of b eventually reach 0. The number of steps to reach 0 is the number of the generation of T that contains x. (See Example for x = 8).
See A258212 for a guide to Beatty trees for various choices of r.

Examples

			Rows (or generations, or levels) of T:
0
1
3
2   6
4   5   12
7   8   10  22
15  19  13  39
9   11  24  27  23  34  69
14  16  17  20  48  60  40  41  43  121
Generations 0 to 10 of the tree are drawn by the Mathematica program.  In T, the path from 0 to 16 is (0,1,3,6,4,8,15,27,16).  The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (16,27,15,8,4,6,3,1,0).
		

Crossrefs

Cf. A022838, A258242 (path-length, 0 to n), A258212

Programs

  • Mathematica
    r = Sqrt[3]; k = 2000; w = Map[Floor[r #] &, Range[k]];
    f[x_] := f[x] = If[MemberQ[w, x], Floor[x/r], Floor[r*x]];
    b := NestWhileList[f, #, ! # == 0 &] &;
    bs = Map[Reverse, Table[b[n], {n, 0, k}]];
    generations = Table[DeleteDuplicates[Map[#[[n]] &, Select[bs, Length[#] > n - 1 &]]], {n, 11}]
    paths = Sort[Map[Reverse[b[#]] &, Last[generations]]]
    graph = DeleteDuplicates[Flatten[Map[Thread[Most[#] -> Rest[#]] &, paths]]]
    TreePlot[graph, Top, 0, VertexLabeling -> True, ImageSize -> 700]
    Map[DeleteDuplicates, Transpose[paths]] (* Peter J. C. Moses,May 21 2015 *)

A258243 Irregular triangle (Beatty tree for e) as determined in Comments; a permutation of the nonnegative integers.

Original entry on oeis.org

0, 2, 1, 8, 3, 5, 24, 10, 16, 9, 67, 4, 6, 29, 46, 25, 27, 184, 19, 11, 13, 17, 70, 76, 81, 127, 68, 502, 7, 32, 38, 48, 54, 26, 28, 30, 47, 187, 192, 209, 222, 347, 185, 1367, 12, 14, 18, 20, 21, 84, 89, 106, 133, 149, 69, 71, 73, 77, 78, 82, 128, 130, 505
Offset: 1

Views

Author

Clark Kimberling, Jun 08 2015

Keywords

Comments

The Beatty tree for an irrational number r > 1 (such as r = e), is formed as follows. To begin, let s = r/(r-1), so that the sequences defined u and v defined by u(n) = floor(r*n) and v(n) = floor(s*n), for n >=1 are the Beatty sequences of r and s, and u and v partition the positive integers.
The tree T has root 0 with an edge to 2, and all other edges are determined as follows: if x is in u(v), then there is an edge from x to floor(r + r*x) and an edge from x to ceiling(x/r); otherwise there is an edge from x to floor(r + r*x). (Thus, the only branchpoints are the numbers in u(v).)
Another way to form T is by "backtracking" to the root 0. Let b(x) = floor[x/r] if x is in (u(n)), and b(x) = floor[r*x] if x is in (v(n)). Starting at any vertex x, repeated applications of b eventually reach 0. The number of steps to reach 0 is the number of the generation of T that contains x. (See Example for x = 20).
See A258212 for a guide to Beatty trees for various choices of r.

Examples

			Rows (or generations, or levels) of T:
0
2
1   8
5   3    24
16  10   9    67
6   46   4    29   27   25   184
19  17   127  13   11   81   76   70   68   502
Generations 0 to 8 of the tree are drawn by the Mathematica program.  In T, the path from 0 to 20 is (0,2,1,5,16,6,19,54,20).  The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (20,54,19,6,16,5,1,2,0).
		

Crossrefs

Cf. A022843, A258244 (path-length, 0 to n), A258212

Programs

  • Mathematica
    r = E; k = 2000; w = Map[Floor[r #] &, Range[k]];
    f[x_] := f[x] = If[MemberQ[w, x], Floor[x/r], Floor[r*x]];
    b := NestWhileList[f, #, ! # == 0 &] &;
    bs = Map[Reverse, Table[b[n], {n, 0, k}]];
    generations = Table[DeleteDuplicates[Map[#[[n]] &, Select[bs, Length[#] > n - 1 &]]], {n, 9}]
    paths = Sort[Map[Reverse[b[#]] &, Last[generations]]]
    graph = DeleteDuplicates[Flatten[Map[Thread[Most[#] -> Rest[#]] &, paths]]]
    TreePlot[graph, Top, 0, VertexLabeling -> True, ImageSize -> 850]
    Map[DeleteDuplicates, Transpose[paths]] (* Peter J. C. Moses,May 21 2015 *)

A258245 Irregular triangle (Beatty tree for Pi) as determined in Comments; a permutation of the nonnegative integers.

Original entry on oeis.org

0, 3, 1, 12, 6, 4, 40, 2, 15, 21, 13, 128, 5, 7, 9, 43, 50, 69, 41, 405, 25, 31, 14, 16, 18, 22, 131, 138, 160, 219, 129, 1275, 8, 10, 53, 59, 72, 81, 100, 42, 44, 47, 51, 70, 408, 414, 436, 505, 691, 406, 4008, 34, 17, 19, 23, 26, 28, 32, 141, 150, 163, 169
Offset: 1

Views

Author

Clark Kimberling, Jun 08 2015

Keywords

Comments

The Beatty tree for an irrational number r > 1 (such as r = Pi), is formed as follows. To begin, let s = r/(r-1), so that the sequences defined u and v defined by u(n) = floor(r*n) and v(n) = floor(s*n), for n >=1 are the Beatty sequences of r and s, and u and v partition the positive integers.
The tree T has root 0 with an edge to 3, and all other edges are determined as follows: if x is in u(v), then there is an edge from x to floor(r + r*x) and an edge from x to ceiling(x/r); otherwise there is an edge from x to floor(r + r*x). (Thus, the only branchpoints are the numbers in u(v).)
Another way to form T is by "backtracking" to the root 0. Let b(x) = floor[x/r] if x is in (u(n)), and b(x) = floor[r*x] if x is in (v(n)). Starting at any vertex x, repeated applications of b eventually reach 0. The number of steps to reach 0 is the number of the generation of T that contains x. (See Example for x = 8).
See A258212 for a guide to Beatty trees for various choices of r.

Examples

			Rows (or generations, or levels) of T:
0
3
1   12
6   4   40
2   21  15   13   128
9   7   69   5    50   43   42   405
31  25  22   219  18   16   160  14   138   131   129   1275
Generations 0 to 7 of the tree are drawn by the Mathematica program.  In T, the path from 0 to 8 is (0,3,1,6,21,7,25,8).  The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (8,25,7,21,6,1,3,0).
		

Crossrefs

Cf. A022844, A258244 (path-length, 0 to n), A258212.

Programs

  • Mathematica
    r = Pi; k = 2000; w = Map[Floor[r #] &, Range[k]];
    f[x_] := f[x] = If[MemberQ[w, x], Floor[x/r], Floor[r*x]];
    b := NestWhileList[f, #, ! # == 0 &] &;
    bs = Map[Reverse, Table[b[n], {n, 0, k}]];
    generations = Table[DeleteDuplicates[Map[#[[n]] &, Select[bs, Length[#] > n - 1 &]]], {n, 8}]
    paths = Sort[Map[Reverse[b[#]] &, Last[generations]]]
    graph = DeleteDuplicates[Flatten[Map[Thread[Most[#] -> Rest[#]] &, paths]]]
    TreePlot[graph, Top, 0, VertexLabeling -> True, ImageSize -> 800]
    Map[DeleteDuplicates, Transpose[paths]] (* Peter J. C. Moses,May 21 2015 *)

A258246 Number of steps from n to 0, where allowable steps are x -> [x/Pi] if x = is in A022844 (the Beatty sequence for Pi) and x -> [Pi*x] otherwise, where [ ] = floor.

Original entry on oeis.org

0, 2, 4, 1, 3, 5, 3, 5, 7, 5, 7, 9, 2, 4, 6, 4, 6, 8, 6, 8, 10, 4, 6, 8, 10, 6, 8, 10, 8, 10, 12, 6, 8, 10, 8, 10, 12, 10, 12, 14, 3, 5, 7, 5, 7, 9, 11, 7, 9, 11, 5, 7, 9, 7, 9, 11, 9, 11, 13, 7, 9, 11, 9, 11, 13, 11, 13, 15, 17, 5, 7, 9, 7, 9, 11, 9, 11, 13
Offset: 0

Views

Author

Clark Kimberling, Jun 08 2015

Keywords

Comments

a(n) = number of edges from 0 to n in the tree at A258245.

Examples

			8->25->7->21->6->1->3->0, so that a(8) = 7.
		

Crossrefs

Programs

  • Mathematica
    r = Pi; w = Table[Floor[r*n], {n, 1, 1000}];
    f[x_] := If[MemberQ[w, x], Floor[x/r], Floor[r*x]];
    g[x_] := Drop[FixedPointList[f, x], -1];
    Table[-1+ Length[g[n]], {n, 0, 100}]

A258247 Irregular triangle (Beatty tree for sqrt(8)) as determined in Comments; a permutation of the nonnegative integers.

Original entry on oeis.org

0, 2, 1, 8, 3, 5, 25, 11, 16, 9, 73, 4, 6, 28, 33, 48, 26, 209, 19, 10, 12, 14, 17, 76, 82, 96, 138, 74, 593, 7, 36, 42, 50, 56, 27, 29, 31, 34, 49, 212, 217, 234, 274, 393, 210, 1680, 13, 15, 18, 20, 22, 84, 90, 98, 104, 121, 144, 161, 75, 77, 79, 83, 97
Offset: 1

Views

Author

Clark Kimberling, Jun 08 2015

Keywords

Comments

The Beatty tree for an irrational number r > 1 (such as r = sqrt(8)), is formed as follows. To begin, let s = r/(r-1), so that the sequences defined u and v defined by u(n) = floor(r*n) and v(n) = floor(s*n), for n >=1 are the Beatty sequences of r and s, and u and v partition the positive integers.
The tree T has root 0 with an edge to 2, and all other edges are determined as follows: if x is in u(v), then there is an edge from x to floor(r + r*x) and an edge from x to ceiling(x/r); otherwise there is an edge from x to floor(r + r*x). (Thus, the only branchpoints are the numbers in u(v).)
Another way to form T is by "backtracking" to the root 0. Let b(x) = floor[x/r] if x is in (u(n)), and b(x) = floor[r*x] if x is in (v(n)). Starting at any vertex x, repeated applications of b eventually reach 0. The number of steps to reach 0 is the number of the generation of T that contains x. (See Example for x = 13).
See A258212 for a guide to Beatty trees for various choices of r.

Examples

			Rows (or generations, or levels) of T:
0
2
1   8
3   5   25
11  16  9   73
4   6   28  33  48  26  209
19  10  12  14  16  76  82  96  138  74  593
Generations 0 to 8 of the tree are drawn by the Mathematica program.  In T, the path from 0 to 13 is (0,2,8,3,11,33,12,36,13).  The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (13,36,12,33,11,3,8,2,0).
		

Crossrefs

Cf. A022842, A258248 (path-length, 0 to n), A258212.

Programs

  • Mathematica
    r = Sqrt[8]; k = 2000; w = Map[Floor[r #] &, Range[k]];
    f[x_] := f[x] = If[MemberQ[w, x], Floor[x/r], Floor[r*x]];
    b := NestWhileList[f, #, ! # == 0 &] &;
    bs = Map[Reverse, Table[b[n], {n, 0, k}]];
    generations = Table[DeleteDuplicates[Map[#[[n]] &, Select[bs, Length[#] > n - 1 &]]], {n, 9}]
    paths = Sort[Map[Reverse[b[#]] &, Last[generations]]]
    graph = DeleteDuplicates[Flatten[Map[Thread[Most[#] -> Rest[#]] &, paths]]]
    TreePlot[graph, Top, 0, VertexLabeling -> True, ImageSize -> 900]
    Map[DeleteDuplicates, Transpose[paths]] (* Peter J. C. Moses,May 21 2015 *)
Previous Showing 11-15 of 15 results.