PruferSequences
A name from the enumeratio catalogue with no kernel of its own yet; this page carries its crosswalk only.
Catalogued in the enumeratio database, with crosswalk rows in oeis; not yet written up here.
OEIS
A000272PruferSequences(...)Catalogued in the enumeratio database, with crosswalk rows in oeis; not yet written up here.Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer<0..>) -> indexed_collection<prufer_sequence> | combinatorics | always |
Definition
Epsil, as the implementation runs it.
count(_n)
0 if _n <= 0 else 1 if _n <= 2 else _n ^ (_n - 2)unrank(_n, _r)
Map(Function((_r - _r % _n ^ (Max(_n - 2, 0) - j)) / _n ^ (Max(_n - 2, 0) - j) %
_n + 1, j), Range(1, Max(_n - 2, 0), 1))rank(_n, _x)
Fold(Function(acc * _n + (_x[j] - 1), acc, j), 0, Range(1, Max(_n - 2, 0), 1))valid(_n, _x)
Length(_x) == Max(_n - 2, 0) && Fold(Function(
ok_j && 1 <= _x[j] && _x[j] <= _n +
1 -
1,
ok_j,
j,
), True, Range(1, Length(_x), 1))Enumeration
Examples
About
| Examples | 2 |
|---|---|
| Crosswalk | OEIS |