Dynamically induced effective interaction in periodically driven granular mixtures