User talk:Ahmed fuj

=Sequence =

A sequence is an ordered list. Like a set, it contains members (also called elements, or terms). The number of ordered elements (possibly infinite) is called the length of the sequence. Unlike a set, order matters, and exactly the same elements can appear multiple times at different positions in the sequence. Most precisely, a sequence can be defined as a function whose domain is a countable totally ordered set, such as the natural numbers.

Important examples
There are many important integer sequences. The prime numbers are the natural numbers bigger than 1, that have no divisors but 1 and themselves. Taking these in their natural order gives the sequence (2,3,5,7,11,13,17,...). The study of prime numbers has important applications for mathematics and specifically number theory.

Indexing
Other notations can be useful for sequences whose pattern cannot be easily guessed, or for sequences that do not have a pattern such as the digits of π. This section focuses on the notations used for sequences that are a map from a subset of the natural numbers. For generalizations to other countable index sets see the following section and below.

The terms of a sequence are commonly denoted by a single variable, say an, where the index n indicates the nth element of the sequence.
 * $$\begin{align} a_1  &\leftrightarrow&   \text{  1st element} \\

a_2  &\leftrightarrow &\text{  2nd element } \\ a_3  &\leftrightarrow &\text{  3rd element } \\ \vdots& &\vdots \\ a_{n-1}  &\leftrightarrow &\text{  (n-1)th element} \\ a_n  &\leftrightarrow &\text{  nth element} \\ a_{n+1}  &\leftrightarrow &\text{  (n+1)th element} \\ \vdots& &\vdots \end{align}$$ Specifying a sequence by recursion

Sequences whose elements are related to the previous elements in a straightforward way are often specified using recursion. This is in contrast to the specification of sequence elements in terms of their position.

To specify a sequence by recursion requires a rule to construct each consecutive element in terms of the ones before it. In addition, enough initial elements must be specified so that new elements of the sequence can be specified by the rule. The principle of mathematical induction can be used to prove that a sequence is well-defined, which is to say that that every element of the sequence is specified at least once and has a single, unambiguous value. Induction can also be used to prove properties about a sequence, especially for sequences whose most natural specification is by recursion.

The Fibonacci sequence can be defined using a recursive rule along with two initial elements. The rule is that each element is the sum of the previous two elements, and the first two elements are 0 and 1.
 * $$a_n = a_{n-1} + a_{n-2}$$, with  a0 = 0 and a1 = 1.