Using machine learning to solve number series problems