CentralDelannoyNumbers
The central Delannoy numbers as a lazy indexed collection.
OEIS
A001850CentralDelannoyNumbersThe count of king-move lattice paths across an grid, an infinite indexed collection.Details
- A lazy indexed collection: , and unranks term via , , , bigint throughout -- .
- OEIS A001850, starting exactly at its offset-0 term: ; strictly increasing.
- Membership goes through Element: is true, is false.
Definition
Epsil, as the implementation runs it.
count()
PositiveInfinityunrank(_r)
Fold(
Function(
sm_a + Binomial(_r, sm_k) * Binomial(_r + sm_k, sm_k),
sm_a,
sm_k,
),
0,
Range(0, _r, 1),
)rank(_x)
Apply(
(sq_at: integer) => sq_at if Fold(
Function(
sm_a + Binomial(sq_at, sm_k) *
Binomial(
sq_at +
sm_k,
sm_k,
),
sm_a,
sm_k,
),
0,
Range(0, sq_at, 1),
) == _x else -1,
Fold(
Function(sq_at + 2 ^ sq_b if Fold(
Function(sm_a + Binomial(sq_at +
2 ^
sq_b, sm_k) *
Binomial(
sq_at +
2 ^
sq_b +
sm_k,
sm_k,
), sm_a, sm_k),
0,
Range(0, sq_at + 2 ^ sq_b, 1),
) <= _x else sq_at, sq_at, sq_b),
0,
Range(Floor(Log(Floor(Log(_x, 2)) + 2, 2)) + 1, 0, -1),
),
) if True else -1valid(_x)
Apply(
(sq_at: integer) => Fold(Function(
sm_a + Binomial(sq_at, sm_k) *
Binomial(sq_at + sm_k, sm_k),
sm_a,
sm_k,
), 0, Range(0, sq_at, 1)) == _x,
Fold(
Function(sq_at + 2 ^ sq_b if Fold(
Function(sm_a + Binomial(sq_at +
2 ^
sq_b, sm_k) *
Binomial(
sq_at +
2 ^
sq_b +
sm_k,
sm_k,
), sm_a, sm_k),
0,
Range(0, sq_at + 2 ^ sq_b, 1),
) <= _x else sq_at, sq_at, sq_b),
0,
Range(Floor(Log(Floor(Log(_x, 2)) + 2, 2)) + 1, 0, -1),
),
) if True && _x >= 1 else FalseEnumeration
Examples
1 more kept as data, checked against the oraclesAbout
| Examples | 1 |
|---|---|
| Crosswalk | OEIS |
See also: Count, At, Element, SchroederNumbers, PellNumbers