MathTop

ith_fermat 函数

返回第 n 个 Fermat 数;指定 output = prime 时返回素性判断。

语法

  • IthFermat(n)
  • IthFermat(n, output = prime)
  • ith_fermat(n)

参数与选项

n非负索引。
output可选输出模式;prime 返回素性判断。

示例

  1. Fermat 数值IthFermat(4)返回 65537。
  2. 素性判断IthFermat(5, output = prime)返回 false。