Skip to main content
2 of 3
added 12 characters in body
user avatar
user avatar

Axiom, 45 bytes

f(x:PI):Float==reduce(+,[1./n for n in 1..x]) 

1 Indexed; test and results:

(7) -> [[i,f(i)] for i in 1..9] (7) [[1.0,1.0], [2.0,1.5], [3.0,1.8333333333 333333333], [4.0,2.0833333333 333333333], [5.0,2.2833333333 333333333], [6.0,2.45], [7.0,2.5928571428 571428572], [8.0,2.7178571428 571428572], [9.0,2.8289682539 682539683]] Type: List List Float 
user58988