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.

Showing 1-3 of 3 results.

A103762 a(n) = least k with Sum_{j = n..k} 1/j >= 1.

Original entry on oeis.org

1, 4, 7, 10, 12, 15, 18, 20, 23, 26, 29, 31, 34, 37, 39, 42, 45, 48, 50, 53, 56, 58, 61, 64, 67, 69, 72, 75, 77, 80, 83, 86, 88, 91, 94, 97, 99, 102, 105, 107, 110, 113, 116, 118, 121, 124, 126, 129, 132, 135, 137, 140, 143, 145, 148, 151, 154, 156, 159, 162
Offset: 1

Views

Author

David W. Wilson, Apr 14 2008

Keywords

Comments

a(n) = A136617(n) + n for n > 1. Also a(n) = A136616(n-1) + 1 for n > 1.
If you compare this to floor(e*n) = A022843, 2,5,8,10,13,16,..., it appears that floor(e*n)-a(n) = 1,1,1,0,1,1,1,1,1,1,0,..., initially consisting of 0's and 1's. The places where the 0's occur are 4, 11, 18, 25, 32, 36, 43, 50, 57, 64, 71, ... whose differences seem to be 4, 7 or 11.
There are some rather sharp estimates on this type of differences between harmonic numbers in Theorem 3.2 of the Sintamarian reference, which may help to uncover such a pattern. - R. J. Mathar, Apr 15 2008
a(n) = round(e*(n-1/2)) with the exception of the terms of A277603; at those values of n, a(n) = round(e*(n-1/2)) + 1. - Jon E. Schoenfield, Apr 03 2018

Crossrefs

Cf. A136616, A136617, A242679 (Bobo numbers).

Programs

  • Mathematica
    i = 0; s = 0; Table[While[s < 1, i++; s = s + 1/i]; s = s - 1/n; i, {n, 100}] (* T. D. Noe, Jun 26 2012 *)
  • PARI
    default(realprecision, 10^5); e=exp(1);
    a(n) = if(n<2, 1, floor(e*n+(1-e)/2+(e-1/e)/(24*n-12))); \\ Jinyuan Wang, Mar 06 2020

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

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

Original entry on oeis.org

3, 9, 19, 32, 49, 69, 93, 121, 152, 187, 225, 266, 312, 361, 413, 469, 529, 592, 658, 729, 802, 880, 961, 1045, 1133, 1225, 1320, 1419, 1521, 1627, 1736, 1849, 1966, 2086, 2210, 2337, 2468, 2602, 2740, 2882, 3027, 3175, 3327, 3483, 3642, 3805, 3972, 4142
Offset: 1

Views

Author

Clark Kimberling, May 30 2013

Keywords

Examples

			a(3) = 19 because 1/4 + 1/5 + ... + 1/(3+18) < 1 + 1/2 + 1/3 < 1/4 + 1/5 + ... + 1/(3+19).
		

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) = A226183(n) - n. - Michel Marcus, Sep 09 2021
Showing 1-3 of 3 results.