The mathematical problem/puzzle/equation that must be solved is this:
Find a number such that the double SHA-256 hash of the block header, which includes the number, is less than the target.
The target is determined by the difficulty.
Interesting. You've explained this in a way that isn't difficult to understand.
Would you be able to give a sample of what the number, hash of the block header and target would look like in an equation?
SHA256(SHA256(H, N)) < T, where H is the header, N is the solution (included as part of the header), and T is the target.
Here is the current target (in hex): 0x00000000000000001717F0000000000000000000000000000000000000000000
If you look at block #353192 (
https://blockchain.info/block-height/353192) you will see that N is 3813908736 and the result of SHA256(SHA256(H, 3813908736)) is 0x0000000000000000092f8a4cec04d9a6a9976139db98362656182fc4470b845e, which is less than the target.
Actually, that is a simplified explanation. There are other fields in the header that are modified to get a successful result: the timestamp and the merkle root values in the header are also adjusted.
Here's an
ELI5 - PLEASE correct me if I'm wrong, but remember I'm putting it in the most
simplistic terms:
As a miner you're putting together transactions and you need to find the hash of the whole block of transactions (this is very easy for computers to do). This hash will be included in the next block to prove that it's part of the "chain."
Take a look at this picture (a digest can be considered the same as a hash):
See how drastically the numbers change even if one character is changed? That's why double spending is difficult, because you have to alter ALL of the hashes in the next blocks - this makes bitcoin secure against double spends.
Now, bitcoin achieves decentralization in this through a protocol called proof-of-work. It adds an extra step in this hashing. Right now you have to find a hash that's LESS THAN this number: 0x00000000000000001717F0000000000000000000000000000000000000000000. Basically we have to find a number with 17 0's in front of it.
Now remember how easy it is for the hash to drastically change (adding/removing ONE character)? Well how to the miners find their hash AND make sure it's less than the target hash number. How do we do this? There's no "equation" for figuring this out, so computers just "guess." It truly is a lottery and makes it decentralized because it appears to be random.
Within the block is a "nonce." This is the number that the miner increments until it magically finds the hash we're looking for. The nonce is the "proof-of-work."
TL;DR - miners are trying to find a certain value for their hash; they can only achieve this through guessing. Changing the nonce, changes the hash. They're cycling through nonce values until one satisfies the target hash value. Nonce is the proof-of-work and helps achieve decentralization.