[GAP Forum] Elementary

lopo apelo kosho helo_07 at yahoo.com
Thu Jan 21 15:52:35 GMT 2021


Dear Friends, 
I am searching for non-negative integers a and b  in an interval  [0,n] such that a divides (2^b-1). 
It is supposed to have a-any odd number and b=phi(a). I tried to find those values using GAP (please see below) but it seems that I am doing mistake.
fun:=function(n) local a,b,t;
t:=[];
for a in [1..n] do;
for b in [1..n ] do;
if 2^b-1 = 0 mod a 
then Add (t,(a,b));
fi;
return t;
od;
od;
end;


I will be thankful for any help:. 
Regards 



More information about the Forum mailing list