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
Jean-Marc Falcoz, Table of n, a(n) for n = 1..10001
EXAMPLE
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Jan 07 2019
STATUS
approved