

A232798


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


2



1, 2, 4, 3, 5, 7, 11, 13, 8, 10, 6, 14, 16, 20, 22, 12, 32, 34, 38, 40, 9, 23, 25, 29, 31, 17, 19, 15, 41, 43, 47, 49, 21, 59, 61, 65, 67, 35, 37, 33, 95, 97, 101, 103, 39, 113, 115, 119, 121, 26, 28, 24, 68, 70, 74, 76, 30, 86, 88, 92, 94, 18, 50, 52, 56
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Let S be the sequence (or tree) of numbers defined by these rules: 1 is in S, and if x is in S, then x + 1, 3*x  1, and 3*x + 1 are in S. Then S is a permutation of the positive integers. Deleting duplicates as they occur, the generations of S are given by g(1) = (1), g(2) = (2,4), g(3) = (3,5,7,11,13), etc. Concatenating these gives A232798. The position of n in S gives the inverse permutation of S, as in A232799.


LINKS

Clark Kimberling, Table of n, a(n) for n = 1..4000


EXAMPLE

Each x begets x + 1, 3*x  1 and 3*x + 1, but if any of these has already occurred it is deleted. Thus, 1 begets (2,4); then 2 begets (3,5,7) and 4 begets (11,13), making g(3) = (3,5,7,11,13), etc.


MATHEMATICA

x = {1}; Do[x = DeleteDuplicates[Flatten[Transpose[{x, x + 1, 3 x  1, 3 x + 1}]]], {8}]; x (* A232798 *)
y = Flatten[Table[Position[x, n], {n, 1, 100}]] (* A232799 *)


CROSSREFS

Cf. A232559, A232799.
Sequence in context: A343313 A082006 A277375 * A155850 A134464 A104472
Adjacent sequences: A232795 A232796 A232797 * A232799 A232800 A232801


KEYWORD

nonn,easy


AUTHOR

Clark Kimberling, Nov 30 2013


STATUS

approved



