gpt4 book ai didi

algorithm - 需要数论优化

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:31:50 28 4
gpt4 key购买 nike

给定一个整数 n,找到满足 φ(x) = n 的最小整数 x。

(10^5 < n < 10^8)

我知道搜索的下限是n+1,上限是

n/((pow(e,0.577)*log(log(n))) + (3.0/(log(log(n)))))

能否请您提供任何其他方法来做同样的事情。

谢谢。

最佳答案

您的问题已迁移到 stackexchange Mathematica。请参阅 Maxim Rytin 的 Mathematica 实现 invphi.nb,网址为 http://library.wolfram.com/infocenter/MathSource/696/。 .此代码可轻松处理范围内的整数 n。

另请参阅 Bressoud 和 Wagon 编写的计算数论类(class)中的第 3 章。

关于algorithm - 需要数论优化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14043133/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com