Solution (source code)

= Solution

The <infinite square well> has <energy levels> $E_n=n^2h^2/(8m_eL^2)$, with $n=1,2,\ldots$. The longest absorption <wavelength> corresponds to the smallest available <energy> difference from the <ground state>, namely $n=1\to2$. Its <position> <matrix element> is nonzero because the two states have opposite <parity> about the center of the well, so it is an allowed <electric dipole transition>.

Equating the <photon> <energy> to this gap gives
$$
\frac{hc}{\lambda}=E_2-E_1=\frac{3h^2}{8m_eL^2},\qquad \boxed{L=\sqrt{\frac{3h\lambda}{8m_ec}}=8.53\times10^{-10}\,\mathrm m=0.853\,\mathrm{nm}.}
$$
Here the <photon> gap is approximately $1.55\,\mathrm{eV}$, not the <ground-state energy> itself.