[Math] DNA arrangement problem (ATGC)

combinatorics

Our genetic material, DNA, is formed from a $4$ letter alphabet" of bases: A, T, G, C (adenine, thymine, guanine,
and cytosine). The order in which the letters are arranged is important, but because a molecule can move, there is
no difference between a sequence and the same sequence reversed. How many distinct DNA sequences of $5$ bases are
there?

The only bit I've gotten so far is $4^5$ I have no idea how to start with the palindrome. Can anyone walk me through on the thought process please?

Thank you

Best Answer

There are $4^5=1024$ sequences where $4^3=64$ are palindromic since such a sequence is determined once the first $3$ bases are determined.

Each of the remaining $960$ is the reverse of one of the other $959$ sequences, so there are $$64 + \frac{960}{2} = 544$$

such sequences.