## Mathematics series

By Hilaire on Tuesday 3 January 2017, 14:41 - Permalink

My son came to me with a mathematics series, he need to find its convergence. After the mathematics work is done, we want to confirm by calculus the found limit. Dr. Geo can be of some help here.

The series is S = Sum 1 / (k * (k + 1) * (k + 2)). Once cut in three parts it is established it converges toward 1/4.

Then we fired up Dr. Geo to compute a few ten of thousand terms and its sum.

In a Workspace we wrote this tiny script:

| u s | u := [ :k| 1 / (k * (k + 1) * (k + 2) ) ]. s := 0. 1 to: 100000 do: [ :k | s := s + (u value: k) ]. Transcript show: s; tab; show: s asFloat; cr

...and we got the confirmation of our finding:

(1250037500/5000150001) 0.2499999999500015

What is interesting is the exact result Pharo gave us as a fraction number. That's why we also asked for a float version of the sum to more easily realize how close we were to 1/4.