Study of the reaction n + d → 3He + π− from 400 to 580 MeV