This was proposed by John A. R. Newland in 1864. According to this law - when the elements are arranged in the order of increasing atomic mass, every eighth element has similar properties. Every eighth element is a repetition of the first.
$$Element + 7th\, element = 8th\, element$$
For example:
a. Lithium and sodium belong to the same group: Group 1 (alkali metals)
b. Beryllium and magnesium belong to the same group: Group 2 (alkaline earth metals)
c. Sodium and Potassium belong to the same group: Group 1 (alkali metals)
However, the law of octaves failed beyond calcium (atomic number 20).