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.

A226183 Least positive integer k such that 1 + 1/2 + ... + 1/n < 1/(n+1) + ... + 1/k.

Original entry on oeis.org

4, 11, 22, 36, 54, 75, 100, 129, 161, 197, 236, 278, 325, 375, 428, 485, 546, 610, 677, 749, 823, 902, 984, 1069, 1158, 1251, 1347, 1447, 1550, 1657, 1767, 1881, 1999, 2120, 2245, 2373, 2505, 2640, 2779, 2922, 3068, 3217, 3370, 3527, 3687, 3851, 4019, 4190
Offset: 1

Views

Author

Clark Kimberling, May 30 2013

Keywords

Examples

			a(3) = 22 because 1/4 + 1/5 + ... + 1/21 < 1 + 1/2 + 1/3 < 1/4 + 1/5 + ... + 1/22.
		

Crossrefs

Programs

  • Mathematica
    z = 55; f[n_] := 1/n; p[n_] := p[n] = Sum[f[k], {k, 1, n}]; Do[s = 0; a[n] = NestWhile[# + 1 &, 1, ! (s += f[#]) >= 2 p[n] &], {n, 1, z}]; m = Map[a, Range[z]]  (* A226183 *)
    m1 = Table[m[[n]] - n, {n, 1, z}] (* A226184 *)

Formula

a(n) = round(exp(gamma)*n*(n+1) + gamma) where gamma is the Euler-Mascheroni constant 0.57714... (A001620). - Carl R. White, Sep 01 2021
a(n) = A226184(n) + n. - Michel Marcus, Sep 09 2021