In this paper, we consider the problem of the mean square optimal estimation of linear functionals which depend on unknown values of a stationary stochastic sequence based on observations of the sequence with a stationary noise. Formulas for calculating the mean-square error and the spectral characteristic of the optimal linear estimate of the functional are derived under the condition of spectral certainty, where spectral densities of the sequences are exactly known. The minimax (robust) method of estimation is applied in the case of spectral uncertainty, where spectral densities of the sequences are not known exactly while sets of admissible spectral densities are given. Formulas that determine the least favorable spectral densities and the minimax spectral characteristics are proposed for some special sets of admissible densities.