cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A055980 a(n) = floor(Sum_{i=1..n} 1/i).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Henry Bottomley, Jul 20 2000

Keywords

Comments

If we choose at random (uniformly) a permutation in the symmetric group S_n then a(n) is the expected number of cycles (rounded down) in the cycle decomposition of the permutation. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Oct 17 2001
a(n) = A214075(n,n-1) for n > 0. - Reinhard Zumkeller, Jul 03 2012

Crossrefs

Cf. A002387, A004080 (indices of records).

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a055980 = floor . sum . map (1 %) . enumFromTo 1
    a055980_list = map floor $ scanl1 (+) $ map (1 %) [1..]
    -- Reinhard Zumkeller, Jul 03 2012
  • Mathematica
    Floor[HarmonicNumber[Range[110]]] (* Harvey P. Dale, May 22 2021 *)

Formula

a(n) ~ log(n) - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 25 2001
a(n) = floor[A001008(n)/A002805(n)]. - Lekraj Beedassy, Sep 17 2006