Magma

70 Reputation

4 Badges

5 years, 332 days

MaplePrimes Activity


These are answers submitted by Magma

L := [0, 3, 0, 7]; 
X := []; 
for i to 4 do
    if L[i] > 0 then
       X := [op(X), (1/2)*L[i]] 
    end if
 end do;
 X;
   [3/2, 7/2]

 

Obtaining generators of F_p is equal to find the primitive elements of the finite field GF(p,1). Therefore, I suggest to use the following code 

 restart
 
 L := []; u := 304;
 while u > 0 do 
 p := ithprime(u);
 G := GF(p, 1); 
 if G:-order(G:-input(2))+G:-order(G:-input(3)) = 2*p-2 
 then L := [op(L), p] end if;
 if p > 3000 then u := 0
 else u := u+1 end if; 
 unassign('p, G');
 end do; 
 print(L); 
 
 [2069, 2083, 2141, 2213, 2237, 2309,
 2333, 2357, 2371, 2467, 2477, 2539, 
 2549, 2659, 2683, 2693, 2707, 2741, 
 2789, 2837, 2861, 2909, 2957]

Page 1 of 1