login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A168214 Least k such that sum_{i=n..k} 1/i >= n. 0
1, 11, 51, 192, 669, 2222, 7135, 22374, 68916, 209348, 628916, 1872269, 5531641, 16238866, 47410139, 137758585, 398617683, 1149205715, 3302324374, 9461757569, 27038402095, 77082571383, 219276117983, 622541323482, 1764242459656 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..25.

Northwolves, Harmonic number sum

EXAMPLE

1/2 + 1/3 + ... + 1/10 < 2, but 1/2 + 1/3 + ... + 1/11 >= 2, so a(2) = 11.

MATHEMATICA

a[n_] := k /. FindRoot[Sum[1/i, {i, n, k}] == n, {k, n*E^n}, WorkingPrecision -> 32] // Ceiling; Table[a[n], {n, 1, 25}] (* Jean-Fran├žois Alcover, Jun 08 2013 *)

PROG

(VBA)

Sub Harmonic_number_sum()

Dim s As Double, i As Long, j As Long, n As Long

For n = 1 To 15

  s = 0

  For i = n To 1000000000

    s = s + 1 / i

    If s >= n Then Exit For

  Next

Debug.Print "a(" & n & ")=" & i:

Next

End Sub

(PARI)  a(n)=my(k=n, s); while((s+=1./k)<n, k++); k \\ Charles R Greathouse IV, Jun 17 2013

CROSSREFS

Cf. A004080, A002387

Sequence in context: A051843 A107464 A027942 * A321421 A317021 A199895

Adjacent sequences:  A168211 A168212 A168213 * A168215 A168216 A168217

KEYWORD

easy,nice,nonn

AUTHOR

Zhining Yang, Nov 20 2009

EXTENSIONS

a(18)-a(25) from Donovan Johnson, Jun 19 2010

Exampled edited by Jon E. Schoenfield, Dec 20 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 22 18:24 EST 2020. Contains 332148 sequences. (Running on oeis4.)