3 ms·
yeah, sumproduct on google docs was the thing it kept suggesting, but not in a way that worked for the thing I wanted. I found a way around it in the end, but I
by marcus_holmes 3y ago
yeah, sumproduct on google docs was the thing it kept suggesting, but not in a way that worked for the thing I wanted. I found a way around it in the end, but I feel I wasted 30 mins trying to get ChatGPT to understand what I wanted and give me something that actually worked.
- thaumasiotes 3y ago\sum_{i=0}^n x^i (the sum of all terms x^i as i ranges from 0 to n, inclusive) = (x^{n+1} - 1)/(x-1). Or, if n is positive infinity, you assume that |x| < 1 and thus the sum is (0 - 1) / (x-1) = 1/(1-x). If you need the sum from x^m to x^n, that's equal to the sum from 0 to n minus the sum from 0 to (m-1). You can derive the formula yourself without difficulty: sum = 1 + x + x^2 + ... + x^n (sum)(x) = x + x^2 + ... + x^n + x^{n+1} (sum)(x) - sum = x^{n+1} - 1 (sum)(x-1) = x^{n+1} - 1 (sum) = (x^{n+1} - 1)/(x-1)