What does s(n) = s(n) mean?

78 Views Asked by At

I'm trying to create python analogue of wolframalpha's PartitionsQ function which calculates number of distinct partitions of integer. I found documentation about this function http://mathworld.wolfram.com/PartitionFunctionQ.html with some formulas and trying to convert them into code. enter image description here

Would be:

def distinct_partitions_number(n):
    return (sum([
        (s(k) - 2 * s(k / 2)) * distinct_partitions_number(n - k)
        for k in range(1, n + 1)
    ])) / n

but s is described by these formulas:

enter image description here

enter image description here

And how can s(n) depend on s(n). What doesn't it mean?

1

There are 1 best solutions below

0
On BEST ANSWER

$\sigma_1(n)$ is the described on that page as the sum of the odd divisors of $n$.

$s(n)$ does not refer to itself. It's a bit unfortunate, but the $s$ inside the definition of $\sigma_1$ refers to the divisor sum.