The Bible does not specifically talk about the retention of scientific or mathematical knowledge when all things are made new. Nevertheless, the word of God tells us that certain knowledge that we gain here on earth are forgotten, not necessarily because they are erased but because they are nothing compared to heavenly things.
Though we may say that earthly and temporal yet truthful and unperverted scientific or mathematical knowledge are not necessarily evil, and therefore would be worth remembering even in heaven, they are all nothing compared to heavenly eternal things. “But as it is written, Eye hath not seen, nor ear heard, neither have entered into the heart of man, the things which God hath prepared for them that love him.” (1 Corinthians 2:9)
It is also important to consider that human senses and human mind have been affected by sin and are in a limited and obscured state. This means that regardless of how hard we try, we will never have a perfect understanding of the natural world. “For what we know is incomplete and what we prophesy is incomplete. (1 Corinthians 13:9)” Because of this, the great wonders of heaven will render most, if not all, of our current scientific or mathematical knowledge useless and insignificant, and therefore, worth forgetting. “But when what is complete comes, then what is incomplete will be done away with” (1 Corinthians 13:9, 10).