RosettaCodeData/Task/Floyds-triangle/Excel/floyds-triangle.excel

23 lines
392 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
floydTriangle
=LAMBDA(n,
IF(0 < n,
LET(
ixs, SEQUENCE(
n, n,
0, 1
),
x, MOD(ixs, n),
y, QUOTIENT(ixs, n),
IF(x > y,
"",
x + 1 + QUOTIENT(
y * (1 + y),
2
)
)
),
""
)
)