The (d, n) reaction on 24Mg and 28Si