内容 1.2 Procedures and the Processes They Generate · 45
练习 自检推理
Exercise 1.27: Demonstrate that the Carmichael
numbers listed in Footnote 47 really do fool the Fermat test. That is,
write a procedure that takes an integer n and tests whether a
n is
congruent to a modulo n for every a
n, and try your procedure
on the given Carmichael numbers.
练习 1.27:证明脚注 47 中列出的卡迈克尔数 (Carmichael numbers) 确实能骗过费马检验。也就是说,写一个过程,接受一个整数 n,检验对所有 a < n,aⁿ 是否与 a 模 n 同余,然后用给定的卡迈克尔数运行你的过程。
我的笔记 自动保存