  We prove a conjecture of Maulik, Pandharipande, and Thomas expressing the
Gromov--Witten invariants of K3 surfaces for divisibility two curve classes in
all genus in terms of weakly holomorphic quasimodular forms of level two. Then,
we establish the holomorphic anomaly equation in divisibility two in all genus.
Our approach involves a refined boundary induction, relying on the top
tautological group of the moduli space of smooth curves, together with a
degeneration formula for reduced virtual fundamental class with imprimitive
curve classes. We use the double ramification relations with target variety as
a new tool to prove the initial condition. The relationship between the
holomorphic anomaly equation for higher divisibility and the conjectural
multiple cover formula of Oberdieck and Pandharipande is discussed in detail
and illustrated with several examples.
