Undesrtanding the Arithmetic and geometric progression 1D hypothesis from SMESH

I am trying to get my head around the arithmetic and geometric progression hypothesis (1D Meshing Hypotheses — Mesh 9.10.0 documentation). from the documentation it is not clear how the algorithms calculates the number of elements, it mentions an eqaution without giving any legend to the different components of them. if someone could throw a little bit of light over them I would appreciate it. just to clarify, what I am looking to ensure is from the inputs of the two hypothesis (start/end length and start length and progression) and the length of the edge, how to determine the number of elements.
for example, for arithmetic progression
the Sn=n/2*(min+max), so if thats is the case for a cube of length 100x100x100, and if we use min length 1 max length 20, it should be 10 elements in total, but when we increase slightly the max size, the rounding error for the total number of elements behaves strangelly,
example for 20.05 if we calculate n, it gives a value of ~9.501 so in theory it should be 10 elements but it gives 9 elements. with 20.025 that gives an n equal to ~9.512 it also gives 9 elements but 20.015 that gives an n equal to ~9.517 gives 10 elements. i would like to understand what I am missing to predict reliable the number of elements that will be created.
thanks in advance,