Contact

PERMUTATIONA Function (OpenOffice Calc)

Statistical Intermediate OpenOffice Calc

Use OpenOffice PERMUTATIONA for ordered selections with repetition, with native n^k examples and its important tested rejection of Chosen greater than Number.

Verification status: Eight reference formulas and 8 diagnostic cases were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using generated native ODF and GUI hard recalculation. Saved formula identities and typed results were checked; the load warning is described below. How formula examples are checked

Quick answer: =PERMUTATIONA(8;0) returned 1 in the tested Apache OpenOffice 4.1.16 build.

Availability and version history

  • Introduced: First release not established; documented by OpenOffice.org 3.3.
  • Supported in: Apache OpenOffice 4.1.16; this identifies a verified release, not a final supported version.
  • Scope: Desktop Calc, English function names and semicolon-separated formulas.
  • Checked: October 14, 2026. Eight reference formulas and the listed diagnostics were recalculated from generated native ODF in 4.1.16 on Linux x86-64, Build 9816. Source and independent reference calculations were also checked.

What PERMUTATIONA returns

PERMUTATIONA evaluates n^k for ordered selections with repetition, but this Apache OpenOffice implementation also requires k≤n. That restriction excludes some perfectly valid repetition-counting problems. In particular, PERMUTATIONA(2;3) errors although the mathematical number of three-position binary strings is 8. Release entry.

Syntax and arguments

=PERMUTATIONA(Number; Chosen)

Supply exactly two numeric arguments. Number is n, the number of available choices per position, and Chosen is k, the number of positions. Both are approximately floored. The verified implementation requires n≥0, k≥0 and k≤n before computing n^k. Treat this last restriction as a product limitation, not a combinatorial law.

Worksheet data

The literal examples need no range data. H5 is an actually empty cell in the diagnostics.

Reproducible examples

The native column records the saved 4.1.16 results. The independent values use high-precision mathematics; displayed decimals are rounded to twelve places. The data setup above is required for range formulas.

Formula Native 4.1.16 result Independent reference
=PERMUTATIONA(5;2) 25 25
=PERMUTATIONA(10;3) 1000 1000
=PERMUTATIONA(4;4) 256 256
=PERMUTATIONA(8;0) 1 1
=PERMUTATIONA(1;1) 1 1
=PERMUTATIONA(0;0) 1 1
=PERMUTATIONA(6;1) 6 6
=PERMUTATIONA(20;2) 400 400

Practical worksheet

For a three-position code using ten available symbols at each position, repetition allowed, =PERMUTATIONA(10;3) returns 1000. The formula counts strings, so a code beginning with the zero symbol still counts if leading zeroes are allowed by the specification. It does not generate or securely assign those codes.

For three positions using only two symbols, use the explicit mathematical expression =2^3, which is 8. Do not discard valid sequences because PERMUTATIONA rejects k>n. Validate nonnegative whole-number inputs before using a general power expression to model counts.

Advanced interpretation and checks

Without replacement, the corresponding ten-choice three-role count is 10×9×8=720; with replacement it is 10³=1000. The difference is the permission to reuse an item, not whether order matters: order matters in both calculations.

For zero positions the empty sequence count is 1. The native tests confirm both PERMUTATIONA(8;0)=1 and PERMUTATIONA(0;0)=1. The latter is a counting convention in this function, not a general instruction to simplify every analytical expression 0^0.

For a uniform independent code generator, the probability of one specified three-symbol decimal code is 1/1000. Independence and equally likely symbols are additional assumptions. The returned large counts can also lose exact integer precision; formatting more digits cannot recover lost precision.

Boundaries and troubleshooting

The native 5.9, 2.9 case becomes 5²=25. A blank n with k=0 returns 1, whereas negative counts and k>n yield Err:502. Nonnumeric text returns #VALUE!; wrong arity has the listed separate errors. The k≤n limitation is both source-confirmed and executed in the 4.1.16 case, rather than inferred from another product.

These additional formulas were recalculated from the same generated ODF input. H5 is a deliberately empty cell where referenced. Error displays are retained as errors, even when an ODS numeric attribute stores zero.

Formula Observed result or error
=PERMUTATIONA(2;3) Err:502
=PERMUTATIONA(-1;0) Err:502
=PERMUTATIONA(5;-1) Err:502
=PERMUTATIONA(5.9;2.9) 25
=PERMUTATIONA(H5;0) 1
=PERMUTATIONA("abc";2) #VALUE!
=PERMUTATIONA(5) Err:511
=PERMUTATIONA(5;2;1) Err:504

Official evidence and checking scope

The generated ODF input produced the informational load warning “Not all attributes could be read.” After it was acknowledged, the sheet was hard-recalculated and saved separately. Every formula identity, typed input, input label and tested result was reconciled. True empty cells were distinguished from text and logical values. This does not certify every style attribute. The separately prepared XLSX input was not executed. A deliberately stale SUM cache changed from 999999 to 3, and an uncached SUM returned 7 after hard recalculation. Native evidence covers the eight reference formulas and listed diagnostics only. Other explanatory compositions are independent mathematical checks; other releases, locales and extreme-value behavior were not established by this run.