Question: Need help trying to figure out what the procedure G is doing

 G := proc (N)
 local s, n;
 s := 0.;
 n := 0;
 while n < N do 
n := n+1;
 s := s+1/n
 end do;
 [s, n] 
end proc;
             G := proc (N) local s, n; s := 0.; n := 0; while n < N do n := n+1; s := s+1/n end do; [s, n] end proc
Compute G(1.0),G(2.0), .....G(7.0) try to figure out what the procedure G is doing
> G(1.0);
[1., 1]
> G(2.0);
[1.500000000, 2]
> G(3.0);
[1.833333333, 3]
> G(4.0);
[2.083333333, 4]
> G(5.0);
[2.283333333, 5]
> G(6.0);
[2.450000000, 6]
> G(7.0);
[2.592857143, 7]
Can someone please tell me what G is doing here?
Please Wait...