A002805 Denominators of harmonic numbers H(n) = Sum_{i=1..n} 1/i.
1, 2, 6, 12, 60, 20, 140, 280, 2520, 2520, 27720, 27720, 360360, 360360, 360360, 720720, 12252240, 4084080, 77597520, 15519504, 5173168, 5173168, 118982864, 356948592, 8923714800, 8923714800, 80313433200, 80313433200, 2329089562800, 2329089562800, 72201776446800
Offset: 1
Examples
H(n) = [ 1, 3/2, 11/6, 25/12, 137/60, 49/20, 363/140, 761/280, 7129/2520, ... ] = A001008/A002805.
References
- Chiu Chang Suan Shu, Neun Bücher arithmetischer Technik, translated and commented by Kurt Vogel, Ostwalds Klassiker der exakten Wissenschaften, Band 4, Friedr. Vieweg & Sohn, Braunschweig, 1968, p. 68.
- John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 258-261.
- R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 259.
- J. Havil, Gamma, (in German), Springer, 2007, p. 35-6; Gamma: Exploring Euler's Constant, Princeton Univ. Press, 2003.
- D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, p. 615.
- G. Pólya and G. Szegő, Problems and Theorems in Analysis, volume II, Springer, reprint of the 1976 edition, 1998, problem 251, p. 154.
- L. E. Sigler, Fibonacci's Liber Abaci, Springer, 2003, pp. 281, 284.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Kenny Lau, Table of n, a(n) for n = 1..2308 [First 200 terms computed by T. D. Noe]
- R. M. Dickau, Harmonic numbers and the book stacking problem.
- Haight, Frank A., and Robert B. Jones., "A probabilistic treatment of qualitative data with special reference to word association tests." Journal of Mathematical Psychology 11.3 (1974): 237-244. [Annotated scanned copy]
- Frank Haight and N. J. A. Sloane, Correspondence, 1975.
- Antal Iványi, Leader election in synchronous networks, Acta Univ. Sapientiae, Mathematica, 5, 2 (2013) 54-82.
- Fredrik Johansson, How (not) to compute harmonic numbers, Feb 21 2009.
- Peter Shiu, The denominators of harmonic numbers, arXiv:1607.02863 [math.NT], 2016.
- N. J. A. Sloane, Illustration of initial terms.
- Jonathan Sondow and Eric W. Weisstein, MathWorld: Harmonic Number.
- Eric Weisstein's World of Mathematics, Book Stacking Problem.
- Bing-Ling Wu, Yong-Gao Chen, On the denominators of harmonic numbers, arXiv:1711.00184 [math.NT], 2017.
Crossrefs
Programs
-
GAP
List([1..30],n->DenominatorRat(Sum([1..n],i->1/i))); # Muniru A Asiru, Dec 20 2018
-
Haskell
import Data.Ratio ((%), denominator) a002805 = denominator . sum . map (1 %) . enumFromTo 1 a002805_list = map denominator $ scanl1 (+) $ map (1 %) [1..] -- Reinhard Zumkeller, Jul 03 2012
-
Magma
[Denominator(HarmonicNumber(n)): n in [1..40]]; // Vincenzo Librandi, Apr 16 2015
-
Maple
seq(denom(sum((2*k-1)/k, k=1..n), n=1..30); # Gary Detlefs, Jul 18 2011 f:=n->denom(add(1/k, k=1..n)); # N. J. A. Sloane, Nov 15 2013
-
Mathematica
Denominator[ Drop[ FoldList[ #1 + 1/#2 &, 0, Range[ 30 ] ], 1 ] ] (* Harvey P. Dale, Feb 09 2000 *) Table[Denominator[HarmonicNumber[n]], {n, 1, 40}] (* Stefan Steinerberger, Apr 20 2006 *) Denominator[Accumulate[1/Range[25]]] (* Alonso del Arte, Nov 21 2018 *)
-
PARI
a(n)=denominator(sum(k=2,n,1/k)) \\ Charles R Greathouse IV, Feb 11 2011
-
Python
from fractions import Fraction def a(n): return sum(Fraction(1, i) for i in range(1, n+1)).denominator print([a(n) for n in range(1, 30)]) # Michael S. Branicky, Dec 24 2021
-
Sage
def harmonic(a, b): # See the F. Johansson link. if b - a == 1 : return 1, a m = (a+b)//2 p, q = harmonic(a,m) r, s = harmonic(m,b) return p*s+q*r, q*s def A002805(n) : H = harmonic(1,n+1); return denominator(H[0]/H[1]) [A002805(n) for n in (1..29)] # Peter Luschny, Sep 01 2012
Formula
a(n) = Denominator(Sum_{k=1..n} (2*k-1)/k). - Gary Detlefs, Jul 18 2011
a(n) = n! / gcd(Stirling1(n+1, 2), n!) = n! / gcd(A000254(n),n!). - Max Alekseyev, Mar 01 2018
a(n) = the (reduced) denominator of the continued fraction 1/(1 - 1^2/(3 - 2^2/(5 - 3^2/(7 - ... - (n-1)^2/(2*n-1))))). - Peter Bala, Feb 18 2024
Extensions
Definition edited by Daniel Forgues, May 19 2010
Comments