How to use this calculator
Count permutations of n distinct ordered values with exactly k adjacent ascents.
- Enter Permutation length n, Exact number of ascents. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Eulerian permutation ascent count explained
The Eulerian number A(n,k) counts permutations of n distinct values with exactly k ascents, where an ascent occurs when a value is followed by a larger value. The recurrence builds the counts from smaller permutation lengths.
Inputs, symbols, and units
n— Permutation length n- Number n of distinct ordered values in each permutation.
k— Exact number of ascents- Count k of adjacent positions i for which permutation[i] < permutation[i+1]. Valid values are 0 through n−1.
Formula and method
A(n,k)=(n−k)A(n−1,k−1)+(k+1)A(n−1,k)
Use A(1,0)=1 and treat counts outside 0 ≤ k < n as zero in the recurrence. For n=4 and k=1, the 11 counted permutations are those with exactly one adjacent increase.
A worked scenario
Permutation length n = 4; Exact number of ascents = 1.
- Eulerian ascent count: 11
Of the 24 permutations of four distinct values, 11 have exactly one adjacent ascent. The ascent count depends on neighboring positions, not on the size of the gaps between values.
Assumptions and edge cases
Uses the convention A(1,0)=1; an ascent is a position where the next value is larger.
Frequently asked questions
Is an ascent an inversion?
No, an ascent compares adjacent positions only.
What if k≥n?
No such permutation exists.
Are repeated values allowed?
No, values are distinct.
How do I use the Eulerian permutation ascent count calculator?
Enter Permutation length n, Exact number of ascents. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Eulerian permutation ascent count?
Permutation length n = 4; Exact number of ascents = 1. Eulerian ascent count: 11 Of the 24 permutations of four distinct values, 11 have exactly one adjacent ascent. The ascent count depends on neighboring positions, not on the size of the gaps between values.
Read our calculation methodology.