Re: Trying to recursively define a double factorial
- To: mathgroup at smc.vnet.net
- Subject: [mg126523] Re: Trying to recursively define a double factorial
- From: James Stein <mathgroup at stein.org>
- Date: Thu, 17 May 2012 04:08:07 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201205160820.EAA23026@smc.vnet.net>
I think the function 'dF' below is what you asked for, but I think you did not ask for what you want. Clear[dF]; dF[n_Integer] = 1; dF[n_Integer] /; n > 4 := (n - 2) dF[n - 4]; Table[dF[n], {n, 1, 11, 2}] Table[dF[n], {n, 2, 12, 2}] Perhaps you wanted a function giving the product of all even(odd) integers less-than-OR_EQUAL to a positive even(odd) integral argument? On Wed, May 16, 2012 at 1: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] = 1; > MyF1[n_Integer] /; (n > 0) := MyF1[n] = n*MyF1[n - 1] > > Table[MyF1[k], {k, (*integer*), (*integer*)}] > > > > How do I do this? > >
- References:
- Trying to recursively define a double factorial
- From: Jorge Cantu <monsterbone@msn.com>
- Trying to recursively define a double factorial