how to calculate this sym of serie?

1 view (last 30 days)
N/A
N/A on 4 Feb 2015
Commented: N/A on 4 Feb 2015
z=q+q*(q-1)+q*(q-1)*(q-2)+...+q*(q-1)*(q-2)*...*(q-n)

Accepted Answer

Image Analyst
Image Analyst on 4 Feb 2015
Try this intuitive, brute force method:
clc;
% Sample numbers:
q = 10;
n = 3;
theSum = 0;
for k = 0 : n
qArray = q : -1 : q-k;
p = prod(qArray)
theSum = theSum + p;
end
% Print to command window
theSum

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!