There is no basis for the story that the teacher was punishing Gauss. He was a trained professional (England didn't even have schools at the time, let alone qualified teachers). He even had a teaching assistant - who himself became a professor of mathematics. Teacher and assistant bought him books and arranged for him to go to higher school and thence university. His teacher [Johann Georg Büttner] should be celebrated for his insight and attention to his pupils' welfare.
There is no basis for the story that the teacher was punishing Gauss. He was a trained professional (England didn't even have schools at the time, let alone qualified teachers). He even had a teaching assistant - who himself became a professor of mathematics. Teacher and assistant bought him books and arranged for him to go to higher school and thence university. His teacher [Johann Georg Büttner] should be celebrated for his insight and attention to his pupils' welfare.