Linear Congruential Generator 1,4,9

  • Thread starter Thread starter mebigp
  • Start date Start date
  • Tags Tags
    Generator Linear
AI Thread Summary
The discussion revolves around finding the constants 'a' and 'b' in the linear congruential generator equation X=(aX + b) mod 65536, given the output sequence of 1, 4, and 9. The user has set up equations based on the outputs but is struggling to derive the correct values for 'a' and 'b'. Attempts to solve the equations have led to incorrect results, specifically transitioning from 4 to 7 instead of 9. The conversation highlights the challenge of determining the parameters for the generator to produce the desired output sequence. Further assistance is sought to resolve the equations accurately.
mebigp
Messages
7
Reaction score
0

Homework Statement


X=(aX + b) mod 65536
Output is 1,4,9, ?

Can anyone give me a hint as to what a and b are


Homework Equations





The Attempt at a Solution


1=(aX + b) mod 65536
4=(a1 + b) mod 65536
9=(a4 + b) mod 65536

The values I have tried get me from 4 to 7 not 9
 
Physics news on Phys.org
By sub 5=3a mod 65536 but I am stuck here
 
Back
Top