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

Psalms 40:16

Let all those that seek thee rejoice and be glad in thee: let such as love thy salvation say continually, The Lord be magnified.

Read in other translations