Up to a(13) all the terms are of the form floor(sqrt(2^k-1)) for some k. - Giovanni Resta, Jan 07 2019
The terms are numbers of the form floor(sqrt(2^(2k-1))) that are larger than 1/2 + sqrt(1/4 + 2^(2k-1) - 2^k) for some k > 0.
Theorem: if x is a term, then it is of the form floor(sqrt(2^(2k-1))) for some k > 0. In addition, floor(sqrt(2^(2k-1))) is a term if and only if it is larger than 1/2 + sqrt(1/4 + 2^(2k-1) - 2^k).
Proof: suppose x has k bits in its binary representation, i.e., 2^(k-1) <= x < 2^k. Then x^2 has either 2k-1 or 2k bits.
First we show that if x is a term of the sequence, then x^2 has 2k-1 bits. Suppose x^2 has 2k bits, i.e., x^2 >= 2^(2k-1). Then 2^2k - 1 - x^2 < 2^k - 1 - x. This is rearranged as x^2 - x + 2^k - 2^2k > 0. Solving this quadratic inequality leads to x > 2^k which contradicts the fact that x has k bits.
Thus x^2 < 2^(2k-1) and 2^(2k-1) - 1 - x^2 < 2^k - 1 - x. Solving this inequality and combining it with x < sqrt(2^(2k-1)) shows that x must satisfy sqrt(2^(2k-1)) > x > 1/2 + sqrt(1/4 + 2^(2k-1) - 2^k).
To complete the proof, we need to show that for each k, there is at most one integer satisfying this inequality. This is easily verified for k = 1. Assume that k > 1. Let a = sqrt(2^(2k-1)) and b = 1/2 + sqrt(1/4 + 2^(2k-1) - 2^k).
Using the identity sqrt(x) - sqrt(y) = (x-y)/(sqrt(x)+sqrt(y)) it follows that a-b = -1/2 + (2^k - 1/4)/(sqrt(2^(2k-1))+sqrt(1/4 + 2^(2k-1) - 2^k) < -1/2 + 2^k/(sqrt(2^(2k-1)) + sqrt(2^(2k-1)-2^k)).
Since k >= 2, sqrt(2^(2k-1)-2^k) = sqrt(2^(2k-1)(1-2^(1-k))) >= sqrt(1/2)*sqrt(2^(2k-1)). This implies that a-b < -1/2 + 2^k/((1+sqrt(1/2))*(sqrt(2^(2k-1)))) = 2*sqrt(2)/(sqrt(2)+1) - 1/2 < 0.672. This implies that there is at most one integer between b and a.
The above discussion also provides another characterization of the sequence. floor(sqrt(2^(2k-1))) is a term if and only if sqrt(2^(2k-1))-floor(sqrt(2^(2k-1))) < a-b where a-b is as defined above.
The criterion can be simplified as:
floor(sqrt(2^(2k-1))) is a term if and only if it is larger than 1/2 + sqrt(1/4 + 2^(2k-1) - 2^k). This concludes the proof.
Note that a-b -> 0.5 as k -> oo, i.e., for large k, the fractional part of sqrt(2^(2k-1)) should be less than about 0.5 in order for the integer part to be a term.
(End)
|