Quote:
Originally Posted by enzocreti
And what if I search for values of k such that
k is multiple of 43
k is of the form 41s+r with r=1,10,16,18,37
then if k is even, k have to be congruent to 6 mod 13
if k is odd, k have to be congruent to 7 mod 13
?

The PariGP function chinese() [named in honor of the Chinese Remainder Theorem, or CRT] is made for such things. The conditions 43k, k == 1 (mod 41), 2k, and k == 6 (mod 13) give
? chinese([Mod(0,43),Mod(1,41),Mod(0,2),Mod(6,13)])
%1 = Mod(23822, 45838)
while 43k, k == 1 (mod 41), k == 1 (mod 2), and k == 7 (mod 13) give
? chinese([Mod(0,43),Mod(1,41),Mod(1,2),Mod(7,13)])
%2 = Mod(32637, 45838)
and similarly for the others.