...

/

Challenge: Arithmetic Sequence

Challenge: Arithmetic Sequence

Find the index of an outlier in an arithmetic sequence.

Task

This task requires you to find the index of the first outlier in a given list. All numbers in a list are in an arithmetic sequence, except one number.

Write a program that uses a list and finds the index of the first outlier and stores it to the variable idx. The list is guaranteed to have at least 55 elements and the first two elements will be in the required arithmetic sequence. The value of the idx should be ...