If Cain is avenged seven times,
then Lamech seventy-seven times.” Genesis 4:24
The number 7 shows up very early in the Bible and it signfies "completeness" and "fulness."
The seven
days of creation means a complete time of creation, the fulness of creation.
Much of Leviticus and Numbers include rituals
of seven – seven bulls, seven rams, seven lambs, seven days outside the city,
seven days of celebration, seven priests.
For a perfect sacrifice, the number 7 shows up.
In
Revelation there are seven churches, seven lampstands, seven stars.
Then Peter came to Jesus and asked, “Lord, how many times shall I forgive my brother when he sins against me? Up to seven times?” Jesus answered, “I tell you, not seven times, but seventy-seven times. Matthew 18:21-22
If
he sins against you seven times in a day, and seven times comes back to you and
says, ‘I repent,’ forgive him.” Luke 17:4
Lamech in Genesis 4 used seven for emphasis. He wasn't talking about a literal seven times, but the idea that if Cain is avenged seven times for what he did (a full and complete amount of times for retribution), then he deserved 77 times. Jesus used a similar tactic by using seven and seventy-seven for emphasis. He was not saying only forgive them 7 times, but forgive them all the time.
7 has a wholeness and completeness to it. It was used by emphasis to say "the perfect amount of times."