0
$\begingroup$

Is there a reason why the function PartitionsP[] does not return anything for non-integer arguments, although there is a way to calculate using Rademacher’s ‘exact’ formula? I would expect a result - as is the case with the Factorial[] or Binomial[] function.

$\endgroup$
3
  • 1
    $\begingroup$ The documentation explicitly states that it's an Integer mathematical function of an integer parameter. If there is an extension, it has simply not been implemented. We can't really say why though. $\endgroup$ Commented Dec 17, 2023 at 12:35
  • 1
    $\begingroup$ You can implement your own function, and ask us for help if you have some implementation difficulties. But we are not associated with Wolfram, we are simply users, not developers. Therefore, I vote to close this question. $\endgroup$ Commented Dec 17, 2023 at 13:13
  • $\begingroup$ As shown by @azerbajdzan, the continuous extension has an oscillatory behavior and thus Rademacher’s formula is not considered convex. This might be the reason why it was not implemented, which is a satisfactory answer for me. $\endgroup$ Commented Dec 18, 2023 at 9:03

1 Answer 1

1
$\begingroup$

Partition function

Partition Function P

The upper limit upperlimit suppose to be infinity for exact result. For the plot upperlimit=10 was used.

upperlimit = 10;
ReImPlot[1/(π Sqrt[2]) Sum[(Sum[
      KroneckerDelta[GCD[h, k], 
        1] Exp[π I Sum[
           j/k ((h j)/k - Floor[(h j)/k] - 1/2), {j, 1, 
            k - 1}] - (2 \[Pi] I h n)/k], {h, 1, k}]) Sqrt[
     k] ((π Cosh[(Sqrt[2/3] Sqrt[-(1/24) + n] π)/k])/(Sqrt[
          6] k (-(1/24) + n)) - 
      Sinh[(Sqrt[2/3] Sqrt[-(1/24) + n] π)/
         k]/(2 (-(1/24) + n)^(3/2))), {k, 1, upperlimit}], {n, 0, 10},
  Epilog -> Point[Table[{i, PartitionsP[i]}, {i, 0, 10}]], 
 PlotRange -> 43]

enter image description here

$\endgroup$
1
  • $\begingroup$ @ftel: Yes, you are right, I wrongly assumed that the function is real for all real arguments, but it is real only for integer argument. I corrected my answer. $\endgroup$ Commented Dec 18, 2023 at 9:12

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.