Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

so i have a problem where i am asked to find a and c where i am given m=97. there are also multiple elements in the sequence given,x1 = 93, x2 = 87, x3 = 29, x4 = 18, x5 = 41. i set up all the equations like the first one

87=(a*93+c) mod (97+1)

i wrote a program where i used a brute force tactic to check a large range (tried [0,m] and large numbers such as [0,1000]) to find the pairs of (a,b) that satisfy one of the equations. I then did that to all of the equations so i have differents sets of (a,b) that satisfy one given equation. I then wrote a program to find the intersection of all of those sets, but i got only the null set :(

my next problem is to do the same but without m given.

any help on how to find it would be great! a general way as well as a concrete way would be absolutely great as well

share|improve this question
You were talking about $a$ and $c$ and suddenly $b$ appeared... –  chubakueno May 5 at 7:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.