Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
KJV

Psalms 106:31

And that was counted unto him for righteousness unto all generations for evermore.

Read in other translations