新的快速方法来计算质数小于给定值的数量

G. R. P. Teruel
{"title":"新的快速方法来计算质数小于给定值的数量","authors":"G. R. P. Teruel","doi":"10.37863/umzh.v74i9.6193","DOIUrl":null,"url":null,"abstract":"<jats:p>\n\n\nUDC 519.688\n\n\n\nThe paper describes new fast algorithms for evaluating <mml:math>\n<mml:mrow>\n\t<mml:mi>π</mml:mi>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n</mml:mrow>\n</mml:math> inspired by the harmonic and geometric mean integrals that can be used on any pocket calculator.  In particular, the formula <mml:math>\n<mml:mrow>\n\t<mml:mi>h</mml:mi>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n</mml:mrow>\n</mml:math> based on the harmonic mean is within <mml:math>\n<mml:mrow>\n\t<mml:mo>≈</mml:mo>\n\t<mml:mn>15</mml:mn>\n</mml:mrow>\n</mml:math> of the actual value for <mml:math>\n<mml:mrow>\n\t<mml:mn>3</mml:mn>\n\t<mml:mo>≤</mml:mo>\n\t<mml:mi>x</mml:mi>\n\t<mml:mo>≤</mml:mo>\n\t<mml:mn>10000.</mml:mn>\n</mml:mrow>\n</mml:math> The approximation verifies the inequality, <mml:math>\n<mml:mrow>\n\t<mml:mi>h</mml:mi>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n\t<mml:mo>≤</mml:mo>\n\t<mml:mstyle mathvariant=\"normal\">\n\t\t<mml:mi>L</mml:mi>\n\t\t<mml:mi>i</mml:mi>\n\t</mml:mstyle>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n</mml:mrow>\n</mml:math> and, therefore, is better than <mml:math>\n<mml:mrow>\n\t<mml:mstyle mathvariant=\"normal\">\n\t\t<mml:mi>L</mml:mi>\n\t\t<mml:mi>i</mml:mi>\n\t</mml:mstyle>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n</mml:mrow>\n</mml:math> for small <mml:math>\n<mml:mrow>\n\t<mml:mi>x</mml:mi>\n\t<mml:mo>.</mml:mo>\n</mml:mrow>\n</mml:math>  We show that <mml:math>\n<mml:mrow>\n\t<mml:mi>h</mml:mi>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n</mml:mrow>\n</mml:math> and their extensions are more accurate than other famous approximations, such as Locker–Ernst's or Legendre's also for large <mml:math>\n<mml:mrow>\n\t<mml:mi>x</mml:mi>\n\t<mml:mo>.</mml:mo>\n</mml:mrow>\n</mml:math>  In addition, we derive another function <mml:math>\n<mml:mrow>\n\t<mml:mi>g</mml:mi>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n</mml:mrow>\n</mml:math> based on the geometric mean integral that employs <mml:math>\n<mml:mrow>\n\t<mml:mi>h</mml:mi>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n</mml:mrow>\n</mml:math> as an input, and allows one to significantly improve the quality of this method.  We show that <mml:math>\n<mml:mrow>\n\t<mml:mi>g</mml:mi>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n</mml:mrow>\n</mml:math> is within <mml:math>\n<mml:mrow>\n\t<mml:mo>≈</mml:mo>\n\t<mml:mn>25</mml:mn>\n</mml:mrow>\n</mml:math> of the actual value for <mml:math>\n<mml:mrow>\n\t<mml:mi>x</mml:mi>\n\t<mml:mo>≤</mml:mo>\n\t<mml:mn>50000</mml:mn>\n</mml:mrow>\n</mml:math> (to compare <mml:math>\n<mml:mrow>\n\t<mml:mstyle mathvariant=\"normal\">\n\t\t<mml:mi>L</mml:mi>\n\t\t<mml:mi>i</mml:mi>\n\t</mml:mstyle>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n</mml:mrow>\n</mml:math> lies within <mml:math>\n<mml:mrow>\n\t<mml:mo>≈</mml:mo>\n\t<mml:mn>40</mml:mn>\n</mml:mrow>\n</mml:math> for the same range) and asymptotically <mml:math>\n<mml:mrow>\n\t<mml:mi>g</mml:mi>\n\t<mml:mrow>\n\t\t<mml:mo form=\"prefix\">(</mml:mo>\n\t\t<mml:mi>x</mml:mi>\n\t\t<mml:mo form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n\t<mml:mo>∼</mml:mo>\n\t<mml:mstyle scriptlevel=\"0\" displaystyle=\"true\">\n\t\t<mml:mrow>\n\t\t\t<mml:mfrac linethickness=\"1\">\n\t\t\t\t<mml:mi>x</mml:mi>\n\t\t\t\t<mml:mrow>\n\t\t\t\t\t<mml:mi>ln</mml:mi>\n\t\t\t\t\t<mml:mi>x</mml:mi>\n\t\t\t\t</mml:mrow>\n\t\t\t</mml:mfrac>\n\t\t</mml:mrow>\n\t</mml:mstyle>\n\t<mml:mi>exp</mml:mi>\n\t<mml:mrow>\n\t\t<mml:mo rspace=\"0.3em\" lspace=\"0em\" stretchy=\"true\" fence=\"true\" form=\"prefix\">(</mml:mo>\n\t\t<mml:mstyle scriptlevel=\"0\" displaystyle=\"true\">\n\t\t\t<mml:mrow>\n\t\t\t\t<mml:mfrac linethickness=\"1\">\n\t\t\t\t\t<mml:mn>1</mml:mn>\n\t\t\t\t\t<mml:mrow>\n\t\t\t\t\t\t<mml:mi>ln</mml:mi>\n\t\t\t\t\t\t<mml:mi>x</mml:mi>\n\t\t\t\t\t\t<mml:mo>-</mml:mo>\n\t\t\t\t\t\t<mml:mn>1</mml:mn>\n\t\t\t\t\t</mml:mrow>\n\t\t\t\t</mml:mfrac>\n\t\t\t</mml:mrow>\n\t\t</mml:mstyle>\n\t\t<mml:mo rspace=\"0em\" lspace=\"0.3em\" stretchy=\"true\" fence=\"true\" form=\"postfix\">)</mml:mo>\n\t</mml:mrow>\n\t<mml:mo>.</mml:mo>\n</mml:mrow>\n</mml:math></jats:p>","PeriodicalId":163365,"journal":{"name":"Ukrains’kyi Matematychnyi Zhurnal","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-11-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"New fast methods to compute the number of primes less than a given value\",\"authors\":\"G. R. P. Teruel\",\"doi\":\"10.37863/umzh.v74i9.6193\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<jats:p>\\n\\n\\nUDC 519.688\\n\\n\\n\\nThe paper describes new fast algorithms for evaluating <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>π</mml:mi>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n</mml:mrow>\\n</mml:math> inspired by the harmonic and geometric mean integrals that can be used on any pocket calculator.  In particular, the formula <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>h</mml:mi>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n</mml:mrow>\\n</mml:math> based on the harmonic mean is within <mml:math>\\n<mml:mrow>\\n\\t<mml:mo>≈</mml:mo>\\n\\t<mml:mn>15</mml:mn>\\n</mml:mrow>\\n</mml:math> of the actual value for <mml:math>\\n<mml:mrow>\\n\\t<mml:mn>3</mml:mn>\\n\\t<mml:mo>≤</mml:mo>\\n\\t<mml:mi>x</mml:mi>\\n\\t<mml:mo>≤</mml:mo>\\n\\t<mml:mn>10000.</mml:mn>\\n</mml:mrow>\\n</mml:math> The approximation verifies the inequality, <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>h</mml:mi>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n\\t<mml:mo>≤</mml:mo>\\n\\t<mml:mstyle mathvariant=\\\"normal\\\">\\n\\t\\t<mml:mi>L</mml:mi>\\n\\t\\t<mml:mi>i</mml:mi>\\n\\t</mml:mstyle>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n</mml:mrow>\\n</mml:math> and, therefore, is better than <mml:math>\\n<mml:mrow>\\n\\t<mml:mstyle mathvariant=\\\"normal\\\">\\n\\t\\t<mml:mi>L</mml:mi>\\n\\t\\t<mml:mi>i</mml:mi>\\n\\t</mml:mstyle>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n</mml:mrow>\\n</mml:math> for small <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>x</mml:mi>\\n\\t<mml:mo>.</mml:mo>\\n</mml:mrow>\\n</mml:math>  We show that <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>h</mml:mi>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n</mml:mrow>\\n</mml:math> and their extensions are more accurate than other famous approximations, such as Locker–Ernst's or Legendre's also for large <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>x</mml:mi>\\n\\t<mml:mo>.</mml:mo>\\n</mml:mrow>\\n</mml:math>  In addition, we derive another function <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>g</mml:mi>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n</mml:mrow>\\n</mml:math> based on the geometric mean integral that employs <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>h</mml:mi>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n</mml:mrow>\\n</mml:math> as an input, and allows one to significantly improve the quality of this method.  We show that <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>g</mml:mi>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n</mml:mrow>\\n</mml:math> is within <mml:math>\\n<mml:mrow>\\n\\t<mml:mo>≈</mml:mo>\\n\\t<mml:mn>25</mml:mn>\\n</mml:mrow>\\n</mml:math> of the actual value for <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>x</mml:mi>\\n\\t<mml:mo>≤</mml:mo>\\n\\t<mml:mn>50000</mml:mn>\\n</mml:mrow>\\n</mml:math> (to compare <mml:math>\\n<mml:mrow>\\n\\t<mml:mstyle mathvariant=\\\"normal\\\">\\n\\t\\t<mml:mi>L</mml:mi>\\n\\t\\t<mml:mi>i</mml:mi>\\n\\t</mml:mstyle>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n</mml:mrow>\\n</mml:math> lies within <mml:math>\\n<mml:mrow>\\n\\t<mml:mo>≈</mml:mo>\\n\\t<mml:mn>40</mml:mn>\\n</mml:mrow>\\n</mml:math> for the same range) and asymptotically <mml:math>\\n<mml:mrow>\\n\\t<mml:mi>g</mml:mi>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t<mml:mo form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n\\t<mml:mo>∼</mml:mo>\\n\\t<mml:mstyle scriptlevel=\\\"0\\\" displaystyle=\\\"true\\\">\\n\\t\\t<mml:mrow>\\n\\t\\t\\t<mml:mfrac linethickness=\\\"1\\\">\\n\\t\\t\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t\\t\\t<mml:mrow>\\n\\t\\t\\t\\t\\t<mml:mi>ln</mml:mi>\\n\\t\\t\\t\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t\\t\\t</mml:mrow>\\n\\t\\t\\t</mml:mfrac>\\n\\t\\t</mml:mrow>\\n\\t</mml:mstyle>\\n\\t<mml:mi>exp</mml:mi>\\n\\t<mml:mrow>\\n\\t\\t<mml:mo rspace=\\\"0.3em\\\" lspace=\\\"0em\\\" stretchy=\\\"true\\\" fence=\\\"true\\\" form=\\\"prefix\\\">(</mml:mo>\\n\\t\\t<mml:mstyle scriptlevel=\\\"0\\\" displaystyle=\\\"true\\\">\\n\\t\\t\\t<mml:mrow>\\n\\t\\t\\t\\t<mml:mfrac linethickness=\\\"1\\\">\\n\\t\\t\\t\\t\\t<mml:mn>1</mml:mn>\\n\\t\\t\\t\\t\\t<mml:mrow>\\n\\t\\t\\t\\t\\t\\t<mml:mi>ln</mml:mi>\\n\\t\\t\\t\\t\\t\\t<mml:mi>x</mml:mi>\\n\\t\\t\\t\\t\\t\\t<mml:mo>-</mml:mo>\\n\\t\\t\\t\\t\\t\\t<mml:mn>1</mml:mn>\\n\\t\\t\\t\\t\\t</mml:mrow>\\n\\t\\t\\t\\t</mml:mfrac>\\n\\t\\t\\t</mml:mrow>\\n\\t\\t</mml:mstyle>\\n\\t\\t<mml:mo rspace=\\\"0em\\\" lspace=\\\"0.3em\\\" stretchy=\\\"true\\\" fence=\\\"true\\\" form=\\\"postfix\\\">)</mml:mo>\\n\\t</mml:mrow>\\n\\t<mml:mo>.</mml:mo>\\n</mml:mrow>\\n</mml:math></jats:p>\",\"PeriodicalId\":163365,\"journal\":{\"name\":\"Ukrains’kyi Matematychnyi Zhurnal\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-11-08\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Ukrains’kyi Matematychnyi Zhurnal\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.37863/umzh.v74i9.6193\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Ukrains’kyi Matematychnyi Zhurnal","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.37863/umzh.v74i9.6193","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

本文描述了一种新的计算π(x)的快速算法,这种算法受调和积分和几何平均积分的启发,可以在任何袖珍计算器上使用。特别是,当3≤x≤10000时,基于谐波平均值的公式h(x)与实际值相差在≈15以内。近似验证了不等式,h(x)≤Li(x),因此,对于小x,比Li(x)更好。我们表明,h(x)及其扩展比其他著名的近似更准确,如Locker-Ernst或Legendre对于大x。此外,我们基于使用h(x)作为输入的几何平均积分推导出另一个函数g(x),并允许显着提高该方法的质量。我们证明,当x≤50000时,g(x)在实际值的≈25以内(相比之下,Li(x)在相同范围内≈40以内),并且渐近地g(x) ~ xlnxexp(1lnx-1)。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
New fast methods to compute the number of primes less than a given value
UDC 519.688 The paper describes new fast algorithms for evaluating π ( x ) inspired by the harmonic and geometric mean integrals that can be used on any pocket calculator.  In particular, the formula h ( x ) based on the harmonic mean is within 15 of the actual value for 3 x 10000.  The approximation verifies the inequality, h ( x ) L i ( x ) and, therefore, is better than L i ( x ) for small x .   We show that h ( x ) and their extensions are more accurate than other famous approximations, such as Locker–Ernst's or Legendre's also for large x .   In addition, we derive another function g ( x ) based on the geometric mean integral that employs h ( x ) as an input, and allows one to significantly improve the quality of this method.  We show that g ( x ) is within 25 of the actual value for x 50000 (to compare L i ( x ) lies within 40 for the same range) and asymptotically g ( x ) x ln x exp ( 1 ln x - 1 ) .
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信