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

Guides

  • Combinatorics
  • Functions I understand in combinatorics

Tech Notes

  • Combinatorics
  • Stirling permutation

Symbols

  • CanonicalMultiset
  • CentralBinomialCoefficient
  • ConjugatePartition
  • DescendingSublists
  • DivisorHasseDiagram
  • DominatingIntegerPartitionQ
  • DurfeeSquare
  • EnumerateMultisetPartialDerangements
  • EulerianCatalanNumber
  • EulerianNumber
  • EulerianNumberOfTheSecondKind
  • FerrersDiagram
  • Fibbinary
  • FibonacciEncode
  • FindAscentElements
  • FindAscentPositions
  • FindDescentElements
  • FindDescentPositions
  • FrobeniusSymbolFromPartition
  • FromInversionVector
  • FromPartitionPlusNotation
  • FromPartitionSuperscriptNotation
  • GaussFactorial
  • GrayCode
  • HasseDiagram
  • HookLengths
  • HuffmanCodeWords
  • HuffmanDecode
  • HuffmanEncode
  • IntegerPartitionQ
  • InverseFibonacci
  • InverseGrayCode
  • InversionCount
  • InversionVectorQ
  • LehmerCodeFromPermutation
  • LucasNumberU1
  • LucasNumberV2
  • ModifiedCentralBinomialCoefficient
  • Multichoose
  • MultisetAssociation
  • MultisetPartialDerangements
  • NarayanaNumber
  • NextPermutation
  • NumberOfTableaux
  • OrderedTupleFromIndex
  • OrderedTupleIndex
  • OrderlessCombinations
  • OrderlessCombinationsOfUnmarkedElements
  • PartialOrderGraphQ
  • PartitionCrank
  • PartitionFromFrobeniusSymbol
  • PartitionPlusNotation
  • PartitionRank
  • PartitionSuperscriptNotation
  • PermutationCountByInversions
  • PermutationFromIndex
  • PermutationGraph
  • PermutationIndex
  • PermutationMajorIndex
  • PermutationToTableaux
  • Phitorial
  • PosetQ
  • PosetToTableau
  • Primorial
  • QExponential
  • QMultinomial
  • RandomYoungTableau
  • RationalNumberRepeatingDecimalPeriod
  • ReflexiveGraphQ
  • SecantNumber
  • SelectPermutations
  • SelectSubsets
  • SelectTuples
  • SelfConjugatePartitionQ
  • SignedLahNumber
  • StandardYoungTableaux
  • StirlingPermutationGraph
  • StirlingPermutations
  • StrictIntegerPartitions
  • SubsetFromIndex
  • SubsetIndex
  • TableauQ
  • TableauToPoset
  • TableauxToPermutation
  • TangentNumber
  • ToInversionVector
  • TransitiveGraphQ
  • TransposeTableau
  • TupleFromIndex
  • TupleIndex
  • UnsignedLahNumber
  • YoungDiagram
  • ZeckendorfRepresentation
PeterBurbery`Combinatorics`
SecantNumber
​
SecantNumber
[n]
calculates the
n
th secant number.
​
Details and Options

Examples  
(1)
Basic Examples  
(1)
Make a table of secant numbers:
In[1]:=
SecantNumber
[Range[21]]
Out[1]=
{1,5,61,1385,50521,2702765,199360981,19391512145,2404879675441,370371188237525,69348874393137901,15514534163557086905,4087072509293123892361,1252259641403629865468285,441543893249023104553682821,177519391579539289436664789665,80723299235887898062168247453281,41222060339517702122347079671259045,23489580527043108252017828576198947741,14851150718114980017877156781405826684425,10364622733519612119397957304745185976310201}
Here are some different ways of computing the sequence of secant numbers.
In[2]:=
Take[Range[0,32]!*CoefficientList[Series[Sec[x],{x,0,32}],x],{1,32,2}](*RobertG.Wilsonv,Apr232006*)
Out[2]=
{1,1,5,61,1385,50521,2702765,199360981,19391512145,2404879675441,370371188237525,69348874393137901,15514534163557086905,4087072509293123892361,1252259641403629865468285,441543893249023104553682821}
In[3]:=
Table[Abs[EulerE[2n]],{n,0,10}](*RayChandler,Mar202007*)
Out[3]=
{1,1,5,61,1385,50521,2702765,199360981,19391512145,2404879675441,370371188237525}
In[4]:=
a[n_]:=If[n<0,0,With[{m=2n},m!SeriesCoefficient[Sec[x],{x,0,m}]]];(*MichaelSomos,Nov222013*)
In[5]:=
Table[a[n],{n,1,10,1}]
Out[5]=
{1,5,61,1385,50521,2702765,199360981,19391512145,2404879675441,370371188237525}
In[6]:=
a[n_]:=If[n<0,0,With[{m=2n+1},m!SeriesCoefficient[InverseGudermannian[x],{x,0,m}]]];(*MichaelSomos,Nov222013*)
In[7]:=
Table[a[n],{n,1,10,1}]
Out[7]=
{1,5,61,1385,50521,2702765,199360981,19391512145,2404879675441,370371188237525}
In[8]:=
a[n_]:=Sum[Sum[Binomial[k,m](-1)^(n+k)/(2^(m-1))Sum[Binomial[m,j]*(2j-m)^(2n),{j,0,m/2}](-1)^(k-m),{m,0,k}],{k,1,2n}];Table[a[n],{n,0,16}](*Jean-FrançoisAlcover,Jun262019,afterVladimirKruchinin*)
Out[8]=
{0,1,5,61,1385,50521,2702765,199360981,19391512145,2404879675441,370371188237525,69348874393137901,15514534163557086905,4087072509293123892361,1252259641403629865468285,441543893249023104553682821,177519391579539289436664789665}
SeeAlso
TangentNumber
 
▪
InverseGudermannian
 
▪
EulerE
RelatedGuides
▪
Combinatorics
RelatedLinks
▪
OEIS—A000364 Euler (or secant or Zig) numbers: e.g.f. (even powers only) sec(x) = 1/cos(x).
MathWorld—Secant number
""

© 2025 Wolfram. All rights reserved.

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