I've been playing with a particular function $$Q(n) = \sum_{i=1}^n i\cdot i!$$
in C++, and I'm trying to see if it is possible to find the following in an elegant way:
1) Is it possible to rewrite the above function in such a way that it admits a closed form solution?
2) Are there any number theoretic methods that can tell me how many digits are in $Q(n)$ if it written in a particular base $B$?
$\textbf{My attempt:}$ 1) I have a burgeoning suspection that $Q(n) = (n+1)!-1$ but I want to know if any other from is admissable without the factorial, since the time complexity of a factorial function is usually not cheap.
2) I'm completely stumped. I know of methods that would tell me what the last digit would be in base 10 but none that tell me what the total number of digits in a particular base would be