Question

How do I do this in the program Maple? With x_1 = 23, x_2 = 66,...

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.

Homework Answers

Answer #1

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

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
What is the matlab code for the following: With x_1 = 23, x_2 = 66, and...
What is the matlab code for the following: 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.
Please Write the whole program in assembly i am able to calculate the fibonacci series but...
Please Write the whole program in assembly i am able to calculate the fibonacci series but not sure how to print it in reverse order. Please give a Complete code !! Programming Exercise 1 (10 points): [call it Ass2-Q1.asm] Write an ASM program that reads an integer number N and then displays the first N values of the Fibonacci number sequence, described by: Fib(0) = 0, Fib(1) = 1, Fib(N) = Fib(N-2) + Fib(N-1) Thus, if the input is N...
Consider the following algorithm. i ← 2 while (N mod i) ≠ 0 do i ←...
Consider the following algorithm. i ← 2 while (N mod i) ≠ 0 do i ← i + 1 Suppose instead that N is in {2, 3, 4, 5, 6, 7, 8, 9}, and all these values are equally likely. Find the average-case number of "N mod i" operations made by this algorithm.
Complete the following program. This program should do the following: 1. Creates a random integer in...
Complete the following program. This program should do the following: 1. Creates a random integer in the range 10 to 15 for variable: allThreads, to create a number of threads. 2. Creates a random integer for the size of an ArrayList: size. 3. Each thread obtains a smallest number of a segment of the array. To give qual sized segment to each thread we make the size of the array divisible by the number of threads: while(size%allThreads != 0)size++ 4....
Create a program that generates a file of random numbers, and then prints them in neat...
Create a program that generates a file of random numbers, and then prints them in neat fashion to another file, and also saves to that file the average and standard deviation of those numbers. I) First, you would need to generate a file of random numbers that consists of N random numbers (100 < N < 1000). Each random digit should be a real number (type double) between 0 and 50. This file and its digits would now serve as...
How do I express this recursive function? an = 10n I have found some of the...
How do I express this recursive function? an = 10n I have found some of the values a0 = 100 = 1 a1 = 101 = 10 a2 = 102 = 100 a3 = 103 = 1000 And this is the answer from the textbook an + 1 = 10an, for ≥ 1 and a1 = 5 I'm confused because it says a1 = 5 but I got 10 Another problem an = 5 I don't know how to find...
How do I solve this? Preferably in Excel Radio advertising promoting weight loss program that claims...
How do I solve this? Preferably in Excel Radio advertising promoting weight loss program that claims 70% of customers will lose 20 pounds in thirty days. Customer protection group concerned that the ads are misleading. Random sample of 100 person. Found 72 out of 100 lost 20 lbs. Conduction hypothesis test of the claim using 5% significance. a. State null and alternative hypothesis’ b. Calculate the test statistic c. Find critical value d. Find p-value e. State decision f. State...
Section 2: Using the MARS or SPIM simulator develop a program that will implement the following...
Section 2: Using the MARS or SPIM simulator develop a program that will implement the following conditional statement. If ( n is even) { n = n / 2; } else { n = 3 * n + 1; } In this case, n is to be input by the user (assume they input a non-negative value), the conditional is performed, and the resulting n is to be output. Again, use the system calls for input, output, and exiting the...
Language: Python Write a program to simulate an experiment of tossing a fair coin 16 times...
Language: Python Write a program to simulate an experiment of tossing a fair coin 16 times and counting the number of heads. Repeat this experiment 10**5 times to obtain the number of heads for every 16 tosses; save the number of heads in a vector of size 10**5 (call it headCounts). You should be able to do this in 1-3 lines of numpy code. (Use np.random.uniform1 to generate a 2d array of 10**5 x 16 random numbers between 0 and...
##4. What will the following program display? ##def main(): ## x = 1 ## y =...
##4. What will the following program display? ##def main(): ## x = 1 ## y = 3.4 ## print(x, y) ## first printing ## change_us(x, y) ## print(x, y) ##second printing ## ##def change_us(a, b): ## a = 0 ## b = 0 ## print(a, b) ## ##main() ## ##Yes, yes, main() displays ##1 3.4 ##0 0 ##1 3.4 ## The question is: why x and y are still the same while the second printing of (x,y)? ## It seems...