To find the sum to n terms of the series \(5, 7, 13, 31, 85, \ldots\), we will follow these steps:
### Step 1: Identify the series and find the nth term
The given series is \(5, 7, 13, 31, 85, \ldots\). We need to find a pattern or formula for the nth term.
1. **Calculate the differences between consecutive terms:**
- \(7 - 5 = 2\)
- \(13 - 7 = 6\)
- \(31 - 13 = 18\)
- \(85 - 31 = 54\)
The first differences are \(2, 6, 18, 54\).
2. **Calculate the second differences:**
- \(6 - 2 = 4\)
- \(18 - 6 = 12\)
- \(54 - 18 = 36\)
The second differences are \(4, 12, 36\).
3. **Calculate the third differences:**
- \(12 - 4 = 8\)
- \(36 - 12 = 24\)
The third differences are \(8, 24\).
4. **Calculate the fourth differences:**
- \(24 - 8 = 16\)
The fourth difference is constant, which suggests that the nth term can be expressed as a polynomial of degree 4.
### Step 2: Form the polynomial for the nth term
Assuming \(T_n = an^4 + bn^3 + cn^2 + dn + e\), we can use the first few terms to create a system of equations to find \(a, b, c, d, e\).
Using the known terms:
- \(T_1 = 5\)
- \(T_2 = 7\)
- \(T_3 = 13\)
- \(T_4 = 31\)
- \(T_5 = 85\)
We can set up equations based on these values, but for simplicity, we can derive a pattern:
From the differences, we can observe that the nth term can be simplified to:
\[
T_n = 4 + 3^{n-1}
\]
### Step 3: Find the sum of the first n terms
The sum of the first n terms \(S_n\) can be expressed as:
\[
S_n = T_1 + T_2 + T_3 + \ldots + T_n
\]
Substituting the expression for \(T_n\):
\[
S_n = (4 + 3^0) + (4 + 3^1) + (4 + 3^2) + \ldots + (4 + 3^{n-1})
\]
\[
= 4n + (3^0 + 3^1 + 3^2 + \ldots + 3^{n-1})
\]
### Step 4: Use the formula for the sum of a geometric series
The sum of the geometric series \(3^0 + 3^1 + 3^2 + \ldots + 3^{n-1}\) can be calculated using the formula:
\[
\text{Sum} = \frac{a(r^n - 1)}{r - 1}
\]
where \(a = 1\) and \(r = 3\):
\[
= \frac{1(3^n - 1)}{3 - 1} = \frac{3^n - 1}{2}
\]
### Step 5: Combine the results
Now substituting back into \(S_n\):
\[
S_n = 4n + \frac{3^n - 1}{2}
\]
\[
= 4n + \frac{3^n}{2} - \frac{1}{2}
\]
### Final Expression
Thus, the sum of the first n terms of the series is:
\[
S_n = 4n + \frac{3^n}{2} - \frac{1}{2}
\]