Tag Info

New answers tagged

6

I think this is what you are after: mySum[s_, a_, b_]:= Sum[ 1./n p^(-n s), {n, b}, {p, Prime @ Range @ PrimePi @ a}] Edit: skipper inner Sum, thanks to kguler's comment.


1

You can also construct that series yourself, should you need that in another context in the future: sa[n_]:=Product[a+i,{i,0,n-1}]; and insert that into your formula: 2 Sum[sa[n]/(n!(2 n+1)^3), {n,0,\[Infinity]}] or avoid the function and write: 2 Sum[Product[a+i,{i,0,n-1}]/(n!(2 n+1)^3), {n,0,\[Infinity]}] both giving you the result: (1/(16 ...


1

You're after Pochhammer: Pochhammer[a, 5] (* a (1 + a) (2 + a) (3 + a) (4 + a) *) Do note, the Mathematica definition by default is opposite that used in many fields: it is the Rising Factorial, while the traditional form can be confused with Falling Factorial, the perhaps more common use of Pochhammer...


2

Timing[D[Sum[ Subscript[c, n] r^Subscript[l, n] + Subscript[d, n] r^-Subscript[l, n] + Subscript[u, n] r^(Subscript[l, n] + 2) + Subscript[D, n] r^(2 - Subscript[l, n]), {n, 1, \[Infinity]}], r]] // First (* 0. *) It is, thus, so fast that Mma cannot see the time. The thing is that the variable C is reserved in Mma, and should ...


1

Functions should be defined as follows: MyFunc[A_, B_, C_, 1] := 3 x - 2 y; MyFunc[A_, B_, C_, 2] := 8 x - 4 y; Then NewFunc[A_, B_, C_] := Sum[MyFunc[A, B, C, i], {i, 1, 2}] evaluates properly. NewFunc[1, 1, 1] (* 11 x - 6 y *)



Top 50 recent answers are included