3
$\begingroup$

Is the Carmichael function $\lambda(n)$ available in PARI / GP or do I have to program it ?

I know the command znorder, but this does not seem to be enough to calculate the carmichael function.

I have programmed the function, but it would nevertheless be nice to know, if there is an easier way to calculate $\lambda(n)$.

$\endgroup$
  • $\begingroup$ Have you tried asking pari-users list from pari.math.u-bordeaux.fr/lists-index.html? Anyhow, one of PARI/GP experts just told me that you can use znstar(), specifically lambda(n)=znstar(n)[2][1]. But this computes more than what you actually need (the generators). $\endgroup$ – Alexander Konovalov Jan 13 '14 at 14:01
3
$\begingroup$

Have you tried asking pari-users list? Anyhow, one of PARI/GP experts just told me that you can use znstar(), specifically lambda(n)=znstar(n)[2][1]. But this computes more than what you actually need (the generators).

(Pasting my old comment as a CW answer to remove this from the unanswered queue)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.