With a=4 and r=3 the sum of the first n terms simplifies, because the denominator r−1=2 halves the first term.
Sn=3−14(3n−1)=2(3n−1)
Requiring 2(3n−1)>20,000 reduces to 3n>10,001. Taking logarithms preserves the inequality, because the logarithm is an increasing function.
n>log3log10,001≈0.47714.0000≈8.38
The number of terms is a whole number, so n=9. Checking the boundary: S8=2(6561−1)=13,120 falls short, while S9=2(19,683−1)=39,364 clears the target.