سلام

Problem : Use Wilson's theorem (n is prime if and only if a divisor of (n-1)!+1), Newton's binomial theorem, and the divide-and-conquer technique to design an algorithm capable of deciding in a time in the order of logn, give an integer n, whether or not n is prime.

این طور که من از این مسئله متوجه شدم باید الگوریتمی طراحی کنیم که با استفاده از تئوری ویلسون و دوجمله ای نیوتن ،اول بودن اعداد را بررسی کنیم در زمان مصرفی Logn.

اگر در این رابطه می تونید کمکم کنید ممنون می شم.