דברים ג, כג בָּעֵת הַהִוא לֵאמֹר 'ה י -אֶל וָאֶתְחַנַן And I besought the L-RD at that time, saying
The Medrash Rabbah Devarim #11 states that Moshe prayed to HaShem 515 times to annul the vow restricting him from entering Eretz Yisrael. His prayers were to no avail. The Medrash says that the word "vo'es'chanan" alludes to this, as its numeric value is 515.
Why did Moshe specifically pray 515 times?
The Pnei Yehoshua on Berachos 32a gives us a calculation that explains why there were exactly 515 prayers. Rashi on the words "bo'eis ha'hi" in our verse says that Moshe felt that after conquering Sichon and Og the vow made by Hashem to prohibit him from entering Eretz Yisrael might be null and void. This took place on the 15th of Av, the day that the death of the final group of 15,000 people who died annually because of the sin of the spies had conclusively ended, as is stated in Devarim 2,16, "Va'y'hi kaa'sher tamu anshei hamilchomoh lomus." (See B.B. 121b and Rashba"m and Tosfos there for further clarification) Moshe prayed for an annulment of the decree from the 15th of Av, 2487 until his death on the 7th of Adar of the following year. This is a total of 200 days if we alternate 30 and 29 days per month. This gives us 4 months of 30 days each and 3 months of 29 days each. The month of Av has only 16 days of prayer starting from the 15th day of the month. 16+29+30+29+30+29+30+7 days of Adar = 200. On Shabbos one does not pray for the personal needs of an individual. This takes away 28 Shabbosos that occur in the 200 days. We are left with 172 days x 3 prayers a day = 516 prayers. We subtract one prayer as Hashem only communicated with Moshe by day (There is disagreement by some on this point, as they posit that Moshe received prophecy by night and by day). Thus, on the first day of these prayers he only prayed twice to enter the land. This leaves us with exactly 515 prayers (as Moshe died at the time of Minchah on the 7th of Adar).
The Panim Yafos explains that Moshe began praying for permission to enter Eretz Yisrael on the day that he was told that he would not enter. This was the day that Miriam died, the 10th of Nisan. On that day Moshe sinned with "mei merivoh." He continued to pray after conquering Sichon and Og until he entered Arvos Moav. The M.R. Bemidbar 19:18 states that the war with Sichon took place in the month of Elul. If we calculate three prayers a day on weekdays and four for each Shabbos and Yom Tov, we arrive at 515 prayers towards the end of Elul.
Chasam Sofer counts a little differently. Miriam died and was buried on the 10th of Nisan. The well of water remained for the seven days of aveilus. The seven days ended on the 16th of Nisan (part of the day counts as a full day). The well left and the “sin” occurred and the punishment was decreed that Moshe would not enter Eretz Yisrael. With Minchah of the 16th of Nisan Moshe began to pray to annul the decree three times a day (not counting Mussaf since it is not considered a prayer of mercy and supplication). Moshe continued for 171 days till Yom Kipur. Moshe then established the prayer of Neilah which became his 515th prayer.
Chasam Sofer in another place offered a slightly different method. After the seven days of aveilus of Miriam, the people only complained three days after the disappearance of the well, which was the 21st of Nisan. He then calculates that the 172nd day occurred on the second day of Sukkos (515th prayer at Shacharis). Thus, this day became the day of Ratzon for water.
Meor VeShemsh explains the concept of 515 as a combination of 500 and of 15. The prayers of Moshe were so strong that they broke through all the worlds until the Holy Thorne [see the Gemara Chagigah 13a that the width of the earth and of each of the 7 “heavens” plus the (7) spaces between them were each a 500-year journey, which is 15 units of distances of 500 years). This concept is expressed in the word ישרה which also equals 515. Look in the preface of the Kav vaYashar who states that his family name of הירש also equals 515 and thus called his sefer with the name Yashar.
