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-20 of 41 results. Next

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

Original entry on oeis.org

0, 1, 2, 4, -1, 8, -3, -2, 16, -7, -6, -4, 3, 32, -15, -14, -12, 7, -8, 5, 6, 64, -31, -30, -28, 15, -24, 13, 14, -16, 9, 10, 12, -5, 128, -63, -62, -60, 31, -56, 29, 30, -48, 25, 26, 28, -13, -32, 17, 18, 20, -9, 24, -11, -10, 256, -127, -126, -124, 63
Offset: 1

Views

Author

Clark Kimberling, Nov 28 2013

Keywords

Comments

Let S be the set of numbers defined by these rules: 0 is in S, and if x is in S, then 2*x and 1 - x are in S. Then S is the set of integers, which arise in generations. Deleting duplicates as they occur, the generations are given by g(1) = (0), g(2) = (1), g(3) = (2), g(4) = (4,-1), g(5) = (8,-3,-2), etc. Concatenating these gives A232723. Every integer occurs exactly once in S. The even integers occupy the positions given by the lower Wythoff sequence, A000201; the odds, by the upper Wythoff sequence, A001950. The positive integers occupy the positions given by A189035, and the positions of the nonpositives, by A189034.
Inverse beginning with 0: 1, 2, 3, 13, 4, 20, 21, 18, 6, 31, 32, 89, 33, 28, 29, 26, 9, 49, 50, 136, 51, 143, 144, 141, 53, 44, ..., . - Robert G. Wilson v, Jun 17 2014

Examples

			Each x begets 2*x and 1 - x, and if either has already occurred it is deleted. Thus, 0 begets 1, which begets 2, which begets (4,-1), etc.
		

Crossrefs

Programs

  • Mathematica
    x = {0}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, 2*x, 1 - x}]]], {10}]; x  (* Peter J. C. Moses, Nov 28 2013 *)
    Nest[ DeleteDuplicates[ Flatten[ # /. a_Integer -> {2a, 1-a}]]&, {0}, 9] (* Robert G. Wilson v, Jun 17 2014 *)

A233694 Position of n in the sequence (or tree) S generated in order by these rules: 0 is in S; if x is in S then x + 1 is in S; if nonzero x is in S then 1/x is in S; if x is in S, then i*x is in S; where duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 3, 5, 11, 23, 49, 102, 212, 443, 926, 1939, 4064, 8509, 17816, 37303, 78105, 163544, 342454, 717076, 1501502, 3144024, 6583334, 13784969
Offset: 0

Views

Author

Clark Kimberling, Dec 19 2013

Keywords

Comments

It can be proved using the division algorithm for Gaussian integers that S is the set of Gaussian rational numbers: (b + c*i)/d, where b,c,d are integers and d is not 0.
The differences of this sequence give the number of elements in each level of the tree. This means that d(n) = a(n) - a(n-1) is at least 1, and is bounded by 3*d(n-1), since there are three times as many elements in each level, before we exclude repetitions. - Jack W Grahl, Aug 10 2018

Examples

			The first 16 numbers generated are as follows: 0, 1, 2, i, 3, 1/2, 2 i, 1 + i, -i, -1, 4, 1/3, 3 i, 3/2, i/2, 1 + 2 i. The positions of the nonnegative integers are 1, 2, 3, 5, 11.
		

Crossrefs

Programs

  • Mathematica
    Off[Power::infy]; x = {0}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, x + 1, 1/x, I*x} /. ComplexInfinity -> 0]]], {18}]; On[Power::infy]; t1 = Flatten[Position[x, _?(IntegerQ[#] && NonNegative[#] &)]]    (* A233694 *)
    t2 = Flatten[Position[x, _?(IntegerQ[#] && Negative[#] &)]]  (* A233695 *)
    t = Union[t1, t2]  (* A233696 *)
    (* Peter J. C. Moses, Dec 21 2013 *)

Extensions

More terms from Jack W Grahl, Aug 10 2018

A233696 Positions of integers in the sequence (or tree) S generated in order by these rules: 0 is in S; if x is in S then x + 1 is in S; if nonzero x is in S then 1/x is in S; if x is in S, then i*x is in S; where duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 3, 5, 10, 11, 18, 23, 30, 49, 56, 102, 109, 212, 219, 443, 450, 926, 933, 1939, 1946, 4064, 4071, 8509, 8516, 17816, 17823, 37303, 37310, 78105, 78112, 163544, 163551
Offset: 1

Views

Author

Clark Kimberling, Dec 19 2013

Keywords

Comments

It can be proved using the division algorithm for Gaussian integers that S is the set of Gaussian rational numbers: (b + c*i)/d, where b,c,d are integers and d is not 0.

Examples

			The first 16 numbers generated are as follows:  0, 1, 2, i, 3, 1/2, 2 i, 1 + i, -i, -1, 4, 1/3, 3 i, 3/2, i/2, 1 + 2 i.  Positions of integers 0, 1, 2, 3, -1, 4,... are 1,2,3,5,10,11,....
		

Crossrefs

Programs

  • Mathematica
    Off[Power::infy]; x = {0}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, x + 1, 1/x, I*x} /. ComplexInfinity -> 0]]], {18}]; On[Power::infy]; t1 = Flatten[Position[x, _?(IntegerQ[#] && NonNegative[#] &)]]    (*A233694*)
    t2 = Flatten[Position[x, _?(IntegerQ[#] && Negative[#] &)]]  (*A233695*)
    t = Union[t1, t2]  (*A233696*)
    (* Peter J. C. Moses, Dec 21 2013 *)

Extensions

Definition and example corrected. - R. J. Mathar, May 06 2017

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

Original entry on oeis.org

1, 2, 4, 3, 8, 5, 16, 12, 9, 32, 6, 20, 17, 64, 13, 48, 10, 36, 33, 128, 7, 24, 21, 80, 18, 68, 65, 256, 14, 52, 49, 192, 11, 40, 37, 144, 34, 132, 129, 512, 28, 25, 96, 22, 84, 81, 320, 19, 72, 69, 272, 66, 260, 257, 1024, 15, 56, 53, 208, 50, 196, 193, 768
Offset: 1

Views

Author

Clark Kimberling, Nov 26 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 4*x are in S. Then S is the set of all 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,8,5,16), g(4) = (12,9,32,6,20,17,64), etc. Concatenating these gives A232563, a permutation of the positive integers. The number of numbers in g(n) is A001631(n), the n-th tetranacci number. It is helpful to show the results as a tree with the terms of S as nodes and edges from x to x + 1 if x + 1 has not already occurred, and an edge from x to 4*x if 4*x has not already occurred.

Examples

			Each x begets x + 1 and 4*x, but if either has already occurred it is deleted.  Thus, 1 begets 2 and 4; in the next generation, 2 begets 3 and 8, and 4 begets 5 and 16.
		

Crossrefs

Programs

  • Mathematica
    z = 8; g[1] = {1}; g[2] = {2, 4}; g[n_] := Riffle[g[n - 1] + 1, 4 g[n - 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}]]  (* A232563 *)
    Table[Length[g1[n]], {n, 1, z}]  (* A001631 *)
    t1 = Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232564 *)

A232868 Positions of the integers in the sequence (or tree) of complex numbers generated by these rules: 0 is in S, and if x is in S, then x + 1 and i*x are in S, where duplicates are deleted as they occur.

Original entry on oeis.org

1, 2, 3, 5, 8, 9, 12, 16, 19, 27, 30, 42, 45, 61, 64, 84, 87, 111, 114, 142, 145, 177, 180, 216, 219, 259, 262, 306, 309, 357, 360, 412, 415, 471, 474, 534, 537, 601, 604, 672, 675, 747, 750, 826, 829, 909, 912, 996, 999, 1087, 1090, 1182, 1185, 1281, 1284
Offset: 1

Views

Author

Clark Kimberling, Dec 01 2013

Keywords

Comments

Let S be the sequence (or tree) of complex numbers defined by these rules: 0 is in S, and if x is in S, then x + 1, and i*x are in S. Deleting duplicates as they occur, the generations of S are given by g(1) = (0), g(2) = (1), g(3) = (2,i), g(4) = (3, 2i, 1+i, -1), ... Concatenating these gives 0, 1, 2, i, 3, 2*i, 1 + i, -1, 4, 3*i, 1 + 2*i, -2, 2 + i, -1 + i, -i, 5, ... A232868 is the (ordered) union of two linearly recurrent sequences: A232866 and A232867.

Examples

			Each x begets x + 1, and i*x, but if either these has already occurred it is deleted.  Thus, 0 begets (1); then 1 begets (2,i,); then 2 begets 3 and 2*i, and i begets 1 + i and -1, so that g(4) = (3, 2*i, 1 + i, -1), etc.
		

Crossrefs

Programs

  • Mathematica
    x = {0}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, x + 1, I*x}]]], {40}]; x;
    t1 = Flatten[Table[Position[x, n], {n, 0, 30}]]   (* A232866 *)
    t2 = Flatten[Table[Position[x, -n], {n, 1, 30}]]  (* A232867 *)
    Union[t1, t2]  (* A232868 *)

Formula

From Chai Wah Wu, Feb 20 2018: (Start)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 10 (conjectured).
G.f.: x*(-x^9 - 4*x^7 + 2*x^6 + 2*x^5 - 2*x^4 + x^2 - x - 1)/((x - 1)^3*(x + 1)^2) (conjectured). (End)

A233135 Shortest (x+1,2x)-code of n.

Original entry on oeis.org

1, 2, 21, 22, 221, 212, 2121, 222, 2221, 2212, 22121, 2122, 21221, 21212, 212121, 2222, 22221, 22212, 222121, 22122, 221221, 221212, 2212121, 21222, 212221, 212212, 2122121, 212122, 2121221, 2121212, 21212121, 22222, 222221, 222212, 2222121, 222122, 2221221
Offset: 1

Views

Author

Clark Kimberling, Dec 05 2013

Keywords

Comments

Every positive integer is a composite of f(x) = x + 1 and g(x) = 2*x starting with x = 1. For example, 5 = f(g(g(1))), which abbreviates as fgg, or 122, which we call a (x+1,2x)-code of 5. It appears that the number of (x+1,2x)-codes of n is A040039(n), that these numbers form Guy Steele's sequence GS(4,5) at A135529, and that for k >= 1, then number of such codes is F(n-1), where F = A000045, the Fibonacci numbers. See A232559 for the uncoded positive integers in the order generated by the rules x -> x+1 and x -> 2*x.

Crossrefs

Programs

  • Mathematica
    b[x_] := b[x] = If[OddQ[x], x - 1, x/2]; u[n_] := 2 - Mod[Drop[FixedPointList[b, n], -3], 2]; u[1] = {1}; t = Table[u[n], {n, 1, 30}]; Table[FromDigits[u[n]], {n, 1, 50}]  (* A233137 *)
    Flatten[t]  (* A233138 *)
    Table[FromDigits[Reverse[u[n]]], {n, 1, 30}]  (* A233135 *)
    Flatten[Table[Reverse[u[n]], {n, 1, 30}]]  (* A233136 *)

Formula

Define h(x) = x - 1 if x is odd and h(x) = x/2 if x is even, and define H(x,1) = h(x) and H(x,k) = H(H(x,k-1)). For each n > 1, the sequence (H(n,k)) decreases to 1 through two kinds of steps; write 1 when the step is x - 1 and write 2 when the step is x/2. Let c(n) be the concatenation of 1s and 2s; then A233135(n) is the reversal of c(n), as in the Mathematica program.

A233136 Concatenated shortest (x+1,2x)-codes for the positive integers.

Original entry on oeis.org

1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1
Offset: 1

Views

Author

Clark Kimberling, Dec 05 2013

Keywords

Comments

Concatenate the representations of the positive integers in A233135, and then separate the digits by commas, in the manner analogous to A030302.

Examples

			A233135 = (1,2,21,22,221,212,...), so that A233136 = (1,2,2,1,2,2,2,2,1,2,1,2,...).
		

Crossrefs

Programs

  • Mathematica
    b[x_] := b[x] = If[OddQ[x], x - 1, x/2]; u[n_] := 2 - Mod[Drop[FixedPointList[b, n], -3], 2]; u[1] = {1}; t = Table[u[n], {n, 1, 30}]; Table[FromDigits[u[n]], {n, 1, 50}]  (* A233137 *)
    Flatten[t]  (* A233138 *)
    Table[FromDigits[Reverse[u[n]]], {n, 1, 30}]  (* A233135 *)
    Flatten[Table[Reverse[u[n]], {n, 1, 30}]]  (* A233136 *)

A233137 Reversed shortest (x+1,2x)-code of n.

Original entry on oeis.org

1, 2, 12, 22, 122, 212, 1212, 222, 1222, 2122, 12122, 2212, 12212, 21212, 121212, 2222, 12222, 21222, 121222, 22122, 122122, 212122, 1212122, 22212, 122212, 212212, 1212212, 221212, 1221212, 2121212, 12121212, 22222, 122222, 212222, 1212222, 221222, 1221222
Offset: 1

Views

Author

Clark Kimberling, Dec 05 2013

Keywords

Comments

(See A233135.)

Crossrefs

Programs

  • Mathematica
    b[x_] := b[x] = If[OddQ[x], x - 1, x/2]; u[n_] := 2 - Mod[Drop[FixedPointList[b, n], -3], 2]; u[1] = {1}; t = Table[u[n], {n, 1, 30}]; Table[FromDigits[u[n]], {n, 1, 50}]  (* A233137 *)
    Flatten[t]  (* A233138 *)
    Table[FromDigits[Reverse[u[n]]], {n, 1, 30}]  (* A233135 *)
    Flatten[Table[Reverse[u[n]], {n, 1, 30}]]  (* A233136 *)

Formula

Define h(x) = x - 1 if x is odd and h(x) = x/2 if x is even, and define H(x,1) = h(x) and H(x,k) = H(H(x,k-1)). For each n > 1, the sequence (H(n,k)) decreases to 1 through two kinds of steps; write 1 when the step is x - 1 and write 2 when the step is x/2. A233137(n) is the concatenation of 1s and 2s, as in the Mathematica program.

A233138 Concatenated reversed shortest (x+1,2x)-codes for the positive integers.

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2
Offset: 1

Views

Author

Clark Kimberling, Dec 05 2013

Keywords

Comments

Concatenate the representations of the positive integers in A233137, and then separate the digits by commas.

Examples

			A233137 = (1,2,12,22,122,212,...), so that A233138 = (1,2,1,2,2,2,1,2,2,2,1,2,...)
		

Crossrefs

Programs

  • Mathematica
    b[x_] := b[x] = If[OddQ[x], x - 1, x/2]; u[n_] := 2 - Mod[Drop[FixedPointList[b, n], -3], 2]; u[1] = {1}; t = Table[u[n], {n, 1, 30}]; Table[FromDigits[u[n]], {n, 1, 50}]  (* A233137 *)
    Flatten[t]  (* A233138 *)
    Table[FromDigits[Reverse[u[n]]], {n, 1, 30}]  (* A233135 *)
    Flatten[Table[Reverse[u[n]], {n, 1, 30}]]     (* A233136 *)

A233695 a(n) gives the position of -n in the sequence (or tree) S generated in order by these rules: 0 is in S; if x is in S then x + 1 is in S; if nonzero x is in S then 1/x is in S; if x is in S, then i*x is in S; where duplicates are deleted as they occur.

Original entry on oeis.org

10, 18, 30, 56, 109, 219, 450, 933, 1946, 4071, 8516, 17823, 37310, 78112, 163551, 342461, 717083, 1501509, 3144031, 6583341, 13784976
Offset: 1

Views

Author

Clark Kimberling, Dec 19 2013

Keywords

Comments

It can be proved using the division algorithm for Gaussian integers that S is the set of Gaussian rational numbers: (b + c*i)/d, where b,c,d are integers and d is not 0.
Empirically, it appears that a(n) = A233694(n+2) + 7 for n > 2. It seems clear that positive integers appear for the first time at the start of a new level of the tree. If this is always the case, then the row starting with n will be followed by a row starting n+1, 1/n, ni, followed by a row starting n+2, 1/(n+1), (n+1)i, 1+1/n, n+1, i/(n+1), 1+ni, -i/n, -n. It may be possible to show that of these 9 values, only n+1 has ever appeared before. If so, then -n will always appear exactly 7 places after n + 2 in the sequence. - Jack W Grahl, Aug 10 2018

Examples

			The first 16 numbers generated are as follows:  0, 1, 2, i, 3, 1/2, 2 i, 1 + i, -i, -1, 4, 1/3, 3 i, 3/2, i/2, 1 + 2 i. -1 appears in the 10th place, so a(1) = 10.
		

Crossrefs

Programs

  • Mathematica
    Off[Power::infy]; x = {0}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, x + 1, 1/x, I*x} /. ComplexInfinity -> 0]]], {18}]; On[Power::infy]; t1 = Flatten[Position[x, _?(IntegerQ[#] && NonNegative[#] &)]]   (*A233694*)
    t2 = Flatten[Position[x, _?(IntegerQ[#] && Negative[#] &)]] (* A233695 *)
    t = Union[t1, t2]  (* A233696 *)
    (* Peter J. C. Moses, Dec 21 2013 *)

Extensions

More terms by Jack W Grahl, Aug 10 2018
Previous Showing 11-20 of 41 results. Next