A thread from a few months back had some good stuff on this:
I mentioned an interesting pattern in the ages of the main patriarchs that I came across in a Genesis commentary by Victor Hamilton:
Abraham: 175 = (7)5^2Isaac: 180 = (5)6^2Jacob: 147 = (3)7^2The factors of these ages include a square of 5, 6, 7. Then we get Joseph.
Joseph: 110 = 5^2 + 6^2 + 7^2The factor apart from the square also has a pattern. For Joseph, it is simply 1 (the squares themselves), then 3 for Jacob, 5 for Isaac, 7 for Abraham. So it builds up to a 7 using odd numbers.
Seeing as these ages are all from the same book, this is hard to write off as coincidence. Since 110 was viewed as an ideal lifespan in Egypt, that was probably the starting point. Since that number contains the three squares, that may have led the author to the right meaningful numbers for the other patriarchs. But who knows.
There’s also a cool checksum of all the ages from Adam to Moses in the Masoretic text that may explain how the Masoretes ensured the numbers didn’t shift further. Since the checksum only works in their text and not the Septuagint or Samaritan versions, it would imply that either the Masoretes adjusted the numbers to make it work or it dropped out of other versions of Genesis/Exodus before it was noted as something important to preserve.