Here, a = 1; r = 31 = 3; The sum of the first n terms does not exceed 365, i.e.,

S_{n} ≤ 365.

Now, S_{n} = r-i

Putting a = 1; r = 3.

S_{n} = \(\frac{1[3_n−1]}{3−1}\)

S_{n} = \(\frac{3^n−1}{2}\)

Now, S_{n} ≤ 365

∴ \(\frac{3^n−1}{2}\) ≤ 365

∴3^{n} – 1≤ 365 × 2

∴ 3^{n} ≤ 730 + 1

∴ 3^{n} ≤ 731

We now tabulate values of 3’ for different positive values of n as shown in the following table and we shall take the maximum value of n for which 3^{n} ≤ 731.

**n** |
**5** |
**6** |
**7** |

**3**^{n} |
**243** |
**729** |
**2187** |

For n = 7, 3^{n} = 2187 which is more than 731.

∴ n = 6 is the maximum value of n, for which 3^{n} ≤ 731.