David Cleaver on Sun, 18 Oct 2009 18:47:43 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Calculating powmod...


I'm interested in calculating "powmod"'s such as:
Mod(2^9182347891540, 9182347891541)
However, when I ran the function, it gave an error:
 ***   length (lg) overflow

Actually, I'm really interested to see if a number is a base 2 pseudoprime. I saw the ispseudoprime function, but that uses the strong test, and I just need to know:
2^(n-1) == 1 (mod n)

I'm only going to be working with 64-bit inputs. Is there some setting I need to change in pari to be able to find out the above? Or is there some function I might have overlooked that performs that calculation? Thanks for your time.

-David C.