# induction and recursion

• Oct 24th 2009, 01:56 PM
zpwnchen
induction and recursion
Quote:

give a recursive definaition of the sequence {$\displaystyle {a_n}$} , n=1,2,3,...
a) $\displaystyle a_n = 1+(-1)^n$
b) $\displaystyle a_n = n(n+1)$
c) $\displaystyle a_n = n^2$
help me how to define them
• Oct 24th 2009, 02:47 PM
proscientia
(a)

The sequence alternates between $\displaystyle 0$ and $\displaystyle 2$ starting with $\displaystyle 0.$ The sum of two consecutive terms is $\displaystyle 2.$ Hence

$\displaystyle a_1=0,\quad a_{n+1}=2-a_n$

(b)

$\displaystyle a_1=2,\quad a_{n+1}=(n+1)(n+2)=n(n+1)\frac{n+2}n=a_n\frac{n+2} n$

(c)

I leave this one to you.
• Oct 24th 2009, 08:50 PM
zpwnchen
c) $\displaystyle a_n = a_n +2(n+1) -1 ,a_1=1$ is that correct?
• Oct 25th 2009, 12:04 AM
CaptainBlack
Quote:

Originally Posted by proscientia
(a)

The sequence alternates between $\displaystyle 0$ and $\displaystyle 2$ starting with $\displaystyle 0.$ The sum of two consecutive terms is $\displaystyle 2.$ Hence

$\displaystyle a_1=0,\quad a_{n+1}=2-a_n$

(b)

$\displaystyle a_1=2,\quad a_{n+1}=(n+1)(n+2)=n(n+1)\frac{n+2}n=a_n\frac{n+2} n$

(c)

I leave this one to you.

The idea is to remove all reference to $\displaystyle n$ except in subscripts from the expression. That is $\displaystyle a_n$ should depend on $\displaystyle a_{n-1},\ a_{n-2}, \ ...$ and not explicitly on n

CB
• Oct 25th 2009, 12:08 AM
CaptainBlack
Quote:

Originally Posted by zpwnchen
help me how to define them

See here

CB