Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Combinatorics

Tutorials

  • Combinatorics
  • Combinatorics-1
  • Combinatorics-2

Guides

  • Combinatorics
  • Functions I understand in combinatorics

Tech Notes

  • Combinatorics

Symbols

  • CanonicalMultiset
  • CentralBinomialCoefficient
  • ConjugatePartition
  • DescendingSublists
  • DivisorHasseDiagram
  • DominatingIntegerPartitionQ
  • DurfeeSquare
  • EnumerateMultisetPartialDerangements
  • EulerianCatalanNumber
  • EulerianNumber
  • EulerianNumberOfTheSecondKind
  • FerrersDiagram
  • Fibbinary
  • FibonacciEncode
  • FindAscentElements
  • FindAscentPositions
  • FrobeniusSymbolFromPartition
  • FromInversionVector
  • FromPartitionPlusNotation
  • FromPartitionSuperscriptNotation
  • GaussFactorial
  • GrayCode
  • HasseDiagram
  • HookLengths
  • HuffmanCodeWords
  • HuffmanDecode
  • HuffmanEncode
  • IntegerPartitionQ
  • InverseFibonacci
  • InverseGrayCode
  • InversionCount
  • InversionVectorQ
  • LehmerCodeFromPermutation
  • LucasNumberU1
  • LucasNumberV2
  • ModifiedCentralBinomialCoefficient
  • Multichoose
  • MultisetAssociation
  • MultisetPartialDerangements
  • MultisetStrictDescentElements
  • MultisetStrictDescents
  • NarayanaNumber
  • NextPermutation
  • NumberOfTableaux
  • OrderedTupleFromIndex
  • OrderedTupleIndex
  • OrderlessCombinations
  • OrderlessCombinationsOfUnmarkedElements
  • PartialOrderGraphQ
  • PartitionCrank
  • PartitionFromFrobeniusSymbol
  • PartitionPlusNotation
  • PartitionRank
  • PartitionSuperscriptNotation
  • PermutationAscents
  • PermutationCountByInversions
  • PermutationDescents
  • PermutationFromIndex
  • PermutationGraph
  • PermutationIndex
  • PermutationMajorIndex
  • PermutationToTableaux
  • Phitorial
  • PosetQ
  • PosetToTableau
  • Primorial
  • QExponential
  • QMultinomial
  • RandomYoungTableau
  • RationalNumberRepeatingDecimalPeriod
  • ReflexiveGraphQ
  • SecantNumber
  • SelectPermutations
  • SelectSubsets
  • SelectTuples
  • SelfConjugatePartitionQ
  • SignedLahNumber
  • StandardYoungTableaux
  • StrictIntegerPartitions
  • SubsetFromIndex
  • SubsetIndex
  • TableauQ
  • TableauToPoset
  • TableauxToPermutation
  • TangentNumber
  • ToInversionVector
  • TransitiveGraphQ
  • TransposeTableau
  • TupleFromIndex
  • TupleIndex
  • UnsignedLahNumber
  • YoungDiagram
  • ZeckendorfRepresentation
PeterBurbery`Combinatorics`
EulerianNumber
​
EulerianNumber
[n,k]
gives the number of permutations of the numbers 1 to
n
in which exactly
k
elements are greater than the previous element (permutations with
k
"ascents")
​
Details and Options

Examples  
(7)
Basic Examples  
(3)
The table of Eulerian numbers up to 10:
In[1]:=
GridTable
EulerianNumber
[n,k],{n,10},{k,n},FrameAll
Out[1]=
1
​
​
​
​
​
​
​
​
​
1
1
​
​
​
​
​
​
​
​
1
4
1
​
​
​
​
​
​
​
1
11
11
1
​
​
​
​
​
​
1
26
66
26
1
​
​
​
​
​
1
57
302
302
57
1
​
​
​
​
1
120
1191
2416
1191
120
1
​
​
​
1
247
4293
15619
15619
4293
247
1
​
​
1
502
14608
88234
156190
88234
14608
502
1
​
1
1013
47840
455192
1310354
1310354
455192
47840
1013
1
​
Consider the permutation:
In[1]:=
p={2,8,1,5,4,7,6,3,9};
Here are its four ascents, corresponding to
2<8
,
1<5
,
4<7
,
3<9
:
In[2]:=
PermutationAscents
@p
Out[2]=
{1,3,5,8}
​
This counts the number of ascents of the 24 permutations of
{1,2,3,4}
:
In[1]:=
Length@*
PermutationAscents
/@Permutations@Range[4]
Out[1]=
{3,2,2,2,2,1,2,1,2,2,2,1,2,1,1,1,2,1,2,1,1,1,1,0}
This tallies up permutations by the number of ascents:
In[2]:=
Last/@Tally[Sort@Flatten@%]
Out[2]=
{1,11,11,1}
This gives the same list, calculated without implicitly listing the individual ascents:
In[3]:=
EulerianNumber
[4,Range[4]]
Out[3]=
{1,11,11,1}
Scope  
(2)

Properties & Relations  
(1)

Neat Examples  
(1)

SeeAlso
Permutations
 
▪
PermutationList
 
▪
PermutationAscents
 
▪
TangentNumber
RelatedGuides
▪
Combinatorics
▪
Functions I understand in combinatorics
RelatedLinks
▪
Wikipedia—Eulerian number
▪
Sage-math’s documentation for Eulerian numbers
Eulerian Number—Wolfram MathWorld
Tangent Number—Wolfram MathWorld
Eulerian Numbers versus Stirling Numbers of the First Kind—Wolfram Demonstrations Project
EulerianNumber
Resource Function contributed by Wolfram Staff
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com