So, the problem written in the title is what I have in front of me. On seeing the problem, my first shot was to write $31$ as $2^5 - 1$. On expanding further, this is what the expression finally reduced to -
$$ 2^{100}(1 + 2^{92} - 2^{97} + 2^{n-100}) $$
Since $2^{100}$ is a perfect square , we may leave it aside and focus only on the part inside the parenthesis. From here on, I can't see any way out.
Taking a cue from If $2^{2017} + 2^{2014} + 2^n$ is a perfect square, find $n$., I decided to write the expression as
$$ (2^{50} - x)^2$$
which opens as $$2^{100} - 2^{51}x + x^2$$
After this I am looking to compare the respective terms but I am not really getting how to go about it. Any help or any new approach would be appreciated.
Thanks.