OFFSET
1,2
COMMENTS
This sequence is, by definition, a permutation of the positive integers.
LINKS
Carole Dubois, Table of n, a(n) for n = 1..5000
EXAMPLE
a(1) = 1, odd, a(2) is thus 1 + 1 = 2;
a(2) = 2, even, thus a(3) = 2 + 2 = 4;
a(3) = 4, even, thus a(4) = 4 + 4 = 8;
a(4) = 8, even, thus a(5) = 8 + 8 = 16;
a(5) = 16, even, thus a(6) = 16 + 6 = 22;
a(6) = 22, even, thus a(7) = 22 + 2 + 2 = 26;
...
a(13) = 70, even, thus a(14) = 70 + 0 = 70 (already in the sequence, thus a(14) = 3 instead, the smallest integer not yet present in the sequence);
a(14) = 3, odd, thus a(15) = 3 + 3 = 6;
a(15) = 6, even, thus a(16) = 6 + 6 = 12;
a(16) = 12, even, thus a(17) = 12 + 2 = 14;
a(17) = 14, even, thus a(18) = 14 + 4 = 18;
a(18) = 18, even, thus a(19) = 18 + 6 = 26 (already in the sequence, thus a(19) = 5 instead, the smallest integer not yet present in the sequence);
a(19) = 5, odd, thus a(20) = 5 + 5 = 10; etc.
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Feb 20 2021
STATUS
approved
