Let x_{0},\ x_{1},\ x_{2}\cdots . be a sequence of numbers, where each x_{k} is either 0 or 1. For each positive integer n, define
S_{n}=\sum _{k=0}^{n-1}x_{k}2^{k}
Suppose 7S_{n}=1 (mod 2^{n}) for all n\geqslant1. What is the value of the sum
x_{2019}+2x_{2020}+4x_{2021}+8x_{2022}?
6
7
12
14
15
\begin{aligned} & 7 S_1=3 \times 2^1+1 \Rightarrow x_0=1 \\ & 7 S_2=5 \times 2^2+1 \Rightarrow x_1=1 \\ & 7 S_3=6 \times 2^3+1 \Rightarrow x_2=1 \\ & 7 S_4=3 \times 2^4+1 \Rightarrow x_3=0 \\ & 7 S_5=5 \times 2^5+1 \Rightarrow x_4=1 \\ & 7 S_6=6 \times 2^6+1 \Rightarrow x_5=1 \\ & 7 S_7=3 \times 2+1 \Rightarrow x_6=0\end{aligned}
\cdots
With the patterns, we notice that x_{3n}=0 and x_{3n+1}=x_{3n+2}=1. Therefore, x_{2019}+2x_{2020}+4x_{2021}+8x_{2022}=0=2+4+0=6.