Sequence 3, 5, 9, 17 I find that the latter term is equal to 2 times of the former term minus 1

Sequence 3, 5, 9, 17 I find that the latter term is equal to 2 times of the former term minus 1

a(n+1)=2an-1
a(n+1)-1=2an-2
a(n+1)-1=2(an-1)
So an-1 is an equal ratio sequence, q = 2
a1=3
So an-1 = (A1-1) * q ^ (n-1) = 2 ^ n
So an = 1 + 2 ^ n