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,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.
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
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).
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 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Nov 28 2013
STATUS
approved