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.
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...
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...
For this assignment you need to write a parallel program in C++ using OpenMP for vector...
For this assignment you need to write a parallel program in C++ using OpenMP for vector addition. Assume A, B, C are three vectors of equal length. The program will add the corresponding elements of vectors A and B and will store the sum in the corresponding elements in vector C (in other words C[i] = A[i] + B[i]). Every thread should execute approximately equal number of loop iterations. The only OpenMP directive you are allowed to use is: #pragma...
How do I calculate AVC (Average Variable Cost)? TABLE FOR COMPUTATION OF PROBLEM 23-4 Total Output...
How do I calculate AVC (Average Variable Cost)? TABLE FOR COMPUTATION OF PROBLEM 23-4 Total Output and Sales Total Costs Market Price Total Revenues Total Profit Average Total Cost (ATC) Average Variable Cost (AVC) Marginal Cost (MC) Marginal Revenue (MR) 0 5 10 0 -5 0 0 -- -- 1 9 10 10 1 9 4 4 10 2 11 10 20 9 5.5 3 2 10 3 12 10 30 18 4 1 10 4 14 10 40 26...
C++ Goals  Build single linked lists using pointers  Learn how to manipulate linked lists...
C++ Goals  Build single linked lists using pointers  Learn how to manipulate linked lists In this lab, you will create simple single linked structures consisting of Node objects. Each node will have a pointer to the next node. You will use a head pointer to keep track of the first node in the linked list, and a tail pointer to keep track of the last node in the linked list. Set both head and tail to NULL when...
I am trying to make a program in C# and was wondering how it could be...
I am trying to make a program in C# and was wondering how it could be done based on the given instructions. Here is the code that i have so far... namespace Conversions { partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if...