A mathematical object defined for a set and a binary operator in which the multiplication operation is associative.
No other restrictions are placed on a semigroup; thus a semigroup need not have an
identity element and its elements need not have
inverses within the semigroup. A semigroup is an associativegroupoid. A semigroup with an identity is called a monoid.
A semigroup can be empty. The numbers of nonisomorphic semigroups of orders 1, 2,
... are 1, 5, 24, 188, 1915, ... (OEIS A027851).
The number of semigroups of order , 2, ... with one idempotent
are 1, 2, 5, 19, 132, 3107, 623615, ... (OEIS A002786),
and with two idempotents are 2, 7, 37, 216, 1780,
32652, ... (OEIS A002787). The number of semigroups having , 3, ... idempotents are 1,
2, 6, 26, 135, 875, ... (OEIS A002788).