Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I want to define a recurrence relation $a(n)$ which is only defined for odd n.

I tried something like: a:= (2*n-1)->a(2n-3)+(2n-2)!+a(2n-5);

which apparently doesn't work.

How do I define this properly?

thanks

share|improve this question
    
Why not just define $b(n)=b(n-1)+(2b)!+b(n-2)$ and then $a(2n+1)=b(n)$? –  Henning Makholm Nov 13 '11 at 4:07
    
but the problem remains, how do i define a(2n+1) = b(n)? –  stefan Nov 13 '11 at 4:25

1 Answer 1

up vote 1 down vote accepted

I'll post this here because it's too much for a comment. If you use the function...

a := m -> a(m-2)+(m-1)!+a(m-4);

You have a recurrence relation defined on all integers. Is it important that your relation remains undefined for even integers?

If you try to evaluate "a(2*n-1);" Maple will complain about too many levels of recursion. This is because it needs base cases. Since the recursion is 4th order, we'll need 4 initial conditions.

If you want it to be arbitrary, you can use...

a(0):=a[0];

a(1):=a[1];

a(2):=a[2];

a(3):=a[3];

Now if you ask Maple about a(5), a(7), etc., it will unwind the recurrence. However, if you ask for a(n), it'll complain about recursion again.

What are you trying to do? Maybe a function isn't the right tool.

share|improve this answer
    
thanks, I was hoping that i can use maple's rsovle to give me a closed expression –  stefan Nov 13 '11 at 4:56
2  
Here's the command to make Maple solve the recurrence with $a(0)=0$ and $a(2)=0$: "rsolve({a(m)=a(m-2)+(m-1)!+a(m-4),a(0)=0,a(2)=0},a(m));" [Make sure the "restart;" to wipe any previous definition of "a".] The expression it spits out isn't pretty. But then again it's not so bad it can't be worked with. –  Bill Cook Nov 13 '11 at 5:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.