You are given numbers A0, X, Y, M and n.
Generate a list A of length n according to the following recurrence relation:
Return the minimal absolute difference between any two elements of A.
|-||A0, X, Y, M will each be between 1 and 10000, inclusive.|
|-||n will be between 2 and 10000, inclusive.|