TCS
Company
1!+2!+........+50!=?
Read Solution (Total 1)
-
- this summation can be defined by reverse recurssion
if you want the sum of the factorials from 1 to n then start with
s(n) = n
and then
s(i) = i * ( 1 + s(i+1) )
and s(1) gives the summation
for example if n=4 we have
s(4)=4
s(3)=3*(4+1)=15
s(2)=2*(15+1)=32
s(1)=1*(28+1)=33
which agrees with
1!+2!+3!+4! = 1+2+6+24
using a computer program and using this recurssion method I get the sum as
31035053229546199656252032972759319953…
i dont think there is a mathematical formula for it.. but the following program works
public class A
{
public static void main(String[] args)
{
int answer = 1;
int sum = 0;
for (int i = 1; i - 12 years agoHelpfull: Yes(3) No(20)
TCS Other Question