def cumulant(self, n, k, error=False):
corr_nk = self.correlation(n, k, error=error)<EOL>if k == <NUM_LIT:2>:<EOL><INDENT>return corr_nk<EOL><DEDENT>elif k == <NUM_LIT:4>:<EOL><INDENT>corr_n2 = self.correlation(n, <NUM_LIT:2>)<EOL>return corr_nk - <NUM_LIT:2>*corr_n2*corr_n2<EOL><DEDENT>
r"""
        Calculate `c_n\{k\}`,
        the `k`-particle cumulant for `n`\ th-order anisotropy.

        :param int n: Anisotropy order.
        :param int k: Correlation order.

        :param bool error:
            Whether to calculate statistical error (for `c_n\{2\}` only).
            If true, return a tuple ``(cn2, cn2_error)``.