How do you solve the following recurrence?
$T(1) = 1$
$T(n) = T(n-1) + n^2$
2026-03-28 09:45:27.1774691127
Solving the recurrence $T(1) = 1$, $T(n) = T(n-1) + n^2$
125 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in SUMMATION
- Computing:$\sum_{n=0}^\infty\frac{3^n}{n!(n+3)}$
- Prove that $1+{1\over 1+{1\over 1+{1\over 1+{1\over 1+...}}}}=\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+...}}}}$
- Fourier series. Find the sum $\sum_{n=1}^\infty \frac{(-1)^{n+1}}{2n+1}$
- Sigma (sum) Problem
- How to prove the inequality $\frac{1}{n}+\frac{1}{n+1}+\cdots+\frac{1}{2n-1}\geq \log (2)$?
- Double-exponential sum (maybe it telescopes?)
- Simplify $\prod_{k=1}^{l} \sum_{r=d}^m {{m}\choose{r}} \left(N-k \right)^{r} k^{m-r+1}$
- Sum of two martingales
- How can we prove that $e^{-jωn}$ converges at $0$ while n -> infinity?
- Interesting inequalities
Related Questions in RECURRENCE-RELATIONS
- Recurrence Relation for Towers of Hanoi
- Solve recurrence equation: $a_{n}=(n-1)(a_{n-1}+a_{n-2})$
- General way to solve linear recursive questions
- Approximate x+1 without addition and logarithms
- Recurrence relation of the series
- first order inhomogeneous linear difference equation general solution
- Guess formula for sequence in FriCAS
- Solve the following recurrence relation: $a_{n}=10a_{n-2}$
- Find closed form for $a_n=2\frac{n-1}{n}a_{n-1}-2\frac{n-2}{n}a_{n-2}$ for all $n \ge 3$
- Young Tableaux generating function
Related Questions in CLOSED-FORM
- How can I sum the series $e^{-2}\frac{(3)^n}{n!}\sum_{k=0}^{\infty}\left ( \frac{1}{2}\right )^k\frac{1}{(k-n)!}$
- Computing $\int_0^\pi \frac{dx}{1+a^2\cos^2(x)}$
- Can one solve $ \int_{0}^\infty\frac{\sin(xb)}{x^2+a^2}dx $ using contour integration?
- Finding a closed form for a simple product
- For what value(s) of $a$ does the inequality $\prod_{i=0}^{a}(n-i) \geq a^{a+1}$ hold?
- Convergence of $\ln\frac{x}{\ln\frac{x}{\ln x...}}$
- How can one show that $\int_{0}^{1}{x\ln{x}\ln(1-x^2)\over \sqrt{1-x^2}}\mathrm dx=4-{\pi^2\over 4}-\ln{4}?$
- Exercises about closed form formula of recursive sequence.
- Simplify and determine a closed form for a nested summation
- Direction in closed form of recurrence relation
Related Questions in RECURSION
- Solving discrete recursion equations with min in the equation
- Recognizing recursion relation of series that is solutions of $y'' + y' + x^2 y = 0$ around $x_0 = 0$.
- Ackermann Function for $(2,n)$
- Primitive recursive functions of bounded sum
- Ackermann Function for $f(2,n)$ as compared to $f(5,1)$
- Determinant of Block Tridiagonal Matrix
- In how many ways can the basketball be passed between four people so that the ball comes back to $A$ after seven passes? (Use recursion)
- Finding a recursive relation from a differential equation.
- A recursive divisor function
- Are these numbers different from each other?
Related Questions in RECURSIVE-ALGORITHMS
- Designing an algorithm for integer multiplication
- Pre - calc problem turned hard, easier method for this formula?
- Simple recursive algorithms to manually compute elementary functions with pocket calculators
- Divide set into two subsets of equal sum and maximum this sum
- How many times can I do (n-1)/2 and get a whole number, recursive to formula
- Solving $A_{n+1}=3A_n+2^n$
- How to get QuickSort algorithm to run in any time between $n\log n$ and $n^2$
- Counting the number of binary heaps created with N elements with duplicite numbers
- Computation of compositions of ceilings and divisions
- How do I fight loss of significance and/or improve convergence for this recursive algorithm?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
First, let me mention that in the real world you can just plug this sum into a program like sage and it will compute it for you. For instance, see this wolframalpha computation, which immediately gives the answer
$$ \sum_{k=0}^{n-1} 3^k (n-k)^3 = \frac{1}{8} \Big ( 33 (3^n-1) - 4n^3 - 18n^2 -36n \Big ). $$
This is because your sum is hypergeometric (the ratio of consecutive terms is a quotient of polynomials), and there are "well known" algorithms which will always compute a closed form (or tell you that one doesn't exist!). See, for instance, the excellent book A=B by Petkovsek, Wilf, and Zeilberger for more about these algorithms.
This may feel flippant, but it's much faster (and less error prone) than trying to solve the sum by hand. In case you don't believe me...
You might ask how you could have solved this equation by hand, if push came to shove (for instance, on some kind of exam). Notice that your sum looks like some polynomial in $k$ times something exponential in $k$:
$$ \sum_k \underbrace{(n-k)^3}_{\text{polynomial in $k$}} \quad \underbrace{3^k}_{\text{exponential in $k$}} $$
As commenters are noting, there's a common trick for doing exactly this: Write your sum as a polynomial (or power series, if the sum is infinite) in $x$, then later evaluate at $x=3$ once we've simplified!
So for us, we want to look at the polynomial $\sum_{k=0}^{n-1} (n-k)^3 x^k$. We can simplify this using our knowledge of polynomials, then plug in $x=3$ at the end once it looks simpler!
Let's start by expanding our $(n-k)^3$ to get
$$ \sum_{k=0}^{n-1} (n^3 - 3 n^2 k + 3 n k^2 - k^3) x^k $$
This breaks up into a bunch of simpler pieces
$$ n^3 \left ( \sum_{k=0}^{n-1} x^k \right ) - 3 n^2 \left ( \sum_{k=0}^{n-1} k x^k \right ) + 3 n \left ( \sum_{k=0}^{n-1} k^2 x^k \right ) - \left ( \sum_{k=0}^{n-1} k^3 x^k \right ) $$
But these are things we know how to sum! They're all basically geometric series, and you can find tables with closed forms for all of these. However, we can also use another memorable trick to compute them. The idea (as commenters have also pointed out) is to look at derivatives of $\frac{x^n - 1}{x-1} = \sum_{k=0}^{n-1} x^k$.
This is another great reason to replace the concrete $3^k$ in our sum by the more general variables $x^k$. We have access to more techniques when working with polynomials (for instance, differentiation) than we do when working with concrete numbers!
Indeed, notice
$$ \frac{x^n - 1}{x-1} = \sum_{k=0}^{n-1} x^k $$
$$ \left ( \frac{x^n - 1}{x-1} \right )' = \left ( \sum_{k=0}^{n-1} x^k \right )' = \sum_{k=0}^{n-1} k x^{k-1} $$
$$ \left ( \frac{x^n - 1}{x-1} \right )'' = \left ( \sum_{k=0}^{n-1} x^k \right )'' = \sum_{k=0}^{n-1} k(k-1) x^{k-2} $$
$$ \left ( \frac{x^n - 1}{x-1} \right )''' = \left ( \sum_{k=0}^{n-1} x^k \right )''' = \sum_{k=0}^{n-1} k(k-1)(k-2) x^{k-2} $$
I'll leave you here with two exercises to finish off the problem!
First, can you write our sum
$$ n^3 \left ( \sum_{k=0}^{n-1} x^k \right ) - 3 n^2 \left ( \sum_{k=0}^{n-1} k x^k \right ) + 3 n \left ( \sum_{k=0}^{n-1} k^2 x^k \right ) - \left ( \sum_{k=0}^{n-1} k^3 x^k \right ) $$
As a linear combination of the derivatives above? After you've done this, can you actually compute the above derivatives and evaluate them at $x=3$ to get the answer?
Lastly, if you want to read more about techniques for solving these kinds of sums, I can't recommend Graham, Knuth, and Patashnik's Concrete Mathematics highly enough. You'll also find more of these "tricks" for manipulating sums as polynomials/power series in Wilf's excellent Generatingfunctionology.
I hope this helps ^_^