Exploring Mathematical Extrapolation of Large Language Models with Synthetic Data