3

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)$.

Peter
  • 86,576
  • Have you tried asking pari-users list from http://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). – Olexandr Konovalov Jan 13 '14 at 14:01

1 Answers1

3

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)

Olexandr Konovalov
  • 7,186
  • 2
  • 35
  • 73