← RoseCodeROSECODE / 511Bell Numbers Modulo FactorialMin_25 · Math · 2018-09-06Let B(n) be the n-th Bell number, which can be computed as B(0)=1 and Bn+1=∑k=0n(nk)Bk for n≥0. For example, B(5)=52 and B(10)=115975. Let f(N,M):=B(N)modM. You can verify that f(5,24)=4, f(10,8!)=35335 and f(104,12!)=82759235. Find f(107,30!)mod(109+7).