Solve Recurrence Function for f(n+2) = 2*f(n+1) - f(n) +2 , when n is even f(n+2) = 3*f(n), when n is odd Also f(1) = f(2) = 1

anothermyth

New member
Joined
Jun 27, 2019
Messages
4
f(n+2) = 2*f(n+1) - f(n) +2 , when n is even

f(n+2) = 3*f(n), when n is odd

Also f(1) = f(2) = 1

I want to know the summation of this series in a given range of n, lets suppose it to be { l,r} .

What I tried?

I took values for the series as 1, 1, 3, 7, 9, 13, 27 .
I also tried summing up the function values taking n->n+1 or n+2 . But it was also of not much help
 
A suggestion:
Split your series into two series. One with odd numbered n and one with even numbered n
eg 1, 3, 9, 27... and 1, 7, 13, ...
Might help.
 
I tried it but couldn't figure out any pattern
Can u please help in finding the function f(n) only in terms of n, without any recurrence relations.
 
I have simplified it to
f(n+2) = 2*(3^(n/2)) + f(n) - 2 , when n is even
f(n+2) = 3^((n-1)/2) , when n is odd
 
Last edited:
Top