Skip to content

Commit

Permalink
The Bell numbers (#1315)
Browse files Browse the repository at this point in the history
This is just a small addition that we did during a seminar at JHU. The
OEIS entry still follows the old scheme, which will be updated in #1211.
  • Loading branch information
EgbertRijke authored Feb 11, 2025
1 parent 8855b0b commit 66eebb8
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/elementary-number-theory.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ open import elementary-number-theory.archimedean-property-rational-numbers publi
open import elementary-number-theory.arithmetic-functions public
open import elementary-number-theory.based-induction-natural-numbers public
open import elementary-number-theory.based-strong-induction-natural-numbers public
open import elementary-number-theory.bell-numbers public
open import elementary-number-theory.bezouts-lemma-integers public
open import elementary-number-theory.bezouts-lemma-natural-numbers public
open import elementary-number-theory.binomial-coefficients public
Expand Down
52 changes: 52 additions & 0 deletions src/elementary-number-theory/bell-numbers.lagda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# The Bell numbers

```agda
module elementary-number-theory.bell-numbers where
```

<details><summary>Imports</summary>

```agda
open import elementary-number-theory.binomial-coefficients
open import elementary-number-theory.multiplication-natural-numbers
open import elementary-number-theory.natural-numbers
open import elementary-number-theory.strict-inequality-natural-numbers
open import elementary-number-theory.strong-induction-natural-numbers
open import elementary-number-theory.sums-of-natural-numbers
```

</details>

## Idea

The {{#concept "Bell numbers" Agda=bell-number-ℕ WDID=Q816063 WD="Bell number"}}
[count](univalent-combinatorics.counting.md) the number of ways to
[partition](univalent-combinatorics.partitions.md) a
[set of size](univalent-combinatorics.finite-types.md) $n$. The Bell numbers can
be defined recursively by $B_0 := 1$ and

$$
B_{n+1} := \sum_{k=0}^{n} \binom{n}{k}B_k.
$$

The Bell numbers are listed as sequence A000110 in the
[OEIS](literature.oeis.md) {{#cite OEIS}}.

## Definitions

### The Bell numbers

```agda
bell-number-ℕ :
bell-number-ℕ =
strong-rec-ℕ 1
( λ n B
bounded-sum-ℕ
( succ-ℕ n)
( λ k H
binomial-coefficient-ℕ n k *ℕ B k (leq-le-succ-ℕ k n H)))
```

## References

{{#bibliography}}
7 changes: 7 additions & 0 deletions src/literature/oeis.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ open import elementary-number-theory.catalan-numbers using
( catalan-numbers)
```

### [A000110](https://oeis.org/A000110) The Bell numbers

```agda
open import elementary-number-theory.bell-numbers using
( bell-number-ℕ)
```

### [A000142](https://oeis.org/A000142) Factorials

```agda
Expand Down

0 comments on commit 66eebb8

Please sign in to comment.