Mid-Square with all bits set Is there a positive 128-bit integer whose square has all middle bits equal to 1?
(The "middle bits" are naturally the 65th bit through the 192nd bit, defining
the 1st bit as the least significant bit of the full integer.)
 A: I'd like to point out why the case of middle bits being all ones is somewhat special and different from other fixed values of them. Also, there is an approach for finding a suitable numbers that may not exist for other fixed values of middle bits.
I'll use the notation of Kevin and additionally require that $m$ is even, say, $m=2k$ (in OP's question we have $m=64$ and $k=32$).
We need to find integers $x,y$ such that $0\leq x,y<2^m$ and 
$$x\cdot 2^{3m} + (2^{3m}-2^m) + y=z^2$$
for some integer $z$. In other words, we have
$$0<(x+1) - \frac{z^2}{2^{3m}} = \frac{(2^m-y)}{2^{3m}} < \frac{1}{2^{2m}}.$$
Factoring the l.h.s. as $(\sqrt{x+1}-\frac{z}{2^{3k}})(\sqrt{x+1}+\frac{z}{2^{3k}})$ and noticing that the latter factor is at least 2 (for $x>0$), we get
$$0<\sqrt{x+1} - \frac{z}{2^{3k}} < \frac{1}{2^{4k+1}}.$$
This tells us that $\frac{z}{2^{3k}}$ is a very good rational approximation to $\sqrt{x+1}$. 
The above analysis may suggest to search for $\frac{z}{2^{3k}}$ among convergents and semiconvergents to a square root of an integer. We can base this search on two facts:


*

*A continued fraction for a square root has special forms: $[a;\overline{2a}]$, $[a;\overline{b,2a}]$, $[a;\overline{b,b,2a}]$, $[a;\overline{b,c,b,2a}]$, $[a;\overline{b,c,c,b,2a}]$, etc.

*Denominators of (semi)convergents satisfy a simple recurrence relation (involving terms of the continued fraction). 


So, for each of the above continued fractions, we may to try find values of $a,b,c,\dots$ such that $2^t$ with $t\leq 3k$ appears among the denominators of (semi)convergents, from which will further get $z$ (as the numerator times $2^{3k-t}$) and hopefully solve the problem.
Remarks. 


*

*Values $t\leq 2k$ may work only for convergents, not semiconvergents (the rational approximation in this case becomes so good that only convergents may satisfy it).

*There is a number of underwater stones here such as (i) not every set of values $a,b,c,\dots$ guarantee that we have a a continued fraction of the square root of an integer (in general, it's the square root of a rational); (ii) semiconvergents may not guarantee that the approximation is well enough for our purposes; etc. 

