10进制里面,7有个特殊的地方。1/7=0.142857循环。2/7=0.285714循环。3/7=0.428571循环。。。。6/7=0.857142循环。
特点:都是142857这几个数字进行loop。
那么,n进制里面k有这个特性,找到n和k?
如果有许多,那么有什么n和k有什么特点?
找进位制和其中特殊数字,使其具有10进制里面7的这个特性,
版主: verdelite, TheMatrix
Re: 找进位制和其中特殊数字,使其具有10进制里面7的这个特性,
my hunch: n > k, gcd(n, k) = 1, k is prime, and n is a primitive mod k (the order of n mod k is k-1).verdelite 写了: 2023年 2月 18日 12:38 10进制里面,7有个特殊的地方。1/7=0.142857循环。2/7=0.285714循环。3/7=0.428571循环。。。。6/7=0.857142循环。
特点:都是142857这几个数字进行loop。
那么,n进制里面k有这个特性,找到n和k?
如果有许多,那么有什么n和k有什么特点?
持仓抄底锁利,你钱你定
看牛观猪喊熊,自娱自乐
股市变幻莫测,不作不死
赌途曲折无常,吃枣药丸
看牛观猪喊熊,自娱自乐
股市变幻莫测,不作不死
赌途曲折无常,吃枣药丸
Re: 找进位制和其中特殊数字,使其具有10进制里面7的这个特性,
I don't think we need the condition n > k. So my best guess (for a sufficient and necessary condition) is that k is a prime number and n is a primitive root mod k.YWY 写了: 2023年 2月 18日 16:47 my hunch: n > k, gcd(n, k) = 1, k is prime, and n is a primitive mod k (the order of n mod k is k-1).
持仓抄底锁利,你钱你定
看牛观猪喊熊,自娱自乐
股市变幻莫测,不作不死
赌途曲折无常,吃枣药丸
看牛观猪喊熊,自娱自乐
股市变幻莫测,不作不死
赌途曲折无常,吃枣药丸
Re: 找进位制和其中特殊数字,使其具有10进制里面7的这个特性,
这其实就是长除法的本质:在n进制下,当我们算1/k的小数表达时,第一步的余数是n^1 mod k,第二步的余数是n^2 mod k,第i步的余数是n^i mod k。YWY 写了: 2023年 2月 18日 18:30 I don't think we need the condition n > k. So my best guess (for a sufficient and necessary condition) is that k is a prime number and n is a primitive root mod k.
If k is a prime and n is a primitive root mod k, then it takes precisely k-1 steps for us to get 1 as the remainder. Moreover, within these k-1 steps, each number from 1 to k-1 must appear as the remainder at precisely one of these k-1 steps. So when we do i/k with 0 < i < k, the remainders follow the same sequence except that the starting values are different. Once we understand the above, we should see that the condition is also necessary.
当n < k时,上面的关于remainder的结论依然正确,但下一步做长除得到的商却不和remainder一一对应(不同的remainder可能得到同样的商)。我刚算了3进制下的1/7(用3进制写就是1/21),得到的商用3进制写是1/21=0.010212010212……,2/21=0.0212010212……,10/21=0.10212010212……。如果大家认为这种情况不符合条件,那就额外加上n > k的条件。
持仓抄底锁利,你钱你定
看牛观猪喊熊,自娱自乐
股市变幻莫测,不作不死
赌途曲折无常,吃枣药丸
看牛观猪喊熊,自娱自乐
股市变幻莫测,不作不死
赌途曲折无常,吃枣药丸