OFFSET
1,2
COMMENTS
This is a permutation of the integers > 0.
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..20001
EXAMPLE
The sequence S starts with 1,2,3,6,9,18,4,5,10,7,14,8,11,...
a(1) = 1 by construction.
a(2) = 2 as 2 is the smallest available integer divisible by 1 (this 1 being the last odd digit of S).
a(3) = 3 as 3 is the smallest available integer divisible by 1 (this 1 being the last odd digit of S).
a(4) = 6 as 6 is the smallest available integer divisible by 3 (this 3 being the last odd digit of S).
a(5) = 9 as 9 is the smallest available integer divisible by 3 (this 3 being the last odd digit of S).
a(6) = 18 as 18 is the smallest available integer divisible by 9 (this 9 being the last odd digit of S).
a(7) = 4 as 4 is the smallest available integer divisible by 1 (this 1 being the last odd digit of S).
a(8) = 5 as 5 is the smallest available integer divisible by 1 (this 1 being the last odd digit of S).
a(9) = 10 as 10 is the smallest available integer divisible by 5 (this 5 being the last odd digit of S).
...
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Nov 09 2019
STATUS
approved