A096143 a(n) = ceiling(Sum_{i=1..n} 1/i).
1, 2, 2, 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, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 1
Examples
a(4)=3 because the ceiling of 1 + 1/2 + 1/3 + 1/4 is 3.
Programs
-
Mathematica
Ceiling[HarmonicNumber[Range[110]]] (* Harvey P. Dale, Aug 27 2014 *)
-
PARI
a(n) = ceil(sum(i=1, n, 1/i)) \\ Michel Marcus, Jul 11 2013