Re: Small prime divisors of very large numbers [new puzzle]
- --- In email@example.com,
"David Broadhurst" <d.broadhurst@...> wrote:
> Puzzle: Find a triplet [b, n, p] such that:With b = 3581, n = 8001, the 28436-digit prime p = 2*b^n + 1:
> 1) b is a prime base greater than 1033,
> 2) n is an integer exponent greater than b,
> 3) p is a prime modulus greater than b^n,
> 4) the order of b modulo p is precisely b^n.
found by René Dohmen in March 2000, neatly solves the puzzle.
Lemma: If b = 1 mod 4 is prime and p = 2*b^n + 1 is prime,
then the order of b modulo p is a divisor of b^n.
Proof: Both b and p are coprime to 3. Hence b = 5 mod 12 and
n is odd. Since -2*b^n = 1 mod p and p = 11 mod 24 = 3 mod 8,
we obtain kronecker(b,p) = kronecker(-2,p) = 1, from which it
follows that b^(b^n) = b^((p-1)/2) = 1 mod p.
Method: To solve the puzzle we are obliged to investigate the
possibility that the order is less than b^n. This can be done
in a Pocklington test of the primality of p, with factored
part F = b^n dividing p-1, by choosing the witness a = b in
Examples: With b = 89 and n = 93, Pock(3,b,n) returns "Prime"
and Pock(b,b,n) returns "?", since gcd(t-1,p) = p. Hence the
order of Mod(b,p) is less than b^n. To prove that it is
b^(n-1) = 89^92, one may compute gcd(t^(1/b)-1,p) = 1.
With b = 3581 and n = 8001, Pock(b,b,n) returns "Prime".
By Pocklington's theorem, we have proven the primality of
p = 2*3581^8001 + 1. By using the witness a = b, we have
also shown that the order of Mod(b,p) is b^n, since the
Lemma proves that the order is a divisor of b^n and
Pock(b,b,n) found that b^((p-1)/b) - 1 is coprime to p.
Comment: I was unable to find an entry in the Prime Pages
that provides a solution with n > b > 3581. There is an
interesting reason for this. The archivable case
puts a premium on prime bases with b = 11 mod 12, for which
a prime p = 2*b^n + 1 = 23 mod 24 = 7 mod 8 is certain to
divide a cyclotomic number Phi(b^m,2) with m not exceeding n.
shows that Ingo Büchel and Wilfrid Keller obtained m = n - 1
in the 97498-digit case with b = 107, n = 48043. At large b,
one might expect to obtain m < n in about 1/b of the cases.
- Dear all,
I come back to this topic, looking for a working "pow_mod".
but 2^2^2 % 5 = 16 % 5 = 1.
(and idem for 2^2^2^2 - of course.).
David gave some other code, in
Below is a Pari-GP procedure "pmod(a,m)" to compute
a^(a^(a^ ... ^(a[k-1]^a[k]) ... ) modulo m
where the modulus "m" need not be prime.
Although this may work for prime m
(at least, pmod([2,2,2],5) = Mod(1,5) as should),
= Mod(1, 4)
which is most certainly wrong.
So, to put it short, has anyone a working pmod() in his "library" ?
Thanks in advance!
--- In firstname.lastname@example.org, "David Broadhurst"
I consider that his code should not be trusted.