answersLogoWhite

0

Yes, this can be done. For example for Fibonacci series. You will find plenty of examples if you Google for the types of series you need to be generated.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How do you obtain the moment generating function of a Poisson distribution?

Using the Taylor series expansion of the exponential function. See related links


What is recursive function?

A recursive function is one in which the value of a function at each point depends on its value at one or more previous points. A rercursive function requires the first few values to be defined normally - these are called bases. Perhaps one of the most famous recursive function is the Fibonacci series, which has f(1) = 1 f(2) = 1 f(n) = f(n-1) + f(n-2) for n = 3, 4, 5, ... There are two bases and each subsequent value is defined in terms of the preceding two.


Next numbers in series -26 -12 -5 -1.5?

0.25 and 1.125 The generating function is -56*2-n + 2


What is a recursion function in C programming?

It is a function which returns itself.Whenever function is called from itself then there is a chance that the function will enter in to an infinite loop.To prevent the program from entering in to a infinite loop.To prevent a program from entering in to an infinite loop in such a manner,every recursive function must have terminating condition that decide whether to call the function once more or not.This terminating conditions is also known as stopping rule in recursive function.Using Recursion to Print the Fibonacci Series #include#includevoid main(){int c=1,f=0,s=1;int i;printf("%d%20d\n",f,f);printf("%d%20d\n",s,s);for (i=2; i


How many types of recursion are there in c language?

Recursion in c language is a method where the function calls itself, within or outside the scope. Using Recursion, complicated problems can be divided into smaller parts so that solving them becomes more manageable. The recursion technique is available in Java, JavaScript, and C++.serves the same purpose. The type of Recursion in C • Direct Recursion • Indirect Recursion. Direct Recursion Recursion can call the function n-number of times. In the case of direct Recursion, the function calls itself inside the same position or in the local scope Direct Recursion problems are the Fibonacci series, a program to print 50 natural numbers. Indirect Recursion In the case of Indirect Recursion, a function X calls function Y, and function Y calls any function Z. Under certain conditions, function Z calls function A. In this case, function A is indirectly related to function Z. Indirect Recursion is also known as mutual Recursion, as more than one function runs a program. It is a two-step recursive function call process for making a recursive function call. Below mentioned are also type of Recursion: Tail Recursion No Tail/Head Recursion Linear Recursion Tree Recursion Tail Recursion A function is said to be tail recursion if it calls itself and also calls the last or the previous statement executed in the process. Head Recursion A function is said to be Head Recursion if it calls itself and also calls the first or the beginning statement executed in the process. Linear Recursion A function is said to be a linear recursive function if it makes a single call to itself each time the procedure executes itself and grows linearly depending on the size of the problem. Tree Recursion Tree Recursion is different from linear Recursion. Rather than making only one call to itself, that function makes more than one recursive call to the process within the recursive function. Following are the steps to solve the recursive problem in C: Step 1: Create a function and assign the work a part should do. Step 2: Select the subproblem and assume that the function already works on the problem. Step 3: Get the answer to the subproblem and use it to resolve the main issue. Step 4: The 90% of the problem defined is solved.


Is the word program a noun?

Yes, "program" can function as a noun. It can refer to a planned series of activities or events, a set of coded instructions input into a computer, or a specific performance or broadcast on television or radio.


Write a program to print the series 072663124--term n?

To print the series 072663124 for a given term n, you can use a simple program in Python. The series appears to follow a specific pattern, so you can create a function that generates and prints the series up to the nth term. Here’s a basic implementation: def print_series(n): series = "072663124" print(series[:n]) # Example usage: n = 9 # specify the term you want to print print_series(n) This program prints the first n characters of the series. Adjust n to get the desired output.


Write a program to print the Fibonacci series in php upto input value using recursive function?

The Fibonacci sequence uses recursion to derive answers. It is defined as: F0 = 0 F1 = 1 Fn = F(n - 1) + F(n -2) To have this sequence printed by a php script use the following: function fibonacci($n) { if($n 1) return 1; //F1 else return fibonacci($n - 1) + fibonacci($n - 2); //Fn } This recursive function will print out the Fibonacci number for the integer n. To make it print out all the numbers in a particular set add this to your script. for($i = 0; $i < 15; $i++) { echo fibonacci($i) . "<br />"; } So your final result would look like. <?php function fibonacci($n) { if($n 1) return 1; else return fibonacci($n - 1) + fibonacci($n - 2); } for($i = 0; $i < 15; $i++) { echo fibonacci($i) . "<br />"; } ?>


Do grapes come under Fibonacci sequence?

No. Grapes have nothing to do with a recursive series of numbers following the rule that any number is the sum of the previous two.


Discontinuous function in fourier series?

yes a discontinuous function can be developed in a fourier series


How do you calculate the sum of first 20 prime number?

You find the first 20 prime numbers and add them together. There is no formula for generating a sequence of prime numbers and so none for the series of their sums.You find the first 20 prime numbers and add them together. There is no formula for generating a sequence of prime numbers and so none for the series of their sums.You find the first 20 prime numbers and add them together. There is no formula for generating a sequence of prime numbers and so none for the series of their sums.You find the first 20 prime numbers and add them together. There is no formula for generating a sequence of prime numbers and so none for the series of their sums.


What are the merits and demerits of recursion?

Ans: Merits of recursion are: Mathematical functions, such as Fibonacci series generation can be easily implemented using recursion as compared to iteration technique. Demerits of recursion are: Many programming languages do not support recursion; hence, recursive mathematical function is implemented using iterative methods. Even though mathematical functions can be easily implemented using recursion, it is always at the cost of execution time and memory space. The recursive programs take considerably more storage and take more time during processing.