login
A323204
A variant of the Syracuse-like routine visible in A323175, avoiding duplicates (and loops). See the Comments section.
2
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 32, 33, 34, 35, 36, 37, 74, 75, 76, 77, 78, 79, 98, 99, 100, 101, 102, 103, 302, 303, 304, 305, 306, 307, 704, 705, 706, 707, 708, 709, 908, 909, 910, 911, 120, 121, 122, 123, 124, 125, 126, 127, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 338, 339, 340, 341, 342, 343
OFFSET
1,2
COMMENTS
Here is the original 4-step routine:
(1) Start with any integer > 0
(2) Add 1 and print
(3) If the result is a composite number go to (2), otherwise go to (4)
(4) Reverse the digits of the result and go to (2)
In this variant, if the above routine produces a duplicate, we replace this duplicate with the smallest integer not yet present in the sequence, print it and go to the instruction (2).
This sequence is a permutation of the positive integers.
LINKS
EXAMPLE
This sequence differs from A323175 by construction as A323175 is finite, ending with a(143) = 809; this sequence shares the same 143 first terms, then a(144) = 14 (as 14 is the smallest integer not yet present in the sequence), etc.
CROSSREFS
Cf. A323175 (the original Syracuse-like routine explained).
Sequence in context: A032948 A132031 A323175 * A072763 A057846 A055647
KEYWORD
base,nonn
AUTHOR
STATUS
approved