
Patrick B. answered 05/17/20
Math and computer tutor/teacher
the sequence is 1, 5, 17, 53, 161, 485
a2 = 3a1 + 2
a3 = 3a2 + 2
= 3 (3a1 + 2) + 2
= 3^2 a1 + 3*2 + 2
a4 = 3 a3 + 2
= 3 ( 3^2 a1 + 3*2 + 2 ) +2
= 3^3 a1 + 3^2*2 * 3*2 + 2
a5 = 3 (a4) + 2
= 3 ( 3^3 a1 + 3^2 * 3*2 + 2 ) + 2
= 3^4 a1 + 3^3*2 + 3^2*2 * 3*2) + 2
a6 = 3 ( a5) + 2
= 3 ( 3^4 a1 + 3^3 + 3^2 * 3*2))
= 3^5 a1 + 3^4*2 + 3^3*2 + 3^2*2 +3* 2) +2
the coefficient of a1 is 3^(n-1)
the constant term is a geometric sequence with r=3 and constant k=2,
and the leading term has exponent TWO (2) behind the index..
Sum of the first k terms of the geometric sequence is [r^(k+1) - 1]/ (r-1) with k=n-2 ---> k+1=n-1
2(3^(n-1 - 1))/(3-1)
= 3^(n-1) - 1 <--- 2 in the denominator cancels the 2 * 3^(n-1)
and -2 in the numerator
adding these two pieces together
2*3^(n-1) - 1
which for n=1,2,3,...., produce the sequence 1,5,17,53,161,485