When 1015 appears it means that the iOS had been downgraded to previous versions before. The result may be as you said, stuck in recovery mode. From my limited knowledge that may not be able to be fixed at all.
You might also try putting the phone into DFU mode and try to restore it. If you are continuously receiving the same restore error then a DFU restore may still be able to rectify the issue because it removes and replaces both the software and firmware.
To put the phone into DFU mode:
1. Make sure the phone is connected to the computer
2. Hold down the sleep/wake button and home button at the same time for 8 seconds
3. Let go of the sleep/wake button and keep holding down the home button
4. If you are successful, a dialog box will pop up in iTunes stating that iTunes has detected an iPod/iPhone in recovery mode.
5. Click OK, then click the restore button in iTunes.
Hopefully after that, the iPhone will be up and running so you can sync your content back.
MissFierce is correct, delete the *.ipsw file on your computer
Mac OS X
~/Library/iTunes/iPhone Software Updates
C:\Documents and Settings\[username]\Application Data\Apple Computer\iTunes\iPhone Software Update
C:\Users\[username]\AppData\Roaming\Apple Computer\iTunes\iPhone Software Updates
then delete the contents of the iPhone Software Updates folder
You should try DFU indeed.
Notice that successful DFU restore will give you a blank black screen after releasing your sleep/wake button. If you see the "connect to iTunes with a connector cable" graphic on the phone you failed putting it into DFU mode.
not needed, its just an old *.ipsw file, delete the file and it'll be fine