怎样判断一个较大的数是不是质数?
- 时间:2020-04-08 16:22:25
- 分类:数学世界
- 阅读:135 次
怎样判断一个较大的数是不是质数?同学们已经熟悉了100以内的质数表:2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97。会查表断定一个数是不是质数,但有时需要判定一个较大的数是不是质数。例如:把2995分解质因数,可以借助短除法,

197能否继续往下分解,要看197是不是质数。因为197比100大,所以从100以内的质数表里是查不到了。除了查更大的质数表外,我们介绍一种判断质数的方法。
例如:判断197是不是质数。
根据能被2、3、5、7、11整除的数的特征断定197不能被质数2、3、5、7、11整除,再用13,17,19……去试除:
197÷13=15……2
197÷17=11……10
由于用17去试除时,商11已经比17小,因而可断定197再不可能被比17大的质数整除了。因为,如果197能被17大的质数整除,那么所得的商一定比17小。也就是说197有比17小的质因数。但经过试除知道,比17小的质数都不是197的因数。由此可以肯定197就是质数了。
这种判断方法实际上是试除法。即由小到大的质数一个个地去除,如果发现所给的数能被某一个质数整除,它就是合数;如果除到商比试除的质数小还未能整除,即可断定所给的数就是质数了。
例如:判断167是不是质数。
解:经判断167不能被2、3、5、7、11等质数整除,再用13试除:
167÷13=12……11
因为12<13,此时仍未整除,所以167是质数。
推荐阅读:Microbit Programming: Snake Game with Growing Body and Greedy St How to Make a Simple Snake Game in Javascript? Integration Tests Using PHPUnit to Ensure Your Website is Workin Find Out the Longest Arithmetic Sequence in Array Using Dynamic Find Numbers with Even Number of Digits using the Reduce Functio How to Convert Blogging Leads into Sales 24 Things Your WordPress Form Plugin Can Do Besides Create A Con Blogging and Finance Management: How to Secure Your Financial Fu 9 Easy-to-Use SEO Tips to Boost Your Site’s Visibility Today How to Land Guest Blogging Opportunities in Under an Hour
- 评论列表
-
- 添加评论