Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10111
| From | Tomas Garza <tgarza10@msn.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Trying to recursively define a double factorial |
| Date | 2012-05-17 08:14 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jp2c0e$50d$1@smc.vnet.net> (permalink) |
| References | <201205160820.EAA23026@smc.vnet.net> |
I can't see where the "double" comes in. It seems to be an ordinary factorial and a Table of values for the factorial. E.g.
In[15]:= Clear[MyF1, n]; MyF1[n_Integer] := n*MyF1[n - 1] /; n > 1; MyF1[1]= 1;
In[16]:= Table[MyF1[k], {k, 3, 6}]
Out[16]= {6, 24, 120, 720}
-Tomas
> Date: Wed, 16 May 2012 04:20:52 -0400
> From: monsterbone@msn.com
> Subject: Trying to recursively define a double factorial
> To: mathgroup@smc.vnet.net
>
> My goal here is to define a recursive function for a double factorial. T=
he 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 integ=
ers 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?
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Trying to recursively define a double factorial Tomas Garza <tgarza10@msn.com> - 2012-05-17 08:14 +0000
csiph-web