**Lucky Modulus Number**

I’ll start this challenge with a small example.

A list of the first three prime numbers is [2, 3, 5].

A ‘Lucky Modulus Number’ is here defined as the smallest number, N, for which

N % p = p – 1 for all p in the prime list.

In this case N = 29 because

29 % 2 = 1 = 2 – 1 29 % 3 = 2 = 3 – 1 29 % 5 = 4 = 5 – 1 _____^_______^____ p in prime list

Now, as the prime list grows longer, the value of N quickly increases. It is impractical for humans to handle numbers with really many digits, so we report the digit sum i.e. the sum of the individual digits in the result.

The digit sum of 29 is 2 + 9 = 11

The task in this challenge is to find the digit sum of the Lucky Modulus Number of all primes < P

Please report the result for P = 30 and P = 1000

It is ok to report the result quickly. However, in order not to spoil the fun for others, please hold back your code or structural considerations until June 13, 2019.

This is meant to be a totally friendly competition – possibly with some learning….