The chances are big that pc's and laptops (even those with non-removable batteries) will still have a CMOS battery.
The reason is for the technology of the removable battery. They're rechargeable batteries, and its in the nature of a rechargeable battery that it will slowly run out of battery, regardless of it being used. A CMOS battery however, does not.
It would be very weird, if your device is not being used for a month and its non-removable battery runs out, the BIOS would lose its settings.
One could argue that nowadays you have flash medium that you can write to that do not need to be powered in order for their memory to be retained, but the downside to those is that their state deteriorates with each read and write, and believe it or not, a BIOS is still being read and write a lot to.
Technology does change, and they may find new ways to more efficiently store power in rechargeable batteries that will retain their power for much longer or find a way to have a BIOS using flash memory in such way that it will not matter on wear that this changes in the future, but I don't see that happening anytime soon. The use of a CMOS battery is not something that costs a lot of money, so the gain to use different approaches would likely cost more.
First, remove and reseat the memory modules to make sure they are well connected.
Try a BIOS reset on this circa-2011 design with the HP BIOS Update routine:
Do Win-B and keep holding them down while you press-and-hold the power button for 3 seconds. Let go of the the Power button while still holding Win-B. If the Power light goes out, repeat with only 2 seconds press-and-hold of the power button.
If that does not bring up the HP BIOS Update, then repeat the above with Win-V instead.
Since you report this results in five flashes, HP's troubleshooting web page section titled "BIOS flashing light error codes for computers released between 2011 and January 2015" states you have a general system board failure, and therefore your vendor for the replacement motherboard should be contacted.
When you get that motherboard replaced:
One or the other should lead you to on-screen instructions for recovery, but if the same recovery message shows up repeatedly, shut down the laptop, and go to another Windows machine to visit Software and Downloads at https://support.hp.com/us-en/drivers/laptops to download a BIOS recovery app file onto a blank USB flash drive to make a Recovery USB Flash Drive.
That page will ask for your PC's exact part number from the serial number sticker on the underside. Once you get there, make sure to change to the original Windows version your laptop first shipped with (since this machine ceased production before Windows 10 was released to manufacturing). Look on the laptop for the sticker which shows that version.
Launch the app after downloaded, and choose Recovery USB Flash Drive. When if finishes, close that app and then safely eject the flashdrive.
Then, insert the USB flash drive in the failing laptop, and use the combination keystroke/power-up process again.
Do Win-B and keep holding them down while you press-and-hold the power button for 3 seconds. Let go of the the Power button while still holding Win-B. If the Power light goes out, repeat with only 2 seconds press-and-hold of the power button.
If that does not bring up the HP BIOS Update, then repeat the above with Win-V instead.
Either should invoke the BIOS recovery, and with the USB flash drive just created, will reinstall your BIOS.
Best Answer
I had to try this procedure many times: remove battery for a few seconds, insert battery and power on. At the end Windows could boot up and I update the BIOS using HP installer. Now it is working again.