Array following an arithmetic or geometric sequence
Description - For this challenge you will determine if numbers within an array follow an arithmetic or geometric sequence.
I'm working my way through all the challenges in coderbyte and the time for a question has arised, so i'd pick one for the mathematically non-challenged out there, but i have some requirements for the answer that you provide.
My current problem is basically the lack of math skills. and i have a challenging learning disability alongside this. i can learn just about anything, but if i don't grasp the basics and the framwork around a solution i really don't understand jack shit.
I know the structure and understand the difference between the two arrays, and i know in my head how i can check for the different types of sequences, but i REALLY would like for once to understand the actual thought pattern that lies behind the mathematical equation used to solve the two different sequences.
2 + 5 + 8 + 11 + 14
i know that this line has an arithmetic progression, but how the heck do you check for it through a code by applying the "equation" that goes along with it?
Looking at the actual equation behind this when googling gives me the urge of headbanging a pencil.
I would like to understand how to solve the equation outside of coding and then be able to apply this through code.
Please stay away from mathematical terms, i love the thought of apples and cake! xD