The ones in red are the only sentences I see that, even with punctuation, cannot be made interpretable. (Although even the ones that can be made interpretable are not necessarily grammatically correct, in my opinion.)
Fifteen could be written: "The horse raced past the barn, fell." You could understand it that way but I'm not sure it's truly grammatically correct.
The same goes for 23: "The raft floated down the river, sank." It's awkward, but at least it makes sense.
Number two uses "prime" as a noun...as in the prime people, or ever numbers! (e.g. There are few prime numbers in the world, and few prime people in the world.)
Number five just needs a comma after "of"...although again, that just makes it easier to understand.
Ok, that helps me with 15 and 23.
In #2 prime is definitely the noun, could be prime people, prime students, prime candidates, etc. Whatever the prime, they number few. In the same way, "old" is used as the noun in #21.
I agree that some, although understandable, are not necessarily written the best way or are grammatically correct.
I still don't see a way for #25 to make sense.
So for me that still leaves # 1, 6, 12, and 25 as the ones that don't make sense.