欧拉函数(Euler's totient function,totient)
欧拉函数:不超过 n 且与 n 互素的整数有多少个。
怎么写
totient(n)
- n
- 一个整数。接受一个整数。
示例
totient(10)在求解器中,
在求解器中打开totient(10)的结果是4。
相关函数
- bell_b
第 n 个贝尔数:把 n 个物品分成若干组的方法数。
- subfactorial
错排数:重排 n 个元素使无一留在原位的方案数。
- bernoulli_b
第 n 个伯努利数。
- stirling_s2
第二类 Stirling 数:把 n 个元素分成 k 组的方案数。
- carmichael_lambda
Carmichael 函数:使每个与 n 互质的数模 n 都变成 1 的最小幂次。
- stirling_s1
带符号的第一类 Stirling 数。