At least you got this in i-land

Find the smallest prime factor p > 3 p> 3 of 200 ! + 200 ! ! + 2 ! ! ! + 1 200!+200!!+2!!!+1 .

Review double factorials and multifactorials to understand what 200 ! ! 200!! and 2 ! ! ! 2!!! refers to.


The answer is 227.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Mehdi K.
Jun 8, 2016
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
>>> def mf(n, k):     #multi-factorial
...     if n <= k: return n
...     return n * mf(n - k, k)
... 
>>> a = mf(200, 1) + mf(200, 2) + 3      #2!!! = 2
>>> p = 5
>>> while True:
...     if a % p == 0:
...         print(10001 * p)
...         break
...     p += 2
... 
2270227

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...