Let X be a finite set of q elements, and n, K, d be integers. A subset C ⊂ X n is an (n, K, d) error-correcting code, if #(C) = K and its minimum distance is d. We define an (n, K, d) error-correcting sequence over X as a periodic sequence {a i } i=0,1,... (a i ∈ X) with period K, such that the set of all consecutive n-tuples of this sequence form an (n, K, d) error-correcting code over X. Under a moderate conjecture on the existence of some type of primitive polynomials, we prove that there is a $$(\frac{q^m-1}{q-1}, q^{\frac{q^m-1}{q-1}-m}-1, 3)$$ error correcting sequence, such that its code-set is the q-ary Hamming code $$[\frac{q^m-1}{q-1}, \frac{q^m-1}{q-1}-m, 3]$$ with 0 removed, for q > 2 being a prime power. For the case q = 2, under a similar conjecture, we prove that there is a $$(2^m - 2, 2^{2^m-m-2}-1, 3)$$ error-correcting sequence, such that its code-set supplemented with 0 is the subset of the binary Hamming code [2 m − 1, 2 m − 1 − m, 3] obtained by requiring one specified coordinate being 0.