Code-driven Number Sequence Calculation: Enhancing the inductive Reasoning Abilities of Large Language Models