login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226764 Least k such that 1 + 1/2 + ... + 1/k < 1/(k+1) + ... + 1/n. 1
1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
4,8
COMMENTS
For k = 1..20, the runlength of k's is given by 7, 11, 14, 18, 21, 25, 29, 32, 36, 39, 42, 47, 50, 53, 57, 61, 64, 67, 72, 74.
LINKS
FORMULA
a(n) = Sum_{k>=1} sign(1 - sign(2*H_k - H_n)). - Mats Granvik, Apr 06 2021
EXAMPLE
1/3 + 1/4 + ... + 1/10 < 1 + 1/2 < 1/3 + 1/4 + ... + 1/11, so that a(11) = 2.
MATHEMATICA
(* first program *)
h[n_] := HarmonicNumber[n]; f[n_, k_] := f[n, k] = If[2 h[k] <= h[n] && 2 h[k + 1] > h[n], 1, 0]; t[n_] := t[n] = Table[f[n, k], {k, 1, n}]; a[n_] := First[Position[t[n], 1]]; u = Flatten[Table[a[n], {n, 4, 500}]]
(* second program, with plot *)
a[1] = 0; a[n_] := a[n] = NestWhile[# + 1 &, a[n - 1] + 1, Sum[1/k, {k, 1, #}] < Sum[1/k, {k, # + 1, n}] &] - 1; A226764 = Map[a, Range[4, 500]]; ListLogLogPlot[A226764] (* Peter J. C. Moses, Jun 20 2013 *)
CROSSREFS
Cf. A226762.
Sequence in context: A230501 A287272 A300287 * A344420 A206244 A206245
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jun 19 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)