MathTop

harmonic 函数

返回第 n 个调和数;提供 m 时返回 m 阶广义调和数。

语法

  • harmonic(n)
  • harmonic(n, m)

参数与选项

n正整数索引。
m可选非负阶数;默认值为 1。

示例

  1. 调和数harmonic(4)返回 25/12。
  2. 广义调和数harmonic(5, 2)返回 5269/3600。