So I am wondering: how can you calculate the product of a sequence? I am doing this because I am making a population simulator. So I have the formula Survival chance = $1-a*x^2$ where $x$ is age in years. The survival chance denotes the chance one individual of age $x$ will survive that year. a is a constant.
Now more interesting: I want to find the life expectancy. To find the life expectancy the product of a sequence of this formula must be $0.5$, starting at the age of $0$. So how can I find the product of the sequence?
So: say $1-0.00008x^2$, which means the product of the sequence of the formula from $0$ to $x$, where $x$ is the life expectancy. I can equal this to $0.5$. But how can I single out $x$? I do not even know how to calculate the product of a sequence.
You will get a very high degree polynomial, which you will not be able to solve algebraically. You will be able to solve it numerically. You just multiply all the terms together. In your model, the chance of surviving the first five years is $1 \cdot (1-a)(1-4a)(1-9a)(1-16a)$. If you want this to be $0.5$ you have a quartic in $a$, which can be solved, but if you want the chance of surviving ten years you are sunk.
Note that the life expectancy is not the year in which the surviving fraction drops below $0.5$, it is the mean of the lifetimes. With your distribution I think the life expectancy will be lower than the age mortality reaches $0.5$ because some of the people have died very young but few will survive past the year mortality crosses $0.5$.