As the subject text indicated, are the phrases, "such a sentence" and "such sentence," different?
If so, how are they different?
"Sentence" has two meanings. One is what you read in books or hear in everyday speeches. The other is what you can hear at court from a chief justice when he gives the judgement of justices at the final of a trial to the person accused of some crime. You can say "a sentence" or "sentences" for the first one, but the second one is always "sentence".