Here is a Matlab script that calculates the sum of the geometric progression using the formula you provided:
main.m233 chars13 lines
You can run this script in Matlab and enter a value for m when prompted. The script will calculate the sum using the given formula and display it as output.
Note that the for loop iterates from n=5 to n=m, which is how we achieve the summation over the range you specified.
gistlibby LogSnag