Question

A sequence is a list of numbers that are calculated based on a certain rule. For...

A sequence is a list of numbers that are calculated based on a certain rule. For instance, the progression described by the rule An = 2 ∗ n results in the numbers: 0 2 4 6 8 10 ··· 2 ∗ n. The sum of this sequence can be calculated as Sn = 0+2+4+6+8+10+···+2 ∗ n. Write a function that takes as input the number n and calculates the sum of the sequence up to the nth term (inclusive) for each sequence shown below.

• An = 1 n 2 , for n > 0 such that Sn = 1 1 + 1 4 + 1 9 + 1 16 +···+ 1 n 2 .

• An = (−1) n (n+1)! , for n ≥ 0 such that Sn = 1 1 − 1 2 + 1 6 − 1 24 +···+ (−1) n (n+1)!

Note: By default, Racket does not use floating point notation to do arithmetic. To force it to use floating point you have to write a #i in front of at least one number that is involved in the computation. You can also write your numbers as a floating point by writing 1.0 instead of 1.

Homework Answers

Answer #1

It is not mentioned in question ,In which language you want code, so I prefered python , over all other programming languages, beause python is very popular and very common.
if you want solution in any other language,then pls comment ...i will provide you solution asap :)

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
Claim: If (sn) is any sequence of real numbers with ??+1 = ??2 + 3?? for...
Claim: If (sn) is any sequence of real numbers with ??+1 = ??2 + 3?? for all n in N, then ?? ≥ 0 for all n in N. Proof: Suppose (sn) is any sequence of real numbers with ??+1 = ??2 + 3?? for all n in N. Let P(n) be the inequality statements ?? ≥ 0. Let k be in N and suppose P(k) is true: Suppose ?? ≥ 0. Note that ??+1 = ??2 + 3?? =...
IN C++ The Catalan numbers are an integer sequence Cn that appears in tree-enumeration problems. The...
IN C++ The Catalan numbers are an integer sequence Cn that appears in tree-enumeration problems. The first Catalan numbers for n = 1, 2, 3, ... are 1, 2, 5, 14, 42, 132, .... A formula generating Cn is: Cn=(1÷(n+1))=(2n)!÷(n+1)!n! Design two programs that communicate with shared memory using the Win32 API as outlined in Section 8.7.2. The producer process will generate the Catalan sequence and write it to a shared memory object. The consumer process will then read and...
Define a recursive rangeSum(from, to) method that calculates and prints the sum of numbers between the...
Define a recursive rangeSum(from, to) method that calculates and prints the sum of numbers between the two values inclusive. IN JAVA. OUTPUT rangeSum(1,5) -> 15 rangeSum(1,5) -> 1+2+3+4+5=15 rangeSum(-3,4) -> 4 rangeSum(-3,4) -> -3+-2+-1+0+1+2+3+4=4 rangeSum(-5, 7) -> 13 rangeSum(-5, 7) -> -5+-4+-3+-2+-1+0+1+2+3=-9 please write main method as well as output for three above methods.
1 .Answer the following questions about the arithmetic sequence 2, 5, 8, 11, .... . Find...
1 .Answer the following questions about the arithmetic sequence 2, 5, 8, 11, .... . Find n if the series 2 + 5 + 8 + 11 + ⋯ + 119 = 2420. 2. Answer the following questions about the geometric sequence 3, 12, 48, 192. Which term in the sequence is 12288? 3. Find the sum of the series 106 + 103 + 100 + 97 + ⋯ − 41. 4.Find S7 and S∞ for the series 6 +...
In mathematics, the Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci...
In mathematics, the Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and characterized by the fact that every number after the first two is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, … The sequence Fn of Fibonacci numbers is defined by the recurrence relation: Fn = Fn-1 + Fn with seed values F1 = 1 F2 = 1 For more information on...
For the integral below, write a program to do the trapezoid rule using the sequence of...
For the integral below, write a program to do the trapezoid rule using the sequence of mesh sizes h = (b – a)/2, (b – a)/4, (b – a)/8, ..., (b – a)/128, where b – a is the length of the given interval: f(x) = e−x sin(4x), [0, pi], I(f) = (4/17)(1 − e^-pi) = 0.2251261368. Verify that the expected rate of error decrease is obtained. Attach your code and a plot of error vs. h.
IN C++ AS SIMPLE AS POSSIBLE ______ Re-write the given function, printSeriesSquareFifth,  to use a while loop...
IN C++ AS SIMPLE AS POSSIBLE ______ Re-write the given function, printSeriesSquareFifth,  to use a while loop (instead of for). • The function takes a single integer n as a parameter • The function prints a series between 1 and that parameter, and also prints its result • The result is calculated by summing the numbers between 1 and n (inclusive). If a number is divisible by 5, its square gets added to the result instead. • The function does not...
Use C++ Write a program that first reads in how many whole numbers the user wants...
Use C++ Write a program that first reads in how many whole numbers the user wants to sum, then reads in that many whole numbers, and finally outputs the sum of all the numbers greater than zero, the sum of all the numbers less than zero (which will be a negative number or zero), and the sum of all the numbers, whether positive, negative, or zero. The user enters the numbers just once each and the user can enter them...
Written in MASM Assembly Problem Definition: Write a program to calculate Fibonacci numbers. • Display the...
Written in MASM Assembly Problem Definition: Write a program to calculate Fibonacci numbers. • Display the program title and programmer’s name. Then get the user’s name, and greet the user. • Prompt the user to enter the number of Fibonacci terms to be displayed. Advise the user to enter an integer in the range [1 .. 46]. • Get and validate the user input (n). • Calculate and display all of the Fibonacci numbers up to and including the nth...
in C++ Please and thanks Here is a list of 6 numbers. Use the selection sort...
in C++ Please and thanks Here is a list of 6 numbers. Use the selection sort algorithm to sort this list. Fill in this table with each iteration of the loop in the selection sort algorithm. Mark the place from which you are looking for the 'next smallest element'. In this display, the upper numbers are the indices, the lower numbers are in the corresponding positions. Use the several rows provided to show the sequence of steps. 0 1 2...