Probably a ludicrous question, but I'm going to ask it anyway.
Miners are paid for there effots in BTC, then the money is either spent or converted to cash. Instead of selling the coin to an exchange, could the network (using some crazy ass algorithm) buy those coin's back, thus prolonging the 21 million threshold. As im writing this im thinking, perpetual motion.
You seem to be asking 2 unrelated questions and then mashing them together somehow into a sentence that contains words but that doesn't actually make sense. I suspect that this is largely due to a lack of knowledge about what mining is, how it works, and what it accomplishes.
Your first question seems to be about "using some crazy ass algorithm" to some how take bitcoins that have been created and uncreate them. It actually is possible for any miner to "unmine" bitcoins if they want to.
When solving a block a miner is allowed to assign to himself a reward that is
no greater than the sum of the current block subsidy and the transaction fees from all the transactions included in the block. "No greater than" means that it can be less than. In other words, the miner can solve and broadcast a block that pays himself no block reward at all. This means that the 25 BTC that he would have received is never created in the first place. It also means that all of the transaction fees from all the transactions in the block are "vaporized". They just cease to exist. This reduces the total number of bitcoins that will ever exist, and it has actually happened in the past (meaning that we will actually fall over 100 bitcoins short of 21 million when all the bitcoins have been mined.
There is no good reason for a miner to do this (especially with bitcoins exchanging at a rate of over $300 per bitcoin). Essentially a miner is doing all the work, and then saying, "No, I'm not interested in $7500. I'll just destroy it instead." It has only ever occurred from bugs in mining software which are quickly identified and fixed, obviously.
Your second question seems to be about "perpetual motion" (I assume you mean "perpetual mining"?). If I understand correctly, you would like for the bitcoins that have already been created to be used to reward miners in the future for creating blocks, even after the block subsidy is reduced to 0 BTC. I've got a big surprise for you. This is exactly how bitcoin is designed, and how it is intended to work in the long term. Participants in the network create transactions that use bitcoins that were mined in the past. To encourage miners to confirm their transaction, they voluntarily include a transaction fee that is also taken from bitcoins that were created in the past. These transaction fees are "paid back into the network" to reward the miners that confirm the blocks that include the transactions. Therefore, the miners continue to be rewarded by the network for the work they are doing from bitcoins that were created in the past and are being "sold back to the network" in exchange for priority confirmations.