|
|
A004080
|
|
Least k such that H(k) >= n, where H(k) is the harmonic number Sum_{i=1..k} 1/i.
|
|
32
|
|
|
0, 1, 4, 11, 31, 83, 227, 616, 1674, 4550, 12367, 33617, 91380, 248397, 675214, 1835421, 4989191, 13562027, 36865412, 100210581, 272400600, 740461601, 2012783315, 5471312310, 14872568831, 40427833596, 109894245429, 298723530401, 812014744422
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
REFERENCES
|
Bruno Rizzi and Cristina Scagliarini: I numeri armonici. Periodico di matematiche, "Mathesis", pp. 17-58, 1986, numbers 1-2. [From Vincenzo Librandi, Jan 05 2009]
W. Sierpiński, Sur les décompositions de nombres rationnels, Oeuvres Choisies, Académie Polonaise des Sciences, Warsaw, Poland, 1974, p. 181.
N. J. A. Sloane, Illustration for sequence M4299 (=A007340) in The Encyclopedia of Integer Sequences (with Simon Plouffe), Academic Press, 1995.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(2)=4 because 1/1 + 1/2 + 1/3 + 1/4 > 2.
|
|
MATHEMATICA
|
aux[0] = 0; Do[aux[n] = Floor[Floor[Sum[1/i, {i, n}]]]; If[aux[n] > aux[n - 1], Print[n]], {n, 1, 14000}] (* José María Grau Ribas, Feb 20 2010 *)
a[0] = 0; a[1] = 1; a[n_] := k /. FindRoot[ HarmonicNumber[k] == n, {k, Exp[n - EulerGamma]}, WorkingPrecision -> 50] // Ceiling; Table[a[n], {n, 0, 28}] (* Jean-François Alcover, Aug 13 2013, after Charles R Greathouse IV *)
|
|
PROG
|
(PARI) my(t=0, n=0); for(i=0, 10^20, if (i, t+=1./i); if(t>=n, print1(i, ", "); n++)) \\ Thomas Gettys (tpgettys(AT)comcast.net), Jan 21 2007; corrected by Michel Marcus, Jan 19 2022
(Haskell)
import Data.List (findIndex); import Data.Maybe (fromJust)
a004080 n = fromJust $
findIndex (fromIntegral n <=) $ scanl (+) 0 $ map recip [1..]
|
|
CROSSREFS
|
Apart from first two terms, same as A002387.
|
|
KEYWORD
|
nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
a(27) from Thomas Gettys (tpgettys(AT)comcast.net), Dec 05 2006
a(28) from Thomas Gettys (tpgettys(AT)comcast.net), Jan 21 2007
|
|
STATUS
|
approved
|
|
|
|