Given
S(n)= 1*1!+2*2!+3*3!+4*4!+…n*(n)!
Evaluate S(100)
(In reply to
Puzzle Solution by K Sengupta)
term=sym(1);
S=term;
fact=sym(1); supp=S
for t=sym(2):100
fact=fact*t;
term=fact*sym(t);
S=S+term;
end
supp= fact*sym(101)
S
supp
finds
>> factorialsGalore
S =
94259477598383594208516231244829367495623127947025437683278893534169775993162214 76503087861591808346911623490003549599583369706302603263999999999999999999999999
a 160-digit number, its two halves shown on separate lines.
supp =
94259477598383594208516231244829367495623127947025437683278893534169775993162214 76503087861591808346911623490003549599583369706302603264000000000000000000000000
which is 101! and indeed 1 higher than S.
|
Posted by Charlie
on 2023-04-04 13:32:26 |