Skip to content / Đến nội dung
ThichHocToan.com

MathNet 2004 — Part 03 Question 19

Math Olympiad Vault · MathNet 2004 — Part 03

Question 19

For a string of $P$ 's and $Q$ 's, the value is defined to be the product of the positions of the $P$ 's. For example, the string $P P Q P Q Q$ has value $1 \cdot 2 \cdot 4=8$.

Also, a string is called antipalindromic if writing it backwards, then turning all the $P$ 's into $Q$ 's and vice versa, produces the original string. For example, $P P Q P Q Q$ is antipalindromic.

There are $2^{1002}$ antipalindromic strings of length $2004$. Find the sum of the reciprocals of their values.