Wednesday, November 21, 2018

[ammpupue] Discrete log(3)

For each tuple (p,x) below, p is a prime for which 2 is a primitive root (generator) (OEIS A001122).  x is the solution to 2^x=3 (mod p).

? forprime(p=5,1000,if((p-1)==znorder(Mod(2,p)),print("(",p,",",znlog(3,Mod(2,p)),")")))

(5,3) (11,8) (13,4) (19,13) (29,5) (37,26) (53,17) (59,50) (61,6) (67,39) (83,72) (101,69) (107,70) (131,72) (139,41) (149,87) (163,101) (173,27) (179,108) (181,56) (197,181) (211,43) (227,46) (269,109) (293,157) (317,249) (347,152) (349,26) (373,238) (379,137) (389,271) (419,100) (421,404) (443,318) (461,111) (467,450) (491,320) (509,9) (523,297) (541,104) (547,429) (557,435) (563,530) (587,478) (613,114) (619,75) (653,443) (659,186) (661,570) (677,479) (701,429) (709,172) (757,84) (773,21) (787,699) (797,563) (821,621) (827,256) (829,376) (853,474) (859,119) (877,686) (883,301) (907,295) (941,583) (947,914)

The seeming randomness of the solutions hints at the difficulty of the discrete logarithm problem.  Next we narrow to safe primes, because those can be the basis for difficult but provably solvable puzzles.

For each tuple (p,x) below, p is a safe prime for which 2 is a primitive root (generator).  x is the solution to 2^x=3 (mod p).  Incidentally, the sequence of p appears to be OEIS A269454.

? forprime(p=3,20000,if(ispseudoprime((p-1)/2)&&((p-1)==znorder(Mod(2,p))),print("(",p,",",znlog(3,Mod(2,p)),")")))

(5,3) (11,8) (59,50) (83,72) (107,70) (179,108) (227,46) (347,152) (467,450) (563,530) (587,478) (1019,958) (1187,646) (1283,1214) (1307,296) (1523,186) (1619,754) (1907,396) (2027,282) (2099,368) (2459,1902) (2579,1374) (2819,576) (2963,1386) (3203,1704) (3467,352) (3779,1088) (3803,3402) (3947,1746) (4139,730) (4259,3472) (4283,320) (4547,2324) (4787,2840) (5099,4086) (5387,690) (5483,3392) (5507,1264) (5939,1540) (6659,5632) (6779,5418) (6827,934) (6899,5182) (7187,5970) (7523,4938) (7643,1386) (8147,5636) (8699,3330) (8747,3748) (8819,3670) (8963,8910) (9467,622) (9587,7644) (10163,8716) (10667,584) (10883,9470) (11003,6796) (11483,7486) (11699,11082) (12107,5916) (12203,7346) (12227,11602) (12347,11628) (12539,6406) (12659,10630) (12899,4720) (13043,1566) (13163,4950) (13523,5356) (14243,10386) (14387,2516) (14699,7662) (14867,5070) (15083,6708) (15299,14434) (15683,15654) (15803,12714) (16139,12882) (16187,5280) (16547,12452) (17027,2594) (17387,1112) (17483,5522) (17939,588) (18059,6190) (18443,2232) (18587,18452) (18947,2022) (19259,16586) (19379,4550)

No comments :