# Odd Squares 7 Less than Nearest Power of 2

## Theorem

There exist exactly $3$ odd squares which are $7$ less than the nearest power of $2$:

$5^2 = 25 = 2^5 - 7$
$11^2 = 121 = 2^7 - 7$
$181^2 = 32 \, 761 = 2^{15} - 7$

Note that this sequence includes $1$ and $3$, being all the squares which are $7$ less than a power of $2$.

However, for $1$ and $3$, those powers ($8$ and $16$ respectively) are not the nearest power of $2$ ($1$ and $4$ respectively).

## Sources

• 1992: F. BeukersOn the generalized Ramanujan-Nagell equation I (Acta Arith. Vol. 38: pp. 389 – 410)