I've come up with an algorithm that relies upon the value of the following product:
$$Q_{k} =\prod_{n=0}^k [f(n) - 1]$$
Where $f(n) \ge 2$ and strictly increasing integer function [see note]. Importantly, I already know the value of $P_{k} = \displaystyle\prod_{n=0..k} f(n)$ from a previous step.
In benchmarking, the $0..k$ loop turns out to be a significant bottleneck in my algorithm, and having to $also$ calculate the $Q_{k}$ product doubles the coefficient so my loop is now $0..2k$ (big-theta Θ$(3k)$ if you count the subtraction step).
Hence, is there any way to simplify the $-1$ term of the above product to avoid looping twice, given I already know $P_{k}$ (as well as $k$, the number of terms)? That is, can I calculate $Q_{k}$ in constant time, given $P_k$ and $k$?
My searching hasn't come up with anything useful, and I'm not even sure it's possible.
N.B.: I've deliberately avoided a more detailed definition of $f(n)$, because I am curious to know if my question has an answer in the general case, rather than some possible simplification based on the properties of $f(n)$ (which I'm exploring separately). Worse, I actually re-use the same algorithm with multiple $f(n)$s, so defining it here would be pointless.
Knowing the product of all the $f(n)$s here is not going to help you here.
If we multiply out the product of the $(f(n)-1)$s you get something that involves all possible products of subsets of the $f(n)$s, with signs depending on the size of each subset. That's not an improvement.
In particular, knowing $P_k$ and $k$ is not enough to know what $Q_k$ is.
As one example, suppose $f(n)=4^{n+1}$. We can move a factor of $2$ from one of the $f(n)$ values to another one without affecting the value of $P_k$, and $f$ will still be strictly increasing. But $Q_k$ will change because $$(2^{2n}-1)(2^{2m}-1) - (2^{2n-1}-1)(2^{2m+1}-1) = 2^{2m}- 2^{2n-1} $$ which is never zero. And the only way to distinguish between those two cases, starting from the knowledge you have specified, is to inspect all of the $f(n)$s to see if a few of them differ from $4^{n+1}$, which will take linear time no matter how you slice it.
(Note, by the way, that $\Theta(3k)$ is the same as $\Theta(k)$ -- the asymptotic notation deliberately ignores constant factors).