An unknowably odd function This challenge initially appeared in this challenge  as a an extra brain teaser.  I am posting it with permission from the original author so that we can have a formal competition.



Your task here will be to implement a function1 that forms a permutation on the positive integers.  This means that each positive integer should be the output of calling the function with exactly one positive integer.

In the earlier challenge we calculated the odd probability for such sequences.  We defined it as so:

If we have a function \$f\$ the probability of a number being odd will be defined as the limit of ratio odd members of the set to the size of the set \$f\{1\dots n\}\$ as \$n\$ tends towards infinity.

$$\lim_{n\rightarrow \infty}\dfrac{\left|\{x : x \in \{1\dots n\}, \mathrm{odd}(f(x))\}\right|}{n}$$

Your task is to write a function with no defined odd probability.  That is a function \$f\$ for which the above limit does not converge.



This is code-golf so answers will be scored in bytes with less bytes being better.



1: Here function will mean program or function.  It is just a piece of code that takes input and produces output.
JavaScript (ES7),  33  29 bytes
This is A307485: one odd, two even, four odd, eight even, etc.
n=&gt;n-~n-(4&lt;&lt;Math.log2(n))/3|0

Try it online!
For \$n\in\mathbb{N}^*\$, this is equivalent to:
$$a(n)=2n+1-\left\lceil\frac{2^{\lfloor log_2 n\rfloor+2}}{3}\right\rceil$$
It produces the sequence:
1
2 4
3 5 7 9
6 8 10 12 14 16 18 20
...

The ratio of odd values is 'bouncing' ad infinitum between \$1/3\$ and \$2/3\$, more and more slowly: