Longitudinal optical binding of several spherical particles studied by the coupled dipole method