Consider the sequence 015122235517092Find both a recurrence
Consider the sequence 0,1,5,12,22,35,51,70,92...Find both a recurrence relation and a closed for this sequence
Solution
Given that the sequenc 0,1,5,12,22,35,51,70,92,------
First let us assume that the first term a(0)=0
The difference between terms goes as follows +1,+4,+7,+10-----
If we think of that for n=1,2,3,----
We have 1+3(n-1)
=3n-3+1
=3n-2
So the recursive form is a(n)=a(n-1)+3n-2, where a(0)=0
For the closed form, it will be of the form
a(n)=an^2+bn+c------------------>1
For n=0 and solve for c
substitute n=0 in equation 1 we get
a(0)=a(0^2)+b(0)+c
=a(0)+b(0)+c
0=0+0+c
c=0
Now, from equation 1, we get a(n)=a(n^2)+bn+0 [c=0]
=a(n^2)+bn
For n=1 in equation 1, we get
a(1)=a(1^2)+b(1)+c
=a(1)+b(1)+0
a(1)=a+b=1------------->2
For n=2 in equation 1, we get
a(2)=a(2^2)+b(2)+c
=4a+2b+0
5=4a+2b---------------->3
Now Multiplying the equation 2 with 2 then we get 2a+2b=2--------->4
subtract equation 4 from 3 we get (4a+2b)-(2a+2b)=5-2
=>(4a-2a)+(2b-2b)=3
=>2a+0=3
=>a=3/2
now substitute a=3/2 in the equation a+b=1
=>(3/2)+b=1
=>b=1-(3/2)
=>b=(2-3)/2=-1/2
therefor b=-1/2
Finally a(n)=a(n^2)+bn
=(3/2)(n^2)-(1/2)n
=(3(n^2)/2)-(n/2)
=(1/2)(3(n^2)-n)
which is the closed form of the given sequence.
