Question 926433
If the 13-tuple starts or ends with HH, then the remaining 11 flips must be T, but this violates the constraint that it cannot both start and end with a pair, so zero tuples. Therefore it must start with TT and end with TH or HT, or start with TH or HT and end TT.


If we start with TT and end with TH or HT, there are 2 ways to pick TH or HT, and then out of 9 remaining slots, one of them will be H. So 2*9 = 18 ways. Same with ending with TT/starting with TH or HT. Overall there are 36 ways.