On Thu, Jan 21, 2021 at 03:52:35PM +0000, lopo apelo kosho wrote: > 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
You should write if (2^b-1) mod a = 0 "2^b-1 = 0 mod a" means "(2^b-1) = (0 mod a)" Cheers, Bill _______________________________________________ Forum mailing list Forum@gap-system.org https://mail.gap-system.org/mailman/listinfo/forum