The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
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.
LINKS
EXAMPLE
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.
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 *)
CROSSREFS
Sequence in context: A183084 A185975 A232639 * A023826 A283192 A369282
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Nov 28 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 11 12:55 EDT 2024. Contains 373311 sequences. (Running on oeis4.)