{
  "id": "euler-mascheroni-constant",
  "title": "Euler–Mascheroni Constant",
  "lang": "en",
  "source_lang": "en",
  "summary": "The Euler–Mascheroni constant is the limiting difference between harmonic numbers and the natural logarithm, appearing throughout analysis, number theory, and probability.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "Euler's constant",
    "Euler constant",
    "Mascheroni constant"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/euler-mascheroni-constant/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/euler-mascheroni-constant/",
      "json": "https://aiwiki.page/zh/euler-mascheroni-constant.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The Euler–Mascheroni constant, conventionally denoted by \\(\\gamma\\), is the real number defined by\n\n\\[\\gamma=\\lim_{n\\to\\infty}\\left(\\sum_{k=1}^{n}\\frac1k-\\ln n\\right) =0.577215664901532860606512090082402431\\ldots.\\]\n\nIt measures the limiting difference between the partial sums of the harmonic series and the natural logarithm. The constant occurs in mathematical analysis, number theory, and probability, particularly in formulas involving the gamma and zeta functions. Despite extensive study, it is not known whether \\(\\gamma\\) is rational or irrational."
    },
    {
      "heading": "Definition and existence",
      "text": "The \\(n\\)th harmonic number is\n\n\\[H_n=\\sum_{k=1}^{n}\\frac1k.\\]\n\nBoth \\(H_n\\) and \\(\\ln n\\) grow without bound, but their difference approaches a finite limit. Thus the definition of \\(\\gamma\\) concerns the difference of two divergent quantities evaluated at the same finite index, not a subtraction of independently defined infinities.\n\nExistence of the limit follows from elementary integral comparisons. Set\n\n\\[a_n=H_n-\\ln n.\\]\n\nThen\n\n\\[a_{n+1}-a_n =\\frac1{n+1}-\\ln\\left(1+\\frac1n\\right)<0,\\]\n\nbecause\n\n\\[\\ln\\left(1+\\frac1n\\right) =\\int_n^{n+1}\\frac{dx}{x} >\\frac1{n+1}.\\]\n\nMeanwhile,\n\n\\[H_n>\\int_1^{n+1}\\frac{dx}{x}=\\ln(n+1),\\]\n\nso \\(a_n>0\\). The sequence is therefore decreasing and bounded below, and consequently converges.\n\nAn equivalent definition is\n\n\\[\\gamma=\\lim_{n\\to\\infty}\\bigl(H_n-\\ln(n+1)\\bigr).\\]\n\nTogether, the two sequences give the bounds\n\n\\[H_n-\\ln(n+1)<\\gamma<H_n-\\ln n.\\]\n\nGeometric interpretation\n\nThe sum \\(H_n\\) is the total area of rectangles of width \\(1\\) and heights \\(1,1/2,\\ldots,1/n\\). The logarithm \\(\\ln n\\) is the area under \\(y=1/x\\) from \\(1\\) to \\(n\\). The constant is the limiting excess of the rectangle area over this integral.\n\nThis interpretation illustrates a recurring role of \\(\\gamma\\): it is a correction term when a discrete sum is compared with a continuous integral."
    },
    {
      "heading": "History and notation",
      "text": "Leonhard Euler introduced the constant in his investigations of harmonic sums during the 1730s. Lorenzo Mascheroni subsequently studied it and calculated further decimal digits in work published in 1790. The compound name recognizes these early contributions.\n\nThe notation \\(\\gamma\\) became standard later. The alternative name “Euler's constant” should not be confused with Euler's number \\(e\\), the base of natural logarithms. Nor is the constant \\(\\gamma\\) the same object as the gamma function \\(\\Gamma(z)\\), although the two are closely related."
    },
    {
      "heading": "Series and integral representations",
      "text": "Telescoping logarithms in the defining limit gives the convergent series\n\n\\[\\gamma =\\sum_{k=1}^{\\infty} \\left(\\frac1k-\\ln\\left(1+\\frac1k\\right)\\right).\\]\n\nEach summand is positive and behaves like \\(1/(2k^2)\\), which explains convergence.\n\nA representation involving the Riemann zeta function is\n\n\\[\\gamma =\\sum_{m=2}^{\\infty}\\frac{(-1)^m}{m}\\zeta(m).\\]\n\nIt follows by expanding \\(\\ln(1+1/k)\\), initially separating the endpoint \\(k=1\\) when justifying the rearrangement. Here\n\n\\[\\zeta(s)=\\sum_{k=1}^{\\infty}k^{-s} \\qquad (s>1).\\]\n\nTwo useful integral representations are\n\n\\[\\gamma=-\\int_0^\\infty e^{-x}\\ln x\\,dx\\]\n\nand\n\n\\[\\gamma=\\int_0^1 \\left(\\frac1{1-x}+\\frac1{\\ln x}\\right)\\,dx.\\]\n\nIn the second expression, the apparent singularities at \\(x=1\\) cancel when the terms are combined. The two terms cannot instead be integrated separately as convergent improper integrals."
    },
    {
      "heading": "Asymptotic expansion and numerical calculation",
      "text": "The Euler–Maclaurin formula yields the asymptotic expansion\n\n\\[H_n\\sim \\ln n+\\gamma+\\frac1{2n} -\\frac1{12n^2} +\\frac1{120n^4} -\\frac1{252n^6}+\\cdots.\\]\n\nMore precisely, truncation after any fixed number of terms gives an approximation with a controlled error as \\(n\\to\\infty\\). The full expression is an asymptotic series, not generally a convergent series for fixed \\(n\\).\n\nThe first terms imply\n\n\\[H_n-\\ln n-\\gamma =\\frac1{2n}+O(n^{-2}),\\]\n\nwhere \\(O\\) is big-O notation. Consequently, the defining limit converges slowly: increasing \\(n\\) by a factor of ten gains only about one decimal digit.\n\nSubtracting the leading correction greatly improves the approximation:\n\n\\[\\gamma =H_n-\\ln n-\\frac1{2n} +\\frac1{12n^2}+O(n^{-4}).\\]\n\nA useful explicit bound is\n\n\\[\\frac1{2(n+1)} <H_n-\\ln n-\\gamma <\\frac1{2n}.\\]\n\nHigh-precision algorithms use accelerated representations rather than simply summing an enormous number of harmonic terms. In numerical analysis, error bounds and the management of rounding error are essential for certifying the resulting digits."
    },
    {
      "heading": "Connections with special functions",
      "text": "Gamma and digamma functions\n\nFor positive real \\(z\\), the gamma function is defined by\n\n\\[\\Gamma(z)=\\int_0^\\infty x^{z-1}e^{-x}\\,dx.\\]\n\nDifferentiation at \\(z=1\\) gives\n\n\\[\\Gamma'(1) =\\int_0^\\infty e^{-x}\\ln x\\,dx =-\\gamma.\\]\n\nThe digamma function is the logarithmic derivative\n\n\\[\\psi(z)=\\frac{\\Gamma'(z)}{\\Gamma(z)}.\\]\n\nSince \\(\\Gamma(1)=1\\),\n\n\\[\\psi(1)=-\\gamma.\\]\n\nAt positive integers,\n\n\\[\\psi(n+1)=H_n-\\gamma,\\]\n\nwhich extends the relationship between harmonic numbers and \\(\\gamma\\) into the theory of special functions.\n\nThe constant also appears in the expansion\n\n\\[\\log\\Gamma(1+z) =-\\gamma z+ \\sum_{m=2}^{\\infty} \\frac{(-1)^m\\zeta(m)}{m}z^m, \\qquad |z|<1.\\]\n\nFor complex \\(z\\), the logarithm here is the analytic branch near \\(z=0\\) whose value there is zero.\n\nZeta function near its pole\n\nThe zeta function has a simple pole at \\(s=1\\), and its local expansion begins\n\n\\[\\zeta(s)=\\frac1{s-1}+\\gamma+O(s-1).\\]\n\nEquivalently,\n\n\\[\\lim_{s\\to1}\\left(\\zeta(s)-\\frac1{s-1}\\right)=\\gamma.\\]\n\nThus \\(\\gamma\\) is the constant term remaining after the singular part is removed. In the wider Laurent expansion of \\(\\zeta(s)\\), it is the zeroth Stieltjes constant."
    },
    {
      "heading": "Applications",
      "text": "Counting divisors\n\nLet \\(d(n)\\) denote the number of positive divisors of the positive integer \\(n\\). A classical estimate is\n\n\\[\\sum_{n\\le x}d(n) =x\\ln x+(2\\gamma-1)x+O(\\sqrt{x}).\\]\n\nThe leading term describes the main growth of the cumulative divisor count; the next term contains \\(\\gamma\\).\n\nThis relationship arises by counting integer lattice points satisfying \\(ab\\le x\\). Harmonic sums appear naturally when the count is organized according to one coordinate.\n\nProbability and extreme values\n\nIf \\(X\\) has the exponential distribution with rate \\(1\\), then its expected value after taking a logarithm is\n\n\\[\\mathbb E[\\ln X] =\\int_0^\\infty e^{-x}\\ln x\\,dx =-\\gamma.\\]\n\nIf \\(X_1,\\ldots,X_n\\) are independent exponential random variables with rate \\(1\\), their maximum satisfies\n\n\\[\\mathbb E\\!\\left[\\max(X_1,\\ldots,X_n)\\right]=H_n.\\]\n\nConsequently,\n\n\\[\\mathbb E\\!\\left[\\max(X_1,\\ldots,X_n)\\right]-\\ln n \\longrightarrow\\gamma.\\]\n\nThe limiting distribution of the centered maximum is the standard Gumbel distribution, whose cumulative distribution function is\n\n\\[F(x)=\\exp(-e^{-x}).\\]\n\nIts mean is \\(\\gamma\\), providing a probabilistic interpretation of the same constant."
    },
    {
      "heading": "Arithmetic status",
      "text": "It remains unknown whether \\(\\gamma\\) is a rational number or an irrational number. In particular, no proof establishes that its decimal expansion is nonrepeating.\n\nIt is also unknown whether \\(\\gamma\\) is a transcendental number. Transcendence would imply irrationality, so this is a stronger unresolved question.\n\nThe occurrence of \\(\\gamma\\) in formulas containing logarithms, the gamma function, or zeta values does not by itself determine its arithmetic nature. Likewise, extensive decimal calculations and rational approximations do not constitute a proof of irrationality."
    }
  ],
  "links": [
    "real-number",
    "natural-logarithm",
    "mathematical-analysis",
    "number-theory",
    "harmonic-number",
    "limit",
    "leonhard-euler",
    "e-mathematical-constant",
    "infinite-series",
    "riemann-zeta-function",
    "integral",
    "asymptotic-expansion",
    "big-o-notation",
    "numerical-analysis",
    "gamma-function",
    "digamma-function",
    "exponential-distribution",
    "expected-value",
    "rational-number",
    "irrational-number",
    "transcendental-number"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}