On the ground states of the Bernasconi model