maxarithmeticsequence