How do I do this in the program Maple?
With x_1 = 23, x_2 = 66, and x_n = 3x_(n−1) + 5x_(n−2) mod(100), n ≥ 3 we will call the sequence un = x_n/100, n ≥ 1, the text’s random number sequence. Find its first 14 values.
I assume you can also do code in Matlab
function x = modulus (x1,x2)
x = zeros(1,14);
x(1) = x1 ;
x(2) = x2 ;
for i = 3 : 14
x (i) = mod ((3 * x(i-1) + 5*x(i-2)) , 100)
;
end
end
// this function takes x1 and x2 as input
modulus(23,66)
ans =
Columns 1 through 9
23 66 13 69 72 61 43 34 17
Columns 10 through 14
21 48 49 87 6
Please rate
Get Answers For Free
Most questions answered within 1 hours.