If the sum was 3^1 + 3^2 + 3^3 + ... + 3^9 + 3^10 + 3^11 + ... + 3^20, then there would be 20 terms (powers 1 to 20).
But if the sum was 3^10 + 3^11 + ... + 3^20, the first 9 terms are missing, so there are (20-9) terms.
If the sum was 3^1 + 3^2 + 3^3 + ... + 3^(n-1) + 3^n + 3^(n+1) + ... + 3^3n, there would be 3n terms (powers 1 to 3n).
But if the sum was 3^n + 3^(n+1) + ... + 3^3n, the first (n-1) terms are missing, so there are 3n-(n-1) terms.