OFFSET
1,2
COMMENTS
In other words, a(n) = A000265(n)-th positive integer unused so far.
A permutation of the positive integers.
a(n) = 2n - 1 for odd n, a(n) < 2n - 1 otherwise.
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=6, the highest odd divisor of n is k = 3. The sequence up to that point is 1, 2, 5, 3, 9. The numbers which are not yet in the sequence (in increasing order) are S = 4, 6, 7, 8, 10, ... and the 3rd of these is 7, which is therefore a(6).
MATHEMATICA
Fold[Append[#1, Complement[Range[Max[#1] + (r = #2/2^IntegerExponent[#2, 2])], #1][[r]]] &, {1}, Range[2, 67]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ivan Neretin, Aug 29 2018
STATUS
approved