Consider the sequence \( \{a_n\} \) defined by \( a_1 = 3 \) and \( a_{n+1} = 2a_n + 1 \) for \( n \geq 1 \). Determine the remainder when \( a_{50} \) is divided by 17. Let's think step by step and output the final answer within \boxed{}.
user