Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Trying to recursively define a double factorial
Replies: 6   Last Post: May 17, 2012 4:14 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
DrMajorBob

Posts: 1,448
Registered: 11/3/08
Re: Trying to recursively define a double factorial
Posted: May 17, 2012 4:14 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

You don't need to do it at all, since Mathematica already has Factorial2
built in.

Bobby

On Wed, 16 May 2012 03:20:52 -0500, Jorge Cantu <monsterbone@msn.com>
wrote:

> My goal here is to define a recursive function for a double factorial.
> The domain of this function is the set of positive integers. For a
> positive even integer n the value DF[n] is the product of all positive
> even integers which are <n. For a positive odd integer n the value
> DF[n] is the product of all positive odd integers which are <n.
>
> I wanna make a recursive function of this double factorial without
> If(and other similar statements). Here is my work so far:
>
>
> Clear[MyF1, n];
> MyF1[1] = 1;
> MyF1[n_Integer] /; (n > 0) := MyF1[n] = n*MyF1[n - 1]
>
> Table[MyF1[k], {k, (*integer*), (*integer*)}]
>
>
>
> How do I do this?
>



--
DrMajorBob@yahoo.com




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.