So, I read this question, thought hmm, this is a pretty mathematical question, maybe from my league. Then I spent so much time thinking about it, that I really think I have the answer: no function can satisfy the criteria that f (n) and 1 are non-periodic for consecutive values โโof n.
I hope someone will tell me how ridiculous my reasoning is, but until then I think itโs right.
Here: Any binary integer n can be represented as 1 ... 0 or 1 ... 1, and only the least significant bit of this bitmap will affect the result of n and 1. Next, the next consecutive integer n + 1 will always contain the opposite least significant bit. Thus, it is obvious that any series of consecutive integers will have period 2 when passing the functions n and 1. So, is there any function f (n) that will suffice to distribute a series of consecutive integers, so that periodicity is excluded?
Any function f (n) = n + c fails, since c must end with either 0 or 1, so the LSB will either flip over or remain unchanged depending on the chosen constant.
The above also excludes subtraction for all trivial cases, but I have not yet found time to analyze the transfer behavior, so there might be a crack.
Any function f (n) = c * n fails because LSB will always be 0 if c ends with 0 and will always be equal to LSB n if c ends with 1.
Any function f (n) = n ^ c fails, by similar reasoning. The power function will always have the same LSB as n.
Any function f (n) = c ^ n fails for the same reason.
The unit and module were a little less intuitive for me, but basically LSB of any of the options is ultimately determined by subtraction (already excluded). The module will also obviously have a period equal to the divisor.
Unfortunately, I do not have the rigor needed to prove this, but I believe that any combination of the above operations will also ultimately fail. This makes me think that we can exclude any transcendental function, because they are implemented using polynomials (the Taylor series is not a terminological guy).
Finally, I gave up hope of traveling by train home, believing that the bit would work; however, in reality it is also a periodic function. The way I thought about this is to take the sum of the digits of any decimal number. This amount will obviously work from 0 to 9, then reset to 1, start from 1 to 10, and then drop to 2 ... This has a period, the range just keeps changing higher, the higher we calculate. In fact, we can do the same for the sum of binary digits, and in this case we get something like: 0,1,1,2,2, ... 5,5,6,6,7,7,8 , 8....
I left nothing?
TL DR I do not think your question has an answer.