Exploring the Mystery of Influential Data for Mathematical Reasoning