[go: up one dir, main page]

login
A226190
Least positive integer k such that 1 + 1/2 + ... + 1/k >= log(n).
2
1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25, 25, 26, 26, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 38, 38, 39, 39, 40, 40, 41, 42, 42, 43, 43, 44, 44, 45
OFFSET
1,3
LINKS
EXAMPLE
a(9) = 5 because 1 + 1/2 + 1/3 + 1/4 < log(9) < 1 + 1/2 + 1/3 + 1/4 + 1/5.
MATHEMATICA
z = 80; f[n_] := 1/n; Do[s = 0; a[n] = NestWhile[# + 1 &, 1, ! (s += f[#]) > Log[n] &], {n, 1, z}]; m = Map[a, Range[z]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 30 2013
STATUS
approved