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.

A226763 Least k such that 1/k <= mean of {1, 1/2, 1/3, ..., 1/n}.

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16
Offset: 1

Views

Author

Clark Kimberling, Jun 19 2013

Keywords

Examples

			1/4 < mean{1,1/2,1/3,...,1/9} < 1/3, so that a(9) = 4.
		

Crossrefs

Cf. A226762.

Programs

  • Mathematica
    f[n_] := Mean[Table[1/k, {k, 1, n}]]
    Table[Floor[1/f[n]], {n, 1, 120}]   (* A226762 *)
    Table[Ceiling[1/f[n]], {n, 1, 120}] (* this sequence *)

Formula

a(n) = ceiling(n/(Sum_{k=1..n} 1/k)).

Extensions

Name corrected by Jason Yuen, Nov 02 2024