(1) By Vieta's theorem, we have α×β=q=0, α+β=p. Then
an=pan−1−qan−2=(α+β)an−1−αβan−2(n=3,4,…).
This can be rewritten as
an−βan−1=α(an−1−βan−2).
Let bn=an+1−βan. Then bn+1=αbn (n=1,2,…). This means that {bn} is a geometric sequence with the common ratio α. The first term of {bn} is
b1=a2−βa1=p2−q−βp=(α+β)2−αβ−β(α+β)=α2.
Therefore, bn=α2×αn−1=αn+1. Then an+1−βan=αn+1. By rewriting
an+1=αn+1+βan(n=1,2,…).1◯
When Δ=p2−4q=0, we have α=β=0, a1=p−2α. The expression 1◯ becomes an+1=αn+1+αan, i.e. αn+1an+1−αnan=1.
Then {αnan} is an arithmetic sequence with the common difference 1, whose first term is αa1=α2α=2. Therefore,
αnan=2+1×(n−1)=n+1.
As a result, the general expression of {an} is
an=(n+1)αn.2◯
When Δ>0, α=β, we have
an+1=αn+1+βan=βan+β−αβαn+1−β−αααn+1(n=1,2,…).
By rewriting,
an+1+β−ααn+2=β(an+β−ααn+1)(n=1,2,…).
Then {an+β−ααn+1} becomes a geometric sequence with the common ratio β, whose first term is
a1+β−αα2=α+β+β−αα2=β−αβ2.
Therefore,
an+β−ααn+1=β−αβ2βn−1.
Then the general expression of {an} is
an=β−αβn+1−αn+1(n=1,2,…).3◯
(2) Given p=1, q=41, we have Δ=p2−4q=0. Then α=β=21. By the expression (2), the general expression of {an} is
an=(n+1)(21)n=2nn+1(n=1,2,…).
Therefore, the sum of the first n terms of {an} is
Sn=22+223+⋯+2nn+1.4◯
Then
21Sn=222+233+⋯+2n+1n+1.5◯
4◯−5◯,
21Sn=23−2n+1n+3.
We finally get
Sn=3−2nn+3.