Menu Close

For-each-positive-integer-n-consider-the-highest-common-factor-h-n-of-the-two-numbers-n-1-and-n-1-For-n-lt-100-find-the-largest-value-of-h-n-




Question Number 21230 by Tinkutara last updated on 16/Sep/17
For each positive integer n, consider  the highest common factor h_n  of the two  numbers n! + 1 and (n + 1)!. For n < 100,  find the largest value of h_n .
Foreachpositiveintegern,considerthehighestcommonfactorhnofthetwonumbersn!+1and(n+1)!.Forn<100,findthelargestvalueofhn.
Answered by dioph last updated on 17/Sep/17
as the numbers from 2 until n do not  divide n!+1, h_n  is either 1 or n+1.  h_n =n+1 ⇔ n!+1=k(n+1)  ⇔ n! ≡ −1 (mod n+1)  using Wilsons theorem, this happens  only when n+1 is prime.  The last prime before 100 is 97 so  for 96!+1 and 97! we have h_n =97
asthenumbersfrom2untilndonotdividen!+1,hniseither1orn+1.hn=n+1n!+1=k(n+1)n!1(modn+1)usingWilsonstheorem,thishappensonlywhenn+1isprime.Thelastprimebefore100is97sofor96!+1and97!wehavehn=97
Commented by Tinkutara last updated on 17/Sep/17
How do you used Wilson′s theorem?
HowdoyouusedWilsonstheorem?

Leave a Reply

Your email address will not be published. Required fields are marked *