Solution 1
Notice that
P20(x)=P19(x−20)=P18((x−20)−19)=P17(((x−20)−19)−18)=⋯=P0(x−(20+19+18+…+2+1)).
Using the formula for the sum of the first n numbers, 1+2+⋯+20=220(20+1)=210. Therefore,
P20(x)=P0(x−210).
Substituting x−210 into the function definition, we get P0(x−210)=(x−210)3+313(x−210)2−77(x−210)−8. We only need the coefficients of the linear terms, which we can find by the binomial theorem.
- (x−210)3 will have a linear term of (13)2102x=630⋅210x.
- 313(x−210)2 will have a linear term of −313⋅(12)210x=−626⋅210x.
- −77(x−210) will have a linear term of −77x.
Adding up the coefficients, we get 630⋅210−626⋅210−77=763.
Solution 2 (Overkill)
Denote the coefficient of term xm of polynomial Pn(x) as cm,n. We can see that c2,0=313, c1,0=−77, and c0,0=−8. Note that (x−n)3=x3−3nx2+3n2x−n3 and (x−n)2=x2−2nx+n2 When substituting x−1 for x in P0(x), we get that P1(x)=P0(x−1)=(x3−3x2+3x−1)+313(x2−2x+1)−77(x−1)−8. Observe that
c2,1=c2,0−3(1)=313−3=310
It is evident that
c2,n=c2,n−1−3n
Define the generating function C2(X) as
C2(X):=n≥0∑c2,nXn
By multiplying both sides of the previous recurrence relation and taking the sum of the terms ∀n≥1, we get that
⟹n≥1∑c2,nXn=n≥1∑c2,n−1Xn+3n≥1∑nXn
⟹n≥0∑c2,nXn−c2,0=Xn≥0∑c2,nXn+3n≥1∑nXn
⟹C2(X)−313=XC2(X)+3⋅(1−X)2X∗
⟹C2(X)=1−X313−(1−X)33X
=(1−X)3313X2−629X+313=(313X2−629X+313)⋅n≥0∑(2n+2)Xn †
⟹c2,n=313(2n+2)−629(2n+1)+313(2n)‡=2−3n2−3n+626
We can perform a similar analysis on c1,n to get the recurrence relation
c1,n=c1,n−1+c2,n−1⋅(−2n)+3n2
=c1,n−1+3n3−626n
Define the generating function C1(X) as
C1(X):=n≥0∑c1,nXn
We can then perform this process again on our new recurrence relation:
⟹n≥1∑c1,nXn=n≥1∑c1,n−1Xn+3n≥1∑n3Xn−626n≥1∑nXn
⟹n≥0∑c1,nXn−c1,0=Xn≥0∑c1,nXn+3n≥1∑n3Xn−626n≥1∑nXn
⟹C1(X)+77=XC1(X)+3⋅(1−X)4X(X2+4X+1)−626⋅(1−X)2X
⟹C1(X)=(1−X)5−77(1−X)4+3X(X2+4X+1)−626X(1−X)2
=(1−X)5−77X4−315X3+802X2−315X−77
=(−77X4−315X3+802X2−315X−77)⋅n≥0∑(5n+5)Xn
⟹c1,n=−77(4n+4)−315(4n+3)+802(4n+2)−315(4n+1)−77(4n)
=43n4+6n3−1249n2−1252n−308
Finally, we can plug n=20 into our new explicit formula to get
c1,20=763
∗This can be calculated by differentiating the generating function of the sequence 1, 1, 1, ... (∑n≥0Xn) and multiplying by X.
†This form can be found by applying Newton's generalized binomial theorem.
‡This formula can be found by convolving the polynomial with the series.
- MathCactus0_0 (don't try this on a test unless you can't think of anything else!!!)