scorpius1782
- 107
- 0
Homework Statement
Can someone check that I'm doing this correctly? Someone else got another answer entirely but I don't see where my mistake could be...
##f(1)=2##
##f(n)=1+f(n-1)+n^2##
then solve for n=100
Homework Equations
The Attempt at a Solution
Unrolling:
##f(n)=1+f(n-1)+n^2##
##f(n)=1+1+f(n-2)+(n-1)^2+n^2##
##f(n)=1+1+1+f(n-3)+(n-2)^2+(n-1)^2+n^2##
so ##k+f(n-k)+\sum_{i=0}^k(n-i)^2##
for n=100
##99+2+\sum_{i=0}^{99}(100-i)^2##
101+338350=338451
[