Carmichael lambda function: Difference between revisions
Content deleted Content added
→{{header|Wren}}: Optimized - significantly quicker than before. |
m sp |
||
Line 4:
;Background
The '''Carmichael function''', or '''Carmichael lambda function''', is a function in
:<math>a^m \equiv 1 \pmod{n}</math>
holds for every integer coprime to '''n'''.
Line 32:
=={{header|Python}}==
Python has the Carmichael function in the SymPy library, where
<syntaxhighlight lang="Python">from sympy import reduced_totient
Line 52:
UP_TO = 20
MAX_TO_TEST =
FIRSTS = [0] * (UP_TO + 1)
FIRSTS[0] = 1
|