       Re: Trying to recursively define a double factorial

• To: mathgroup at smc.vnet.net
• Subject: [mg126530] Re: Trying to recursively define a double factorial
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Thu, 17 May 2012 04:10:33 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201205160820.EAA23026@smc.vnet.net>

```myF1 = myF1 = 1;

myF1[n_Integer?Positive] := n*myF1[n - 2]

And @@ Table[n!! == Factorial2[n] == myF1[n], {n, 0, 256}]

True

Bob Hanlon

On Wed, May 16, 2012 at 4:20 AM, Jorge Cantu <monsterbone at 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;
> MyF1[n_Integer] /; (n > 0) := MyF1[n] = n*MyF1[n - 1]
>
> Table[MyF1[k], {k, (*integer*), (*integer*)}]
>
>
>
>               How do I do this?

```

• Prev by Date: Re: Total least squares with Mathematica?
• Next by Date: Re: Trying to recursively define a double factorial
• Previous by thread: Re: Trying to recursively define a double factorial
• Next by thread: Re: Trying to recursively define a double factorial