How to check a discrete time system if the following is linear and time invariant?
Suppose you had another input

$$x[n] = \left\lbrace\begin{matrix}1 &amp; 1\le n \le 4 \\0 &amp; \rm{otherwise} \end{matrix}\right.$$

Does the output look the same as it did for your example input, but only shifted in time?

This is testing the property of an LTI system that when \$y[n]\$ is the output for input \$x[n]\$, then the output should be \$y[n-n_0]\$ for the input \$x[n-n_0]\$.