Documentation

PentagonalNumber.Partition

theorem two_pentagonal (k : ) :
2 * (k * (3 * k - 1) / 2) = k * (3 * k - 1)
theorem pentagonal_nonneg (k : ) :
0 k * (3 * k - 1) / 2
theorem two_pentagonal_inj {x y : } (h : x * (3 * x - 1) = y * (3 * y - 1)) :
x = y
theorem pentagonal_injective :
Function.Injective fun (k : ) => k * (3 * k - 1) / 2
theorem pentagonal_toNat_injective :
Function.Injective fun (k : ) => (k * (3 * k - 1) / 2).toNat
Equations
Instances For
    theorem Nat.Partition.mem_kSet_iff {n k : } :
    k kSet n k * (3 * k - 1) / 2 n
    theorem Nat.Partition.sum_partition (n : ) (hn : n 0) :
    kkSet n, k.negOnePow * (Fintype.card (n - (k * (3 * k - 1) / 2).toNat).Partition) = 0

    The recurrence relation of (non-distinct) partition function $p(n)$:

    $$\sum_{k \in \mathbb{Z}} (-1)^k p(n - k(3k-1)/2) = 0 \quad (n > 0)$$

    Note that this is a finite sum, as the term for $k$ outside $n - k(3k-1)/2 ≥ 0$ vanishes. Here we explicitly restrict the set of $k$.