There are similar problems in Beginners & Help
BitCoin: is it really finite?This post has a good explanation of the problem.
I want to share my views as a novice.
One block every ten minutes will be rewarded at the beginning of the packaged 50 bitcoins.
In fact, the time is calculated based on 210,000 blocks, each block is 10 minutes,
so it should be 210000*10/60/24=1458.333..days
The number of bitcoins you get in first 1458.33..days is 210,000*50=10500000
Since it is halved every 1458.33..days , you can use the following formula to calculate:10500000*(1+1/2+1/22+.....+1/2n)
Since it is halved every four years, you can use the following formula to calculate:10512000*(1+1/2+1/22+.....+1/2n)=21000000btc
(A key limiting factor is that the smallest unit of Bitcoin is 8 digits after the decimal point.So 1/2n must be greater than 0.00000001)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I learned some extra knowledge in this reply, I hope this is useful to you
A key limiting factor is that the smallest unit of Bitcoin is 8 digits after the decimal point.So 1/2n must be greater than 0.00000001
This will first play a part when we hit block 2,100,000. At that point, the block reward will drop from 0.09765625 BTC to 0.04882812 BTC, meaning we will lose 0.5 sats from every block mined.
Because of these accumulated rounding errors, the total number of bitcoin which could ever be mined is actually 20,999,999.9769. There have also been a couple of occasions in which miners have failed to claim the entire block reward they were allocated, and so these bitcoin are also permanently lost and would need to be subtracted from the total supply. And of course the very first 50 bitcoin mined in the genesis block can't actually be spent, so you could subtract them from the total supply as well.
When did the miners fail to claim the reward?
One example is
block 124,724, where the miner claimed a reward of 49.99999999 BTC instead of 50 BTC and also failed to claim the 0.01 BTC in fees, permanently destroying 0.01000001 BTC.
A more notable example is
block 501,726, where the miner failed to claim the entire reward of 12.5 BTC.
Block 526,591 only claimed 6.25 BTC instead of the maximum 12.5 BTC permitted.
Block 162,705 failed to claim any of the fees in the block, only claiming the 50 BTC block reward, resulting in a loss of 0.0240192 BTC.
There are lots more examples of miners making similar mistakes.