\(\gcd((p+1)/2,~p-1) = ?\) \(p\) is an odd prime
what is the GCD algorithm
wolfram says the answer is always either 2 or 1 http://www.wolframalpha.com/input/?i=Table%5Bgcd%28%28p%2B1%29%2F2%2C+p-1%29%2C+%7Bp%2C3%2C13%7D%5D
gcd(a, b) = gcd(a-b, b) = gcd(a, b-a)
i have been messing with that but no success..
1/2, 2, 1/2, 1
okay (p+1)/2 = p/2 + 1/2, and p-1 = 2*(p/2 - 1/2)
|dw:1440466619213:dw|
i think showing this pattern recurring is better
we can show that all oodds will be 1 and 2 repeating
let p=2n+1
GCD((2n+1)+1)/2,2n-1)
\(p\) is given as an odd prime so..
if we show this happens to all odd numbers then we can atleast say it happens to all odd primes, the patternn of the 1s and 2s might be random
GCD((2n+1)+1)/2,2n-1) = 1 or 2 in fact we can evn do 1 step better by changing n=2k and 2k+1
to show every 2nd add is 2 and every 1st odd is 1
Oh! for odd numbers also it is giving 1 or 2 didn't notice before.. interesting..
right
oops i mean (2n-1)-1
|dw:1440467089588:dw|
Join our real-time social learning platform and learn together with your friends!