{
  "id": "harmonic-series",
  "title": "Harmonic Series",
  "lang": "en",
  "source_lang": "en",
  "summary": "The harmonic series is the divergent sum of the reciprocals of the positive integers, whose partial sums grow logarithmically.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "The harmonic series",
    "reciprocal-integer series"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/harmonic-series/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/harmonic-series/",
      "json": "https://aiwiki.page/zh/harmonic-series.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The harmonic series is the infinite series\n\n\\[\\sum_{n=1}^{\\infty}\\frac1n =1+\\frac12+\\frac13+\\frac14+\\cdots.\\]\n\nAlthough its terms approach zero, its partial sums increase without bound, so the series diverges to positive infinity. It is a fundamental example in mathematical analysis demonstrating that terms tending to zero are necessary, but not sufficient, for convergence. Its partial sums, called harmonic numbers, grow approximately as the natural logarithm of the number of terms."
    },
    {
      "heading": "Definition and terminology",
      "text": "The \\(n\\)th harmonic number is\n\n\\[H_n=\\sum_{k=1}^{n}\\frac1k, \\qquad n\\geq1.\\]\n\nThe harmonic series converges only if the sequence \\(H_n\\) has a finite limit. Instead,\n\n\\[\\lim_{n\\to\\infty}H_n=+\\infty.\\]\n\nWriting that the series “equals infinity” is therefore shorthand for divergence to positive infinity, not an assertion that infinity is a real-valued sum.\n\nThe word harmonic reflects a connection with musical harmonics: the wavelengths of successive harmonics of an ideal vibrating string are proportional to \\(1,1/2,1/3,\\ldots\\). The reciprocal integers also form a harmonic progression, meaning that their reciprocals form an arithmetic progression. This numerical series should not be confused with a Fourier series, which represents a function through trigonometric components."
    },
    {
      "heading": "Why the series diverges",
      "text": "Grouping terms\n\nA classical proof groups terms into blocks of successively doubled length:\n\n\\[1+\\frac12 +\\left(\\frac13+\\frac14\\right) +\\left(\\frac15+\\cdots+\\frac18\\right) +\\left(\\frac19+\\cdots+\\frac1{16}\\right)+\\cdots.\\]\n\nFor each integer \\(j\\geq1\\), the block from \\(2^{j-1}+1\\) to \\(2^j\\) contains \\(2^{j-1}\\) terms, each at least \\(1/2^j\\). Consequently,\n\n\\[\\sum_{k=2^{j-1}+1}^{2^j}\\frac1k\\geq\\frac12.\\]\n\nThus\n\n\\[H_{2^m}\\geq1+\\frac m2.\\]\n\nThe right-hand side grows without bound. Since every term is positive, all sufficiently long partial sums—not merely those indexed by powers of two—exceed any prescribed finite bound.\n\nThis argument is commonly associated with the fourteenth-century mathematician Nicole Oresme. It is an early and influential example of a proof about an infinite process using finite inequalities.\n\nIntegral comparison\n\nThe function \\(1/x\\) is positive and decreasing for \\(x>0\\). Comparing rectangles with the area beneath its graph gives\n\n\\[\\int_1^{n+1}\\frac{dx}{x} \\leq H_n \\leq1+\\int_1^n\\frac{dx}{x}.\\]\n\nUsing the natural logarithm,\n\n\\[\\log(n+1)\\leq H_n\\leq1+\\log n.\\]\n\nSince \\(\\log n\\) is unbounded, the harmonic series diverges.\n\nThese inequalities are an application of the integral test for series. They also show that the divergence is logarithmic rather than linear.\n\nFailure of the Cauchy criterion\n\nFor every positive integer \\(n\\),\n\n\\[H_{2n}-H_n =\\sum_{k=n+1}^{2n}\\frac1k \\geq\\frac12.\\]\n\nHence arbitrarily late partial sums can still differ by at least \\(1/2\\). The partial sums do not form a Cauchy sequence, so they cannot converge in the real numbers.\n\nThis formulation identifies the essential issue: individual terms become small, but sufficiently long blocks of them retain a substantial total."
    },
    {
      "heading": "Rate of growth and Euler's constant",
      "text": "The integral bounds imply\n\n\\[\\lim_{n\\to\\infty}\\frac{H_n}{\\log n}=1.\\]\n\nA more precise result is that the difference \\(H_n-\\log n\\) approaches the Euler–Mascheroni constant:\n\n\\[\\gamma =\\lim_{n\\to\\infty}(H_n-\\log n) \\approx0.5772156649.\\]\n\nThe limit exists because \\(H_n-\\log n\\) is decreasing and bounded below. In particular,\n\n\\[(H_{n+1}-\\log(n+1))-(H_n-\\log n) =\\frac1{n+1}-\\log\\left(1+\\frac1n\\right)<0,\\]\n\nwhile the integral bounds give a lower bound of zero.\n\nAn asymptotic expansion gives greater precision:\n\n\\[H_n =\\log n+\\gamma+\\frac1{2n} -\\frac1{12n^2} +\\frac1{120n^4} +O(n^{-6}),\\]\n\nwhere big-O notation describes the size of the remainder as \\(n\\) grows.\n\nThe logarithmic growth is extremely slow. For example,\n\n\\[H_{10^6}\\approx14.3927.\\]\n\nFor a large target value \\(M\\), the number of terms needed for the partial sum to reach approximately \\(M\\) is\n\n\\[n\\approx e^{M-\\gamma}.\\]\n\nThus a modest increase in the desired partial sum requires a large multiplicative increase in the number of terms.\n\nA related limit is\n\n\\[H_{2n}-H_n\\longrightarrow\\log2.\\]\n\nDoubling the number of terms eventually adds approximately the same amount each time."
    },
    {
      "heading": "Related series",
      "text": "Generalized harmonic series\n\nThe generalized harmonic series, or \\(p\\)-series, is\n\n\\[\\sum_{n=1}^{\\infty}\\frac1{n^p},\\]\n\nwhere \\(p\\) is real. It converges exactly when \\(p>1\\).\n\nFor \\(p>1\\), convergence follows from comparison with the improper integral of \\(x^{-p}\\). For \\(p\\leq1\\), its terms are at least \\(1/n\\), so the series diverges. The harmonic series is therefore the boundary case between convergence and divergence in this family.\n\nFor a complex variable \\(s\\) with real part greater than \\(1\\), the same expression defines the Riemann zeta function:\n\n\\[\\zeta(s)=\\sum_{n=1}^{\\infty}\\frac1{n^s}.\\]\n\nIts analytic continuation has a simple pole at \\(s=1\\), with local expansion\n\n\\[\\zeta(s)=\\frac1{s-1}+\\gamma+O(s-1).\\]\n\nThis pole is closely connected to the divergence of the harmonic series. Analytic continuation does not give the original series a finite ordinary sum.\n\nAlternating harmonic series\n\nChanging the signs of alternate terms produces the alternating harmonic series:\n\n\\[1-\\frac12+\\frac13-\\frac14+\\cdots =\\sum_{n=1}^{\\infty}\\frac{(-1)^{n-1}}n =\\log2.\\]\n\nIt converges because the term magnitudes decrease to zero. Its sum can be obtained by integrating the finite geometric identity\n\n\\[\\sum_{k=0}^{N-1}(-x)^k=\\frac{1-(-x)^N}{1+x}\\]\n\nover \\(0\\leq x\\leq1\\), then observing that the integrated remainder tends to zero.\n\nIts absolute-value series is the divergent harmonic series, so its convergence is conditional rather than absolute. This distinction matters: rearranging the terms of a conditionally convergent real series can change its sum or cause divergence.\n\nSubseries and restrictions on denominators\n\nSome subseries of the harmonic series converge, while others diverge.\n\nRestricting the denominator to powers of two gives the convergent geometric series\n\n\\[\\sum_{k=0}^{\\infty}\\frac1{2^k}=2.\\]\n\nRestricting it to positive even integers gives\n\n\\[\\sum_{k=1}^{\\infty}\\frac1{2k} =\\frac12\\sum_{k=1}^{\\infty}\\frac1k,\\]\n\nwhich still diverges. More generally, reciprocals along any fixed arithmetic progression of positive integers have a divergent sum.\n\nA deeper result in number theory, established by Leonhard Euler, is that\n\n\\[\\sum_{p\\ \\mathrm{prime}}\\frac1p\\]\n\nalso diverges, despite the increasing sparsity of the prime numbers."
    },
    {
      "heading": "Applications",
      "text": "Probability and the coupon collector problem\n\nIn the coupon collector problem, independent draws select uniformly from \\(n\\) possible types. The expected number of draws required to observe every type is\n\n\\[nH_n.\\]\n\nAfter \\(k\\) distinct types have appeared, the probability that the next draw produces a new type is \\((n-k)/n\\). The expected waiting time for the next new type is therefore \\(n/(n-k)\\). Adding these waiting times gives\n\n\\[\\sum_{k=0}^{n-1}\\frac{n}{n-k}=nH_n.\\]\n\nThe expected value consequently grows as\n\n\\[n\\log n+\\gamma n+O(1).\\]\n\nAlgorithms\n\nHarmonic sums occur in the analysis of an algorithm whenever the work or probability associated with its \\(k\\)th stage is proportional to \\(1/k\\).\n\nFor example, in a uniformly random ordering of \\(n\\) distinct values, the probability that the \\(k\\)th value is larger than every preceding value is \\(1/k\\). By linearity of expectation, the expected number of such record values is \\(H_n\\), and therefore grows logarithmically.\n\nIdealized block stacking\n\nIn an idealized stack of identical uniform blocks, with static balance and no limit on material strength, each additional block permits an incremental overhang inversely proportional to its position in the balancing construction. For blocks of length \\(L\\), the standard construction gives an overhang\n\n\\[\\frac L2H_n\\]\n\nbeyond the edge of the support.\n\nThe divergence of \\(H_n\\) means that this idealized construction permits arbitrarily large overhang using sufficiently many blocks. Real materials and finite precision impose practical restrictions absent from the model."
    },
    {
      "heading": "Computational considerations",
      "text": "Because the divergence is so slow, numerical experiments over a limited range can obscure it. Conversely, a very large finite partial sum remains finite and does not itself establish divergence.\n\nDirect summation is also subject to floating-point rounding. At sufficiently large indices, adding \\(1/n\\) to a stored partial sum may no longer change that stored value, even though the exact partial sum increases. Such numerical stagnation is an artifact of finite precision, not evidence of convergence. For large \\(n\\), logarithmic approximations with correction terms provide a more efficient way to estimate \\(H_n\\) than adding every term."
    }
  ],
  "links": [
    "infinite-series",
    "mathematical-analysis",
    "harmonic-number",
    "limit",
    "music",
    "fourier-series",
    "mathematical-proof",
    "natural-logarithm",
    "integral",
    "cauchy-sequence",
    "euler-mascheroni-constant",
    "asymptotic-expansion",
    "big-o-notation",
    "p-series",
    "riemann-zeta-function",
    "analytic-continuation",
    "geometric-series",
    "number-theory",
    "leonhard-euler",
    "prime-number",
    "expected-value",
    "algorithm",
    "floating-point-arithmetic"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}