Question: A room is lit by $2$ bulbs. Bulbs are replaced only when both bulbs burn out. Lifetimes of bulb's are i.i.d exponentially distributed with parameter $λ=1$. What fraction of the time is the room only half-lit?

Answer: 
A bit of culture, Gauss proved that a prime $p \equiv 1 \pmod 4$ can be written as $p = x^2 + 64 y^2$ if and only if $2$ is a fourth power $\pmod p.$ That is, if and only if there is some integer $t \neq 0 \pmod p$ such that
$$ t^4 \equiv 2 \pmod p. $$

For your problem, you can reduce the exponent to $(p-1)/ 4,$ as
$$ 2^{(p-1)/ 4} \equiv \left( t^4 \right)^{(p-1)/ 4} \equiv t^{p-1} \equiv 1 \pmod p. $$

The first few such primes (ignore the initial $1$) are

```
      1,     73,     89,    113,    233,    257,    281,    337,    353,    577,
    593,    601,    617,    881,    937,   1033,   1049,   1097,   1153,   1193,
   1201,   1217,   1249,   1289,   1433,   1481,   1553,   1601,   1609,   1721,
   1753,   1777,   1801,   1889,   1913,

```

For example, $18^4 \equiv 2 \pmod {73}.$ $5^4 \equiv 2 \pmod {89}.$ $27^4 \equiv 2 \pmod {113}.$
First observe that $p \neq 2$. If $p=2$ then $a^2 \equiv 0 \mod 2$ and so $a^2$ and hence $a$ must be divisible by 2. But that implies that $a^2$ is divisble by 4 and since $64b^2$ also is, $p$ must be divisble by 4 and cannot be equal to 2. 

Now use a consequence of Fermat's little theorem that says that $a^{p-1} \equiv 1 \pmod p$ for a prime $p$ and a number $a$ that is not divisble by $p$ and rewrite the expression:

$2^{\frac{p^2-1}{4}}=(2^{p-1})^{\frac{p+1}{4}}\equiv 1^{\frac{p+1}{4}}=1 \mod p.$