I am new and hoping a warm welcome from this platform.

I am trying to plot the graph of double series in one variable

$$ \sum_{k=0}^{\infty} \sum_{j=0}^{\infty} C_{k,j} \exp(- 3^k 1.5^{j} x)$$

where coefficients are defined as $$ \begin{align} C_{0,0} &= 4.55672\\ C_{k,0} &= \frac{(-1)^k 3^k}{2^k \prod_{s=1}^{k}(3^s -1)}C_{0,0}\\ C_{0,j} &= \frac{(-1)^j 1.5^j}{2^j \prod_{s=1}^{j}(1.5^s-1)}C_{0,0}\\ C_{k,j} &= \frac{(-1) (3 C_{k-1,j}+1.5 C_{k,j-1})}{2(3^k 1.5^j -1)} \end{align} $$

So please tell me how to define these coefficients and can be recalled in the double sum.

  • $\begingroup$ Can you meet us halfway and write all these expressions in correct Mathematica syntax? As a next step, read defining functions and look up Product and Sum. Try small examples and become comfortable with these functions before tackling the big problem! Please try on your own first, based on the resources I pointed to, and then make the question specific: ask about the first speific issue you encountered. If you've never used Mathematica, then there will be a learning curve and this is too big for your very first task. $\endgroup$
    – Szabolcs
    Mar 15, 2019 at 12:40
  • $\begingroup$ I should note that I do not expect this to be a completely trivial exercise. Things you are likely to hit: defining recursive functions, memoization, a need for NumericQ in function definition, dealing with numerical underflow and truncating the series appropriately to get a good approximation. Explaining all this is too much for one answer so we either need to know that you understand these topic, or proceed step by step with them. $\endgroup$
    – Szabolcs
    Mar 15, 2019 at 12:53
  • $\begingroup$ Maybe I would proceed step by step, as am not much familiar about these topics. $\endgroup$
    – John
    Mar 16, 2019 at 3:48
  • 2
    $\begingroup$ Note that Product[a^s - 1, {s, k}] gives (-1)^k QPochhammer[a, a, k]. $\endgroup$ Mar 17, 2019 at 5:48
  • 1
    $\begingroup$ Just curious: is this a probability density function? $\endgroup$
    – JimB
    Mar 17, 2019 at 6:24

1 Answer 1


As an example for beginners, I give code using a block. The series converges quickly, so we can take a finite number of members (10 in this example)

F[n0_, x0_] := 
 Block[{n = n0, x = x0}, 
  f[n_, x_] := Sum[c[k, j]*Exp[-3^k*(3/2)^j*x], {k, 0, n}, {j, 0, n}];
  c[0, 0] = 4.55679; 
  c[k_, 0] := (-1)^k*3^k*c[0, 0]/2^k/Product[3^s - 1, {s, 1, k}];
  c[0, j_] := (-1)^j*(3/2)^j*
    c[0, 0]/2^j/Product[(3/2)^s - 1, {s, 1, j}];
     j] = (-1)*(3*c[k - 1, j] + 3/2*c[k, j - 1])/
       2/(3^k*(3/2)^j - 1), {k, 1, n}, {j, 1, n}];
  f[n, x]]

In fig. function F[n,x] is shown for various n=1,2,3,4,5,6,10

{Plot[Evaluate[Table[F[k, x], {k, 1, 6}]], {x, 0, 5}, 
  PlotRange -> All, PlotLegends -> Automatic], 
 Plot[F[10, x], {x, 0, 5}, PlotRange -> All]}



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.