  This note is concerned with the set of integral solutions of the equation
$x^2+3y^2=12n+4$, where $n$ is a positive integer. We will describe a
parametrization of this set using the 3-core partitions of n. In particular we
construct a crank using the action of a suitable subgroup of the isometric
group of the plane that we connect with the unit group of the ring of
Eisenstein integers. We also show that the process goes in the reverse
direction: from the solutions of the equation and the crank, we can describe
the 3-core partitions of n. As a consequence we describe an explicit bijection
between $3$-core partitions and ideals of the ring of Eisenstein integers,
explaining a result of G. Han and K. Ono obtained using modular forms.
