Problem #215
Go for Gold
Sparky is yet again being accused of being a robot. He needs to solve this question to prove his innocence.
Given a number x and has defined the following functions:
p(x) = x!
s(x) = 1+2+3+ ... +x
Find the value of p(x) mod s(x) for x = 10^9+6
Hint: 10^9+7 is a prime number