Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: problems with sum functions/ factoring the factorial

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65821] Re: problems with sum functions/ factoring the factorial
  • From: Roger Bagula <rlbagulatftn at yahoo.com>
  • Date: Mon, 17 Apr 2006 02:29:17 -0400 (EDT)
  • References: <e1sns1$86r$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Another  inferior definition of the primorial function exists at:
http://mathworld.wolfram.com/Primorial.html
There are in fact 396 sequences in OEIS that mention the name:
http://www.research.att.com/~njas/sequences/?q=primorial&language=english&go=Search
The one I'm refering to is:
http://www.research.att.com/~njas/sequences/?q=A034386&sort=0&fmt=0&language=english&go=Search
Also see:
http://www.research.att.com/~njas/sequences/?q=A117683&sort=0&fmt=0&language=english&go=Search
Roger
Roger Bagula wrote:

> I have no problem constructing the Primorial or Compositorial functions 
> that factor the factorial as:
> cf[n]*p[n]=n!
> But trying to get the sine and cosine constructed functions to plot
> seems to be a problem here:
> Clear[f, g, cf, p, CeS, CeC, PeS, PeC]
> f[n_] := If[PrimeQ[n] == True, 1, n]
> cf[0] = 1;
> cf[n_Integer?Positive] := cf[n] = f[n]*cf[n - 1]
> g[n_] := If[PrimeQ[n] == True, n, 1]
> p[0] = 1;
> p[n_Integer?Positive] := p[n] = g[n]*p[n - 1]
> Ce = 1 + Sum[1/cf[n], {n, 1, 1000}];
> N[%, 100]
> Pe = 1 + Sum[1/p[n], {n, 1, 1000}];
> N[%, 100]
> CeS[x_] := 1 + NSum[(-1)^n*p[2*n + 1]*x^(2*n + 1)/(2*n + 1)!, {n, 1, 100}];
> CeC[x_] := 1 + NSum[(-1)^n*p[2*n]*x^(2*n)/(2*n)!, {n, 1, 100}];
> ParametricPlot[{CeC[x], CeS[x]}, {x, 0, 2*Pi}]
> PeS[x_] := 1 + NSum[(-1)^n*cf[2*n + 1]*x^(2*n + 1)/(2*n + 1)!, {n, 1, 100}];
> PeC[x_] := 1 + NSum[(-1)^n*cf[2*n]*x^(2*n)/(2*n)!, {n, 1, 100}];
> ParametricPlot[{PeC[x], PeS[x]}, {x, 0, 2*Pi}]
> 
> Alernative functions:
> CeS1[x_] := 1 + NSum[(-1)^n*x^(2*n + 1)/cf[2*n + 1], {n, 1, 100}];
> CeC1[x_] := 1 + NSum[(-1)^n*x^(2*n)/cf[2*n], {n, 1, 100}];
> ParametricPlot[{CeC[x], CeS[x]}, {x, 0, 2*Pi}]
> PeS1[x_] := 1 + NSum[(-1)^n*x^(2*n + 1)/p[2*n + 1], {n, 1, 100}];
> PeC1[x_] := 1 + NSum[(-1)^n*x^(2*n)/p[2*n], {n, 1, 100}];
> ParametricPlot[{PeC1[x], PeS1[x]}, {x, 0, 2*Pi}]
> 
> In addition this function seem to come up with the wrong sign:
> Pe[x_] := 1 + NSum[cf[n]*x^n/n!, {n, 1, 100}];
> Plot[Pe[x], {x, 0, 5}]
> 
> Or alternatively:
> Pe1[x_] := 1 + NSum[x^n/p[n], {n, 1, 100}];
> Plot[Pe1[x], {x, 0, 5}]
> 
> Ce*Pe~ 5*E (low)
> Roger
> 


  • Prev by Date: CPU usage on Solaris - I have posted.
  • Next by Date: Re: Re: Re: Re: Mathematica and Education
  • Previous by thread: problems with sum functions/ factoring the factorial
  • Next by thread: Re: problems with sum functions/ factoring the factorial