A well-known question is: On average, how many uniformly random real numbers are needed for their sum to exceed $1$? The answer is $e$.
Let's tweak the question:
On average, how many uniformly random real numbers are needed for the sum of their squares to exceed $1$?
My attempt
Let $f(n)=$ probability that the sum of squares of $n$ uniformly random real numbers is less than $1$.
The probability that the sum of squares exceeds $1$ for the first time with the $n$th random number, is $f(n-1)-f(n)$.
Then the expectation is $\sum\limits_{n=2}^\infty n(f(n-1)-f(n))$.
I have worked out that:
$f(1)=1$
$f(2)=\int_0^1\sqrt{1-{x_1}^2}dx_1$
$f(3)=\int_0^1\int_0^{\sqrt{1-{x_1}^2}}\sqrt{1-{x_1}^2-{x_2}^2}d{x_2}d{x_1}$
$f(4)=\int_0^1\int_0^{\sqrt{1-{x_1}^2}}\int_0^{\sqrt{1-{x_1}^2-{x_2}^2}}\sqrt{1-{x_1}^2-{x_2}^2-{x_3}^2}d{x_3}d{x_2}d{x_1}$
And so on.
With help from Wolfram, the above expressions are:
$f(2)=\frac{\pi}{4}$
$f(3)=\frac{\pi}{6}$
$f(4)=\frac{\pi^2}{32}$
A087299 suggests that $f(n)$ equals the ratio of the volume of an $n$-dimensional ball to the circumscribed $n$-cube, but I don't understand why. Assuming this is true, the expectation is approximately $3.9257708130843$. I don't know if this expectation has a closed form.