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

A232642 Sequence (or tree) generated by these rules: 1 is in S, and if x is in S, then x + 1 and 2*x + 2 are in S, and duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 10, 8, 7, 14, 12, 11, 22, 9, 18, 16, 15, 30, 13, 26, 24, 23, 46, 20, 19, 38, 17, 34, 32, 31, 62, 28, 27, 54, 25, 50, 48, 47, 94, 21, 42, 40, 39, 78, 36, 35, 70, 33, 66, 64, 63, 126, 29, 58, 56, 55, 110, 52, 51, 102, 49, 98, 96, 95, 190, 44
Offset: 1

Views

Author

Clark Kimberling, Nov 28 2013

Keywords

Comments

Let S be the set of numbers defined by these rules: 1 is in S, and if x is in S, then x + 1 and 2*x + 2 are in S. Then S is the set of positive integers, which arise in generations. Deleting duplicates as they occur, the generations are given by g(1) = (1), g(2) = (2,4), g(3) = (3,6,5,10), etc. Concatenating these gives A232642, a permutation of the positive integers. For n > 1, the number of numbers in g(n) is 2*F(n+1), where F = A000045, the Fibonacci numbers. It is helpful to show the results as a tree with the terms of S as nodes, an edge from x to x + 1 if x + 1 has not already occurred, and an edge from x to 2*x + 2 if 2*x + 2 has not already occurred.
Seen as triangle read by rows: A082560 with duplicates removed. - Reinhard Zumkeller, May 14 2015

Examples

			Each x begets x + 1 and 2*x + 2, but if either has already occurred it is deleted. Thus, 1 begets 2 and 4; then 2 begets 3 and 6, and 4 begets 5 and 10, so that g(3) = (3,6,5,10).
First 5 generations, also showing the places where duplicates were removed:
.  1:                                1
.  2:                2                               4
.  3:        3              6               5                10
.  4:    _       8      7       14      _       12       11       22
.  5:  _  __   9  18  _  16  15   30  _  __  13   26  __   24  23   46
These are the corresponding complete rows of triangle A082560:
.  1:                                1
.  2:                2                               4
.  3:        3              6               5                10
.  4:    4       8      7       14      6       12       11       22
.  5:  5  10   9  18  8  16  15   30  7  14  13   26  12   24  23   46
		

Crossrefs

Cf. A128588 (row lengths), A033484 (right edges), A257956 (row sums), A082560.

Programs

  • Haskell
    import Data.List.Ordered (member); import Data.List (sort)
    a232642 n k = a232642_tabf !! (n-1) !! (k-1)
    a232642_row n = a232642_tabf !! (n-1)
    a232642_tabf = f a082560_tabf [] where
       f (xs:xss) zs = ys : f xss (sort (ys ++ zs)) where
         ys = [v | v <- xs, not $ member v zs]
    a232642_list = concat a232642_tabf
    -- Reinhard Zumkeller, May 14 2015
  • Mathematica
    z = 14; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1] + 2]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]]  (* A232642 *)
    Table[Length[g1[n]], {n, 1, z}]  (* A000045 *)
    Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232643 *)

Extensions

Keyword tabf added, to bring out function g, by Reinhard Zumkeller, May 14 2015

A232638 Sequence (or tree) generated by these rules: 1 is in S, and if x is in S, then x + 1 and 2*x - 1 are in S, and duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 9, 8, 13, 11, 10, 17, 15, 14, 25, 12, 21, 19, 18, 33, 16, 29, 27, 26, 49, 23, 22, 41, 20, 37, 35, 34, 65, 31, 30, 57, 28, 53, 51, 50, 97, 24, 45, 43, 42, 81, 39, 38, 73, 36, 69, 67, 66, 129, 32, 61, 59, 58, 113, 55, 54, 105, 52, 101, 99
Offset: 1

Views

Author

Clark Kimberling, Nov 28 2013

Keywords

Comments

Let S be the set of numbers defined by these rules: 1 is in S, and if x is in S, then x + 1 and 2*x - 1 are in S. Then S is the set of positive integers, which arise in generations. Deleting duplicates as they occur, the generations are given by g(1) = (1), g(2) = (2), g(3) = (3), g(4) = (4,5), etc. Concatenating these gives A232638, a permutation of the positive integers. For n > 1, the number of numbers in g(n) is F(n-1), where F = A000045, the Fibonacci numbers. It is helpful to show the results as a tree with the terms of S as nodes, an edge from x to x + 1 if x + 1 has not already occurred, and an edge from x to 2*x - 1 if 2*x - 1 has not already occurred.

Examples

			Each x begets x + 1 and 2*x - 1, but if either has already occurred it is deleted. Thus, 1 begets 2, which begets 3, which begets 4 and 5, which beget 7 and (6,8), respectively.
		

Crossrefs

Programs

  • Mathematica
    z = 14; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1] - 1]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]]  (* A232638 *)
    Table[Length[g1[n]], {n, 1, z}]  (* A000045 *)
    Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232639 *)

A232640 Sequence (or tree) generated by these rules: 1 is in S, and if x is in S, then x + 1 and 2*x + 1 are in S, and duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 6, 11, 9, 8, 15, 13, 12, 23, 10, 19, 17, 16, 31, 14, 27, 25, 24, 47, 21, 20, 39, 18, 35, 33, 32, 63, 29, 28, 55, 26, 51, 49, 48, 95, 22, 43, 41, 40, 79, 37, 36, 71, 34, 67, 65, 64, 127, 30, 59, 57, 56, 111, 53, 52, 103, 50, 99, 97, 96, 191
Offset: 1

Views

Author

Clark Kimberling, Nov 28 2013

Keywords

Comments

Let S be the set of numbers defined by these rules: 1 is in S, and if x is in S, then x + 1 and 2*x + 1 are in S. Then S is the set of positive integers, which arise in generations. Deleting duplicates as they occur, the generations are given by g(1) = (1), g(2) = (2,3), g(3) = (5,4,7), etc. Concatenating these gives A232640, a permutation of the positive integers. The number of numbers in g(n) is F(n), where F = A000045, the Fibonacci numbers. It is helpful to show the results as a tree with the terms of S as nodes, an edge from x to x + 1 if x + 1 has not already occurred, and an edge from x to 2*x + 1 if 2*x + 1 has not already occurred.

Examples

			Each x begets x + 1 and 2*x + 1, but if either has already occurred it is deleted. Thus, 1 begets 2 and 3; then 2 begets only 5, and 3 begets (4,7), so that g(3) = (5,4,7).
		

Crossrefs

Programs

  • Mathematica
    z = 14; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1] + 1]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]]  (* this sequence *)
    Table[Length[g1[n]], {n, 1, z}]  (* A000045 *)
    Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232641 *)

Formula

Conjecture: a(n) = A135533(A003754(n+1)) for n > 0. - Mikhail Kurkov, Feb 26 2023

A232641 Inverse permutation of the sequence of positive integers at A232640.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 6, 10, 9, 15, 8, 13, 12, 20, 11, 18, 17, 28, 16, 26, 25, 41, 14, 23, 22, 36, 21, 34, 33, 54, 19, 31, 30, 49, 29, 47, 46, 75, 27, 44, 43, 70, 42, 68, 67, 109, 24, 39, 38, 62, 37, 60, 59, 96, 35, 57, 56, 91, 55, 89, 88, 143, 32, 52, 51, 83
Offset: 1

Views

Author

Clark Kimberling, Nov 28 2013

Keywords

Crossrefs

Programs

  • Mathematica
    z = 14; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1] + 1]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]];
    g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]]  (* A232640 *)
    Table[Length[g1[n]], {n, 1, z}]  (* A000045 *)
    Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232641 *)

A232643 Inverse permutation of the sequence of positive integers at A232642.

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 9, 8, 14, 7, 12, 11, 19, 10, 17, 16, 27, 15, 25, 24, 40, 13, 22, 21, 35, 20, 33, 32, 53, 18, 30, 29, 48, 28, 46, 45, 74, 26, 43, 42, 69, 41, 67, 66, 108, 23, 38, 37, 61, 36, 59, 58, 95, 34, 56, 55, 90, 54, 88, 87, 142, 31, 51, 50, 82, 49
Offset: 1

Views

Author

Clark Kimberling, Nov 28 2013

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a232643 = (+ 1) . fromJust . (`elemIndex` a232642_list)
    -- Reinhard Zumkeller, May 14 2015
  • Mathematica
    z = 14; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1] + 2]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]]  (* A232642 *)
    Table[Length[g1[n]], {n, 1, z}]  (* A000045 *)
    Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232643 *)

Extensions

b-File corrected by Reinhard Zumkeller, May 14 2015

A232644 Sequence (or tree) generated by these rules: 1 is in S, and if x is in S, then x + 1 and 2*x + 3 are in S, and duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 5, 3, 7, 6, 13, 4, 9, 8, 17, 15, 14, 29, 11, 10, 21, 19, 18, 37, 16, 33, 31, 30, 61, 12, 25, 23, 22, 45, 20, 41, 39, 38, 77, 35, 34, 69, 32, 65, 63, 62, 125, 27, 26, 53, 24, 49, 47, 46, 93, 43, 42, 85, 40, 81, 79, 78, 157, 36, 73, 71, 70, 141, 67, 66
Offset: 1

Views

Author

Clark Kimberling, Nov 28 2013

Keywords

Comments

Let S be the set of numbers defined by these rules: 1 is in S, and if x is in S, then x + 1 and 2*x + 3 are in S. Then S is the set of positive integers, which arise in generations. Deleting duplicates as they occur, the generations are given by g(1) = (1), g(2) = (2,5), g(3) = (3,7,6,13), etc. Concatenating these gives A232644, a permutation of the positive integers. For n > 2, the number of numbers in g(n) is L(n), where F = A000032, the Lucas numbers. It is helpful to show the results as a tree with the terms of S as nodes, an edge from x to x + 1 if x + 1 has not already occurred, and an edge from x to 2*x + 3 if 2*x + 3 has not already occurred.

Examples

			Each x begets x + 1 and 2*x + 3, but if either has already occurred it is deleted. Thus, 1 begets 2 and 5; then 2 begets 3 and 7, and 5 begets 6 and 13, so that g(3) = (3,7,6,13).
		

Crossrefs

Programs

  • Mathematica
    z = 14; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1] + 3]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]]  (* A232644 *)
    Table[Length[g1[n]], {n, 1, z}]  (* A000032 *)
    Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232645 *)

A232645 Inverse permutation of the sequence of positive integers at A232644.

Original entry on oeis.org

1, 2, 4, 8, 3, 6, 5, 10, 9, 16, 15, 26, 7, 13, 12, 21, 11, 19, 18, 31, 17, 29, 28, 47, 27, 45, 44, 73, 14, 24, 23, 39, 22, 37, 36, 60, 20, 34, 33, 55, 32, 53, 52, 86, 30, 50, 49, 81, 48, 79, 78, 128, 46, 76, 75, 123, 74, 121, 120, 196, 25, 42, 41, 68, 40, 66
Offset: 1

Views

Author

Clark Kimberling, Nov 28 2013

Keywords

Crossrefs

Programs

  • Mathematica
    z = 14; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1] + 3]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]]  (* A232644 *)
    Table[Length[g1[n]], {n, 1, z}]  (* A000032 *)
    Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232645 *)

A232646 Sequence (or tree or triangle) generated by these rules: 1 is in S, and if x is in S, then 2*x and 5*x + 3 are in S, and duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 5, 4, 10, 25, 8, 20, 50, 125, 16, 40, 100, 250, 625, 32, 80, 200, 500, 1250, 3125, 64, 160, 400, 1000, 2500, 6250, 15625, 128, 320, 800, 2000, 5000, 12500, 31250, 78125, 256, 640, 1600, 4000, 10000, 25000, 62500, 156250, 390625, 512, 1280, 3200, 8000
Offset: 1

Views

Author

Clark Kimberling, Nov 28 2013

Keywords

Comments

Let S be the set of numbers defined by these rules: 1 is in S, and if x is in S, then 2*x and 5*x are in S. Then S is the set of positive integers, which arise in generations. Deleting duplicates as they occur, the generations are given by g(1) = (1), g(2) = (2,5), g(3) = (4,10,25), etc. Concatenating these gives A232646, a permutation of the positive integers. For n > 2, the number of numbers in g(n) is n. It is helpful to show the results as a tree with the terms of S as nodes, an edge from x to 2*x if 2*x has not already occurred, and an edge from x to 3*x if 3*x has not already occurred.

Examples

			Each x begets 2*x and 5*x, but if either has already occurred it is deleted.  Thus, 1 begets 2 and 5; then 2 begets 4 and 10, and 5 begets only 25, so that g(3) = (4,10,25).  Writing generations as rows results in a triangle whose first five rows are as follows:
1
2 .... 5
4 .... 10 ... 25
8 .... 20 ... 50 ... 125
16 ... 40 ... 100 .. 250 .. 625
		

Crossrefs

Programs

  • Mathematica
    x = {1}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, 2*x, 5*x}]]], {12}]; x  (* Peter J. C. Moses, Nov 27 2013 *)

Formula

Counting the top row as row 0 and writing for (2^i)*(5*j) , the numbers in row n are , , ..., <0,n>.
Showing 1-8 of 8 results.