莫优非游
幼苗
共回答了24个问题采纳率:87.5% 举报
我们可以分类讨论一下:
如果n是偶数,则m=n/2是偶数,一直循环下去得到的m都是更小的偶数,最后直到2,即得到了例子中的循环;
如果n是奇数,则m=3n-1又是偶数,偶数之后的下一个m还是更小的偶数,最后直到2又即得到了例子中的循环.(不理解,
if n is odd,then m=3n-1,so m0 is even.then the next m1=m0/2 ,m1 is even too and smaller then m0,so do this until we get the smallest even positive integer 2,then the next m equals 1,so we get the circle as showed above.
if n is even ,then m=n/2,so m1 is even ,then the next m2=m1/2,m1 is even too,then do the circle until we get the smallest even positive integer 2,then the next m equals 1,so we get the circle as showed above.
so no cycle can contain a number that is a multiple of three.
1年前
1