Question: Sometimes to fall asleep, I'll count as high as I can, whilst skipping numbers that are not [square-free](https://en.wikipedia.org/wiki/Square-free_integer). I get a little thrill when I get to skip over several numbers in a row - for example, `48,49,50` are all NOT square-free (48 is divisible by 2^2, 49 by 7^2, and 50 by 5^2).

This led me to wondering about the earliest example of adjacent numbers divisible by some arbitrary sequence of divisors.

Input
-----

Input is an ordered list `a = [a_0, a_1, ...]` of strictly positive integers containing at least 1 element.

Output
------

Output is the smallest positive integer `n` with the property that `a_0` divides `n`, `a_1` divides `n+1`, and more generally `a_k` divides `n+k`. If no such `n` exists, the function/program's behavior is not defined.

Test Cases
----------

```
[15] -> 15
[3,4,5] -> 3
[5,4,3] -> 55
[2,3,5,7] -> 158
[4,9,25,49] -> 29348
[11,7,5,3,2] -> 1518

```

Scoring
-------

This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"); shortest result (per language) wins bragging rights. The usual loopholes are excluded.

Answer: 
[Pyth](https://github.com/isaacg1/pyth), 11 bytes
=================================================

```
f!s.e%+kTbQ 

```

[Try it online!](https://tio.run/##K6gsyfj/P02xWC9VVTs7JCnw//9oEx1LHSNTHRPLWAA "Pyth – Try It Online")

---

```
f!s.e%+kTbQ         Full program - inputs list from stdin and outputs to stdout
f                   First number T such that
   .e     Q         The enumerated mapping over the Input Q
      +kT           by the function (elem_value+T)
     %   b          mod (elem_index)
 !s                 has a false sum, i.e. has all elements 0

```
Japt, 10 bytes
==============

Will eventually output `undefined` if no solution exists, if it doesn't crash your browser first.

```
@e_X°vZÃ}a

```

[Try it](https://ethproductions.github.io/japt/?v=1.4.5&code=QGVfWLB2WsN9YQ==&input=WzUsNCwzXQ==)

---

Explanation
-----------

```
               :Implicit input of array U
@       }a     :Loop and output the first integer X that returns true.
 e_    Ã       :For every element Z in U
   X°          :X, postfix increcemnted
     vZ        :Is it divisible by Z?

```