diff --git "a/aime_figures.jsonl" "b/aime_figures.jsonl" --- "a/aime_figures.jsonl" +++ "b/aime_figures.jsonl" @@ -45,19 +45,19 @@ {"id":44,"problem":"Find the number of cubic polynomials $p(x) = x^3 + ax^2 + bx + c,$ where $a, b,$ and $c$ are integers in $\\{-20,-19,-18,\\ldots,18,19,20\\}$, such that there is a unique integer $m \\not= 2$ with $p(m) = p(2)$.","solution":"Plugging $2$ and $m$ into $P(x)$ and equating them, we get $8+4a+2b+c = m^3+am^2+bm+c$. Rearranging, we have \\[(m^3-8) + (m^2 - 4)a + (m-2)b = 0.\\] Note that the value of $c$ won't matter as it can be anything in the provided range, giving a total of $41$ possible choices for $c$. So what we just need to do is to just find the number of ordered pairs $(a, b)$ that work, and multiply it by $41$.\nWe can start by first dividing both sides by $m-2$. (Note that this is valid since $m\\neq2:$ \\[m^2 + 2m + 4 + (m+2)a + b = 0.\\] We can rearrange this so it is a quadratic in $m$: \\[m^2 + (a+2)m + (4 + 2a + b) = 0.\\] Remember that $m$ has to be unique and not equal to $2$. We can split this into two cases: case $1$ being that $m$ has exactly one solution, and it isn't equal to $2$; case $2$ being that $m$ has two solutions, one being equal to $2,$ but the other is a unique solution not equal to $2$.\n\n$\\textbf{Case 1:}$\nThere is exactly one solution for $m,$ and that solution is not $2$. This means that the discriminant of the quadratic equation is $0,$ using that, we have $(a+2)^2 = 4(4 + 2a + b),$ rearranging in a neat way, we have \\[(a-2)^2 = 4(4 + b)\\Longrightarrow a = 2\\pm2\\sqrt{4+b}.\\] Using the fact that $4+b$ must be a perfect square, we can easily see that the values for $b$ can be $-4, -3, 0, 5,$ and $12$. Also since it's a \"$\\pm$\" there will usually be $2$ solutions for $a$ for each value of $b$. The two exceptions for this would be if $b = -4$ and $b = 12$. For $b=-4$ because it would be a $\\pm0,$ which only gives one solution, instead of two. And for $b=12$ because then $a = -6$ and the solution for $m$ would equal to $2,$ and we don't want this. (We can know this by putting the solutions back into the quadratic formula). \nSo we have $5$ solutions for $b,$ each of which give $2$ values for $a,$ except for $2,$ which only give one. So in total, there are $5*2 - 2 = 8$ ordered pairs of $(a,b)$ in this case.\n\n$\\textbf{Case 2:}$\n$m$ has two solutions, but exactly one of them isn't equal to $2$. This ensures that $1$ of the solutions is equal to $2$.\nLet $r$ be the other value of $m$ that isn't $2$. By Vieta: \n\\begin{align*} r+2 &= -a-2\\\\ 2r &= 4+2a+b. \\end{align*} From the first equation, we subtract both sides by $2$ and double both sides to get $2r = -2a - 8$ which also equals to $4+2a+b$ from the second equation. Equating both, we have $4a + b + 12 = 0$. We can easily count that there would be $11$ ordered pairs $(a,b)$ that satisfy that.\nHowever, there's an outlier case in which $r$ happens to also equal to $2,$ and we don't want that. We can reverse engineer and find out that $r=2$ when $(a,b) = (-6, 12),$ which we overcounted. So we subtract by one and we conclude that there are $10$ ordered pairs of $(a,b)$ that satisfy this case.\n\nThis all shows that there are a total of $8+10 = 18$ amount of ordered pairs $(a,b)$. Multiplying this by $41$ (the amount of values for $c$) we get $18\\cdot41=\\boxed{738}$ as our final answer.\n~s214425\n$p(x)-p(2)$ is a cubic with at least two integral real roots, therefore it has three real roots, which are all integers.\nThere are exactly two distinct roots, so either $p(x)=p(2)+(x-2)^2(x-m)$ or $p(x)=p(2)+(x-2)(x-m)^2$, with $m\\neq 2$.\nIn the first case $p(x)=x^3-(4+m)x^2+(4+4m)x-4m+p(2)$, with $|4+4m|\\leq 20$ (which entails $|4+m|\\leq 20$), so $m$ can be $-6,-5,-4,-3,-2,-1,0,1, (\\textbf{not 2}!), 3,4$ and $-4m+p(2)$ can be any integer from $-20$ to $20$, giving $410$ polynomials (since the coefficients are given by linear functions of $m$ and thus are distinct). \nIn the second case $p(x)=x^3-(2+2m)x^2+(4m+m^2)x-2m^2+p(2)$, and $m$ can be $-6,-5,-4,-3,-2,-1,0,1$ and $-4m+p(2)$ can be any integer from $-20$ to $20$, giving $328$ polynomials.\nThe total is $\\boxed{738}$.\n~EVIN-","answer":"738","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_I_Problems\/Problem_9"} {"id":45,"problem":"The numbers of apples growing on each of six apple trees form an arithmetic sequence where the greatest number of apples growing on any of the six trees is double the least number of apples growing on any of the six trees. The total number of apples growing on all six trees is $990.$ Find the greatest number of apples growing on any of the six trees.","solution":"In the arithmetic sequence, let $a$ be the first term and $d$ be the common difference, where $d>0.$ The sum of the first six terms is \\[a+(a+d)+(a+2d)+(a+3d)+(a+4d)+(a+5d) = 6a+15d.\\]\nWe are given that\n\\begin{align*} 6a+15d &= 990, \\\\ 2a &= a+5d. \\end{align*}\nThe second equation implies that $a=5d.$ Substituting this into the first equation, we get \n\\begin{align*} 6(5d)+15d &=990, \\\\ 45d &= 990 \\\\ d &= 22. \\end{align*}\nIt follows that $a=110.$ Therefore, the greatest number of apples growing on any of the six trees is $a+5d=\\boxed{220}$.\n~MRENTHUSIASM\nLet the terms in the sequence be defined as \\[a_1, a_2, ..., a_6.\\]\nSince this is an arithmetic sequence, we have $a_1+a_6=a_2+a_5=a_3+a_4.$ So, \\[\\sum_{i=1}^6 a_i=3(a_1+a_6)=990.\\] Hence, $(a_1+a_6)=330.$ And, since we are given that $a_6=2a_1,$ we get $3a_1=330\\implies a_1=110$ and $a_6=\\boxed{220}$.\n~Kiran","answer":"220","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_1"} {"id":46,"problem":"Let $N$ be the number of ways to place the integers $1$ through $12$ in the $12$ cells of a $2 \\times 6$ grid so that for any two cells sharing a side, the difference between the numbers in those cells is not divisible by $3.$ One way to do this is shown below. Find the number of positive integer divisors of $N$.\n\\[\\begin{array}{|c|c|c|c|c|c|} \\hline \\,1\\, & \\,3\\, & \\,5\\, & \\,7\\, & \\,9\\, & 11 \\\\ \\hline \\,2\\, & \\,4\\, & \\,6\\, & \\,8\\, & 10 & 12 \\\\ \\hline \\end{array}\\]","solution":"We replace the numbers which are 0 mod(3) to 0, 1 mod(3) to 1, and 2 mod(3) to 2.\nThen, the problem is equivalent to arranging 4 0's,4 1's, and 4 2's into the grid (and then multiplying by $4!^3$ to account for replacing the remainder numbers with actual numbers) such that no 2 of the same numbers are adjacent. \nThen, the numbers which are vertically connected must be different. 2 1s must be connected with 2 2s, and 2 1s must be connected with 2 2s (vertically), as if there are less 1s connected with either, then there will be 2s or 3s which must be connected within the same number.\nFor instance if we did did:\n- 12 x 3\n- 13 x 1\nThen we would be left with 23 x1, and 2 remaining 3s which aren't supposed to be connected, so it is impossible. Similar logic works for why all 1s can't be connected with all 2s. \n\nThus, we are left with the problem of re-arranging 2x 12 pairs, 2x 13 pairs, 2x 23 pairs. Notice that the pairs can be re-arranged horizontally in any configuration, but when 2 pairs are placed adjacent there is only 1 configuration for the rightmost pair to be set after the leftmost one has been placed.\nWe have $\\frac{6!}{2!2!2!}=90$ ways to horizontally re-arrange the pairs, with 2 ways to set the initial leftmost column. Thus, there are 180 ways to arrange the pairs. Accounting for the initial simplification of the problem with 1-12 -> 0-3, we obtain the answer is: \n\\[2488320=2^{11}\\cdot3^5\\cdot5^1\\]\nThe number of divisors is: $12\\cdot6\\cdot2=\\boxed{144}$.\n~SAHANWIJETUNGA\nLet's carry out an archaeological study, that is, we will find the bones (the base) and \"build up the meat.\"\n1. Let \"bones\" of number $X$ be $X \\pmod 3.$ Then the \u201cskeleton\u201d of the original table is\n\\[1 0 2 1 0 2\\]\n\\[2 1 0 2 1 0\\]\nBy condition, the table cannot have a column of two identical numbers (the difference of such numbers is a multiple of $3)$.\nThere are $4$ zeros, $4$ ones and $4$ twos in the table (the order of the numbers in the columns is not important).\nTherefore, there cannot be more than two identical columns (otherwise there will be four identical numbers in the remaining three, that is, the numbers in one column are the same).\nAny such table has exactly $2$ columns $(0,1), 2$ columns $(0,2)$ and $2$ columns $(1,2)$.\nThe number of possible tables of six elements of three types is \n\\[m = \\frac {6!}{2! \\cdot 2! \\cdot 2!} = 2 \\cdot 3^2 \\cdot 5.\\]\nThe number of possible tables of six elements, if the order of the digits is important, is \n\\[M = 2^6 \\cdot m = 2^7 \\cdot 3^2 \\cdot 5.\\]\n2. We are looking for the total number of options.\nThe column $(0,1)$ can contain the following $4^2 = 16$ pairs of numbers (the order is not important, it is already taken into account)\n\\[(1,3), (1,6), (1,9), (1, 12), (4.3), (4.6), (4.9) (4.12), (7.3), (7.6), (7.9), (7.12), (11,3), (11,6), (11,9), (11,12).\\]\nThe second column $(0,1)$ can contain $3^2 = 9$ pairs of numbers (excluding the two that are in the first column).\nSimilarly with the other two columns, i.e. the total number of choices \\[M \\cdot 16 \\cdot 9 \\cdot 3 = 2^{11} \\cdot 3^5 \\cdot 5.\\]\nNumber of divisors \\[(11+1) \\cdot (5+1) \\cdot (1 + 1) = \\boxed{144}.\\]\nvladimir.shelomovskii@gmail.com, vvsss\n\nSimpler Way to Finish\nNote that there are 6!\/(2!2!2!) ways for the possible column arrangements. Then, each of those columns have two numbers, which can be permuted either way, so we multiply by 2!. Finally, we have 4 of each of 0, 1, and 2 mod 3. Thus, let us put those 4 who are 0 mod 3, and we get 4! ways to do this. Similarly can be said for 1 and 2 mod 3, so we multiply by (4!)^3. Thus, the final answer is 6!\/(2!2!2!)*2!*(4!)^3 which leads us to the same solution as above.\nmathboy282","answer":"144","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_10"} -{"id":47,"problem":"Find the number of collections of $16$ distinct subsets of $\\{1,2,3,4,5\\}$ with the property that for any two subsets $X$ and $Y$ in the collection, $X \\cap Y \\not= \\emptyset.$","solution":"Denote by $\\mathcal C$ a collection of 16 distinct subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$.\nDenote $N = \\min \\left\\{ |S|: S \\in \\mathcal C \\right\\}$.\nCase 1: $N = 0$.\nThis entails $\\emptyset \\in \\mathcal C$.\nHence, for any other set $A \\in \\mathcal C$, we have $\\emptyset \\cap A = \\emptyset$. This is infeasible.\nCase 2: $N = 1$.\nLet $\\{a_1\\} \\in \\mathcal C$.\nTo get $\\{a_1\\} \\cap A \\neq \\emptyset$ for all $A \\in \\mathcal C$.\nWe must have $a_1 \\in \\mathcal A$.\nThe total number of subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain $a_1$ is $2^4 = 16$.\nBecause $\\mathcal C$ contains 16 subsets.\nWe must have $\\mathcal C = \\left\\{ \\{a_1\\} \\cup A\u00a0: \\forall \\ A \\subseteq \\left\\{ 1, 2, 3, 4, 5 \\right\\} \\backslash \\left\\{a_1 \\right\\} \\right\\}$.\nTherefore, for any $X, Y \\in \\mathcal C$, we must have $X \\cap Y \\supseteq \\{a_1\\}$.\nSo this is feasible.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $a_1$.\nTherefore, the number of solutions is 5.\nCase 3: $N = 2$.\nCase 3.1: There is exactly one subset in $\\mathcal C$ that contains 2 elements.\nDenote this subset as $\\left\\{ a_1, a_2 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$.\nTherefore, the number of solutions is $\\binom{5}{2} = 10$.\nCase 3.2: There are exactly two subsets in $\\mathcal C$ that contain 2 elements.\nThey must take the form $\\left\\{ a_1, a_2 \\right\\}$ and $\\left\\{ a_1, a_3 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$ and $\\left\\{ a_2, a_4, a_5 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$ and $\\left\\{ a_1, a_3 \\right\\}$.\nTherefore, the number of solutions is $5 \\cdot \\binom{4}{2} = 30$.\nCase 3.3: There are exactly three subsets in $\\mathcal C$ that contain 2 elements.\nThey take the form $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_1, a_4 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_3, a_5 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_1, a_4 \\right\\}$.\nTherefore, the number of solutions is $5 \\cdot \\binom{4}{3} = 20$.\nCase 3.4: There are exactly three subsets in $\\mathcal C$ that contain 2 elements.\nThey take the form $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_2, a_3 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_4, a_5 \\right\\}$, $\\left\\{ a_1, a_4, a_5 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_2, a_3 \\right\\}$.\nTherefore, the number of solutions is $\\binom{5}{3} = 10$.\nCase 3.5: There are exactly four subsets in $\\mathcal C$ that contain 2 elements.\nThey take the form $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_1, a_4 \\right\\}$, $\\left\\{ a_1, a_5 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_4, a_5 \\right\\}$, $\\left\\{ a_1, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_3, a_4 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_1, a_4 \\right\\}$, $\\left\\{ a_1, a_5 \\right\\}$.\nTherefore, the number of solutions is 5.\nPutting all subcases together, the number of solutions is this case is $10 + 30 + 20 + 10 + 5 = 75$.\nCase 4: $N \\geq 3$.\nThe number of subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements is $\\sum_{i=3}^5 \\binom{5}{i} = 16$.\nBecause $\\mathcal C$ has 16 elements, we must select all such subsets into $\\mathcal C$.\nTherefore, the number of solutions in this case is 1.\nPutting all cases together, the total number of $\\mathcal C$ is $5 + 75 + 1 = \\boxed{\\textbf{(081) }}$.\nDenote the $A$ as $\\{ 1,2,3,4,5 \\}$ and the collection of subsets as $S$. \n\nCase 1: There are only sets of size $3$ or higher in $S$: \nAny two sets in $S$ must have at least one element common to both of them (since $3+3>5$). Since there are $16$ subsets of $A$ that have size $3$ or higher, there is only one possibility for this case.\n\nCase 2: There are only sets of size $2$ or higher in $S$: \nFirstly, there cannot be a no size $2$ set $S$, or it will be overcounting the first case.\nIf there is only one such size $2$ set, there are $10$ ways to choose it. That size $2$ set, say $X$, cannot be in $S$ with $Y = A\/X$ (a three element set). Thus, there are only $15$ possible size $3$ subsets that can be in $S$, giving us $10$ for this case.\nIf there are two sets with size $2$ in $S$, we can choose the common elements of these two subsets in $5$ ways, giving us a total of $5\\cdot 6 = 30$.\nIf there are three sets with size $2$, they can either share one common element, which can be done in $5 \\cdot 4 = 20$ ways, or they can share pairwise common elements (sort of like a cycle), which can be done $\\binom{5}{2} = 10$ ways. In total, we have $30$ possibilities.\nIf there are four sets with size $2$, they all have to share one common element, which can be done in $5\\cdot 1$ ways.\nThus, summing everything up, this will give us $75$ possible sets $S$\n\nCase 3: There is a set with size $1$ in $S$: \nNotice that be at most one size $1$ subset. There are $5$ ways to choose that single element set. Say it's $\\{ 1\\}$. All other subsets in $S$ must have a $1$ in them, but there are only $2^4-1 = 15$ of them. Thus this case yields $5\\cdot 1 = 5$ possibilities.\n\nThus, the total number of sets $S$ would be $1+75+5 = \\boxed{\\textbf{(081)}}$.\n~sml1809\nFirstly, there cannot be two subsets with cardinality 1, or they will not intersect.\nIf there is one subset $A$ with cardinality $1$; let the element in $A$ be $a$, then there are $2^4=16$ subsets that do not include $a$ so they do not work. Every remaining subsets $S$ will have $a$ as an element so $S\\cap{A}\\geq1$, since we just excluded all that do not. Since there are 15 subsets left, all are forced into the group of 16 subsets, so we just choose the number of $a$ to determine the set $A$. $A\\in\\{1,2,3,4,5\\}$ so there are 5 ways.\nFor the rest of the cases, we assume there are no sets $A$ with cardinality 1. Notice that the only way to \"violate\" the condition is to have subsets $X$ and $Y$ with cardinalities 2 and 3 in some order. Otherwise, by the Pigeonhole Principle, if two sets both have cardinalities more than 3, they are bound to have one element of intersection. Say a set $S$ has $|S|=2$, then there is clearly only one set $s$ that will make $S\\cap{s}=0$. By our previous claim, all other subsets that have cardinality $c\\geq{3}$ will work.\nNow if we generalize a bit: If a subset has $N$ 2-element subsets which belong to set $M$, then there are exactly $N$ subsets with cardinality 3 that don't work. Therefore, the number of \"violating subsets\" are all subsets with cardinality $c\\leq{1}$, all 2-element subsets that are not in $M$, and all corresponding cardinality 3 subsets. Subtracting from the total 32 subsets, we get that $32-(1+5+(10-N)+N)=16$ subsets that do work. This includes all subsets in $M$, so the remaining non-violating subsets are forced. This is equivalent now to choosing $N$ 2 element subsets.\nFollowing casework on the number of 2-element subsets:\nIf $N=1$: There are $\\binom{5}{2}=10$ ways.\nIf $N=2$: There are $5$ ways to choose the intersection between the 2 sets (remember they have to have at least one element of intersection) and $\\binom{4}{2}=6$ ways to choose the distinct elements in the subsets, so there are $5*6=30$ ways.\nIf $N=3$: It can be a cycle, where WLOG let the elements be $a,b,c$ so the sets are $\\{a,b\\}$, $\\{b,c\\}$, and $\\{c,a\\}$. This is just $\\binom{5}{3}=10$. Alternatively, it can also be the case where all sets share one element. There are 5 ways to choose this element and $\\binom{4}{2}=6$ ways to choose the remaining elements to assign to each set. There are $30$ ways.\nIf $N=4$: By the Pigeonhole Principle, the only way all pairwise sets have at one common intersection is if all share one element in common. There are 5 ways to choose this element and the remaining numbers are forced. There are 5 ways.\n$N\\geq{5}$ does not provide any valid cases since to have all pairwise elements to intersect one element, they must be the same element by the Pigeonhole Principle, but there are not enough subsets.\nIf $N=0$, then there is only one way since $\\binom{5}{3}+\\binom{5}{4}+\\binom{5}{5}=16$.\nAdding all cases yields $5+10+30+30+5+1=\\boxed{81}$ ways!\n-Magnetoninja","answer":"081","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_11"} -{"id":48,"problem":"In $\\triangle ABC$ with side lengths $AB = 13$, $BC = 14$, and $CA = 15$, let $M$ be the midpoint of $\\overline{BC}.$ Let $P$ be the point on the circumcircle of $\\triangle ABC$ such that $M$ is on $\\overline{AP}.$ There exists a unique point $Q$ on segment $\\overline{AM}$ such that $\\angle PBQ = \\angle PCQ.$ Then $AQ$ can be written as $\\frac{m}{\\sqrt{n}},$ where $m$ and $n$ are relatively prime positive integers. Find $m+n.$","solution":"Because $M$ is the midpoint of $BC$, following from the Stewart's theorem, $AM = 2 \\sqrt{37}$.\nBecause $A$, $B$, $C$, and $P$ are concyclic, $\\angle BPA = \\angle C$, $\\angle CPA = \\angle B$.\nDenote $\\theta = \\angle PBQ$.\nIn $\\triangle BPQ$, following from the law of sines,\n\\[ \\frac{BQ}{\\sin \\angle BPA} = \\frac{PQ}{\\angle PBQ} \\]\nThus,\n\\[ \\frac{BQ}{\\sin C} = \\frac{PQ}{\\sin \\theta} . \\hspace{1cm} (1) \\]\nIn $\\triangle CPQ$, following from the law of sines,\n\\[ \\frac{CQ}{\\sin \\angle CPA} = \\frac{PQ}{\\angle PCQ} \\]\nThus,\n\\[ \\frac{CQ}{\\sin B} = \\frac{PQ}{\\sin \\theta} . \\hspace{1cm} (2) \\]\nTaking $\\frac{(1)}{(2)}$, we get\n\\[ \\frac{BQ}{\\sin C} = \\frac{CQ}{\\sin B} \\]\nIn $\\triangle ABC$, following from the law of sines,\n\\[ \\frac{AB}{\\sin C} = \\frac{AC}{\\sin B} . \\hspace{1cm} (3) \\]\nThus, Equations (2) and (3) imply\n\\begin{align*} \\frac{BQ}{CQ} & = \\frac{AB}{AC} \\\\ & = \\frac{13}{15} . \\hspace{1cm} (4) \\end{align*}\n\nNext, we compute $BQ$ and $CQ$.\nWe have\n\\begin{align*} BQ^2 & = AB^2 + AQ^2 - 2 AB\\cdot AQ \\cos \\angle BAQ \\\\ & = AB^2 + AQ^2 - 2 AB\\cdot AQ \\cos \\angle BAM \\\\ & = AB^2 + AQ^2 - 2 AB\\cdot AQ \\cdot \\frac{AB^2 + AM^2 - BM^2}{2 AB \\cdot AM} \\\\ & = AB^2 + AQ^2 - AQ \\cdot \\frac{AB^2 + AM^2 - BM^2}{AM} \\\\ & = 169 + AQ^2 - \\frac{268}{2 \\sqrt{37}} AQ . \\hspace{1cm} (5) \\end{align*}\nWe have\n\\begin{align*} CQ^2 & = AC^2 + AQ^2 - 2 AC\\cdot AQ \\cos \\angle CAQ \\\\ & = AC^2 + AQ^2 - 2 AC\\cdot AQ \\cos \\angle CAM \\\\ & = AC^2 + AQ^2 - 2 AC\\cdot AQ \\cdot \\frac{AC^2 + AM^2 - CM^2}{2 AC \\cdot AM} \\\\ & = AC^2 + AQ^2 - AQ \\cdot \\frac{AC^2 + AM^2 - CM^2}{AM} \\\\ & = 225 + AQ^2 - \\frac{324}{2 \\sqrt{37}} AQ . \\hspace{1cm} (6) \\end{align*}\nTaking (5) and (6) into (4), we get $AQ = \\frac{99}{\\sqrt{148}}$\nTherefore, the answer is $99 + 148 = \\boxed{\\textbf{(247) }}$\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\nDefine $L_1$ to be the foot of the altitude from $A$ to $BC$. Furthermore, define $L_2$ to be the foot of the altitude from $Q$ to $BC$. From here, one can find $AL_1=12$, either using the 13-14-15 triangle or by calculating the area of $ABC$ two ways. Then, we find $BL_1=5$ and $L_1C = 9$ using Pythagorean theorem. Let $QL_2=x$. By AA similarity, $\\triangle{AL_1M}$ and $\\triangle{QL_2M}$ are similar. By similarity ratios, \\[\\frac{AL_1}{L_1M}=\\frac{QL_2}{L_2M}\\]\n\\[\\frac{12}{2}=\\frac{x}{L_2M}\\]\n\\[L_2M = \\frac{x}{6}\\]\nThus, $BL_2=BM-L_2M=7-\\frac{x}{6}$. Similarly, $CL_2=7+\\frac{x}{6}$. Now, we angle chase from our requirement to obtain new information.\n\\[\\angle{PBQ}=\\angle{PCQ}\\]\n\\[\\angle{QCM}+\\angle{PCM}=\\angle{QBM}+\\angle{PBM}\\]\n\\[\\angle{QCL_2}+\\angle{PCM}=\\angle{QBL_2}+\\angle{PBM}\\]\n\\[\\angle{PCM}-\\angle{PBM}=\\angle{QBL_2}-\\angle{QCL_2}\\]\n\\[\\angle{MAB}-\\angle{MAC}=\\angle{QBL_2}-\\angle{QCL_2}\\text{(By inscribed angle theorem)}\\]\n\\[(\\angle{MAL_1}+\\angle{L_1AB})-(\\angle{CAL_1}-\\angle{MAL_1})=\\angle{QBL_2}-\\angle{QCL_2}\\]\n\\[2\\angle{MAL_1}+\\angle{L_1AB}-\\angle{CAL_1}=\\angle{QBL_2}-\\angle{QCL_2}\\]\nTake the tangent of both sides to obtain \n\\[\\tan(2\\angle{MAL_1}+\\angle{L_1AB}-\\angle{CAL_1})=\\tan(\\angle{QBL_2}-\\angle{QCL_2})\\]\nBy the definition of the tangent function on right triangles, we have $\\tan{MAL_1}=\\frac{7-5}{12}=\\frac{1}{6}$, $\\tan{CAL_1}=\\frac{9}{12}=\\frac{3}{4}$, and $\\tan{L_1AB}=\\frac{5}{12}$. By abusing the tangent angle addition formula, we can find that \n\\[\\tan(2\\angle{MAL_1}+\\angle{L_1AB}-\\angle{CAL_1})=\\frac{196}{2397}\\]\nBy substituting $\\tan{\\angle{QBL_2}}=\\frac{6x}{42-x}$, $\\tan{\\angle{QCL_2}}=\\frac{6x}{42+x}$ and using tangent angle subtraction formula we find that \n\\[x=\\frac{147}{37}\\]\nFinally, using similarity formulas, we can find \n\\[\\frac{AQ}{AM}=\\frac{12-x}{x}\\]. Plugging in $x=\\frac{147}{37}$ and $AM=\\sqrt{148}$, we find that \\[AQ=\\frac{99}{\\sqrt{148}}\\] Thus, our final answer is $99+148=\\boxed{247}$. \n~sigma\nIt is clear that $BQCP$ is a parallelogram. By Stewart's Theorem, $AM=\\sqrt{148}$, POP on $M$ tells $PM=\\frac{49}{\\sqrt{148}}$\nAs $QM=PM, AQ=AM-PM=\\frac{99}{\\sqrt{148}}$ leads to $\\boxed{247}$\n~bluesoul (supplemental note: ~Mathavi)\n$\\textbf{NOTE: Why BQCP is a parallelogram}$\nIt's not actually immediately clear why this is the case. There are two ways to easily show this:\n$\\textbf{Competition solution:}$\nNotice that the problem statement tells us that point Q is $\\textit{unique.}$ EVERY piece of information in the problem statement is intentional, so we should try to use this to our benefit. None of the other solutions do, which is why they are more complicated than they need be.\nConsider point Q' s.t. $Q'M = MP$. Obviously, $\\angle Q'CP$ and $\\angle Q'BP$ are equal - we have perfect symmetry along line $AP$. Moreover, $BQ'CP$ is a parallelogram as its diagonals bisect each other. Since point $Q$ is unique, we know that $Q' \\textit{is } Q$. Thus $BQCP$ is a parallelogram. $\\blacksquare$\n$\\newline$\n$\\textbf{Rigorous proof (not recommended for competition scenario):}$\nConsider any quadrilateral $ABCD$ whose diagonals intersect at $O$ s.t. $AO = OC$ and $\\angle BAD = \\angle BCD$. We will prove that $ABCD$ is $\\textit{either a \\textbf{parallelogram} or a \\textbf{kite}}$. \n(Note that in our problem, since $AP$ and $BC$ are not orthogonal, ($ABC$ isn't isosceles) this is enough to show that $BQCP$ is a parallelogram).\n$\\newline$\n-- By same base\/same altitude, $[ABO] = [CBO]$ and $[ADO] = [CDO] \\implies [ABD] = [ABO] + [ADO] = [CBO] + [CDO] = [CBD]. \\newline$\nTherefore: $\\frac{1}{2} sin(\\angle BAD) \\overline{AB} \\times \\overline{AD} = \\frac{1}{2} sin(\\angle BCD) \\overline{CB} \\times \\overline{CD}.$ Since $\\angle BAD = \\angle BCD$, this reduces to $\\overline{AB} \\times \\overline{AD} = \\overline{CB} \\times \\overline{CD}. (E.1) \\newline$\nLet $AB = x$ and $AD = y$. Then, by $(E.1)$, $CB = kx$ and $CD = \\frac{y}{k}$ for some real $k$. Then by LoC on $\\triangle BAD$ and $\\triangle BCD$:\n$x^{2} + y^{2} - 2xy cos(\\angle BAD) = \\overline{BD} = x^{2}k^{2} + \\frac{y^{2}}{k^{2}} - 2xy cos(\\angle BCD) \\newline \\implies x^{2} + y^{2} = x^{2}k^{2} + \\frac{y^{2}}{k^{2}} \\newline \\implies (y^{2} - x^{2}k^{2})(k^{2} - 1) = 0.\\newline$\n-- $y^{2} - x^{2}k^{2} = 0 \\implies y = kx \\implies AD = BC$ and $AB = CD \\implies$ $ABCD$ is a parallelogram.\n-- $k^{2} - 1 = 0 \\implies k = 1$ ($k$ cannot be $-1$; no negative sided polygons here!) $\\implies AB = CB$ and $AD = CD \\implies$ $ABCD$ is a kite. $\\square$. ~Mathavi\nFirst, note that by Law of Sines, $\\frac{\\sin(\\angle{QBP})}{QP}=\\frac{\\sin(\\angle{BPQ})}{BQ}$ and that $\\frac{\\sin(\\angle{QCP})}{QP}=\\frac{\\sin(\\angle{QPC})}{QP}$. Equating the 2 expressions, you get that $\\frac{\\sin(\\angle{BPQ})}{BQ}=\\frac{\\sin(\\angle{QPC})}{QP}$. Now drop the altitude from $A$ to $BC$. As it is commonly known that the dropped altitude forms a $5-12-13$ and a $9-12-15$ triangle, you get the measures of $\\angle{ABC}$ and $\\angle{ACB}$ respectively, which are $\\arcsin(\\frac{12}{13})$ and $\\arcsin(\\frac{4}{5})$. However, by the inscribed angle theorem, you get that $\\angle{BPQ}=\\arcsin(\\frac{4}{5})$ and that $\\angle{QPC}=\\arcsin(\\frac{12}{13})$, respectively. Therefore, by Law of Sines (as previously stated) $\\frac{BQ}{CQ}=\\frac{13}{15}$.\nNow commence coordbashing. Let $B$ be the origin, and $A$ be the point $(5,12)$. As $AP$ passes through $A$, which is $(5,12)$, and $M$, which is $(7,0)$, it has the equation $-6x+42$, so therefore a point on this line can be written as $(x,42-6x)$. As we have the ratio of the lengths, which prompts us to write the lengths in terms of the distance formula, we can just plug and chug it in to get the ratio $\\frac{\\sqrt{37x^2-504x+1764}}{\\sqrt{37x^2-532x+1960}}=\\frac{13}{15}$. This can be squared to get $\\frac{37x^2-504x+1764}{37x^2-532x+1960}=\\frac{169}{225}$. This can be solved to get a solution of $x=\\frac{469}{74}$, and an extraneous solution of $5$ which obviously doesn\u2019t work. \nPlugging $x$ into the line equation gets you $y=\\frac{147}{37}$. The distance between this point and $A$, which is $(5,12)$ is $\\sqrt{\\frac{9801}{148}}$, or simplified to $\\frac{99}{\\sqrt{148}}\\Longrightarrow99+148=\\boxed{247}$\n~dragoon (minor $\\LaTeX$ fixes by rhydon516)\n[2023 AIME II 12.png](https:\/\/artofproblemsolving.com\/wiki\/index.php\/File:2023_AIME_II_12.png)\nWe use the law of Cosine and get \\[AB^2 = AM^2 + BM^2 - 2 AM \\cdot BM \\cos \\angle AMB,\\] \\[AC^2 = AM^2 + CM^2 + 2 AM \\cdot CM \\cos \\angle AMB \\implies\\] \\[AM^2 = \\frac {AB^2 + AC^2}{2}- BM^2 = \\sqrt{148} \\approx 12.\\]\nWe use the power of point $M$ with respect circumcircle $\\triangle ABC$ and get \n\\[AM \\cdot MP = BM \\cdot CM = BM^2 \\implies\\]\n\\[PM = \\frac {49}{\\sqrt {148}} \\approx \\frac {48}{12} \\approx 4 < AM.\\]\nIt is clear that if $Q = P,$ then $\\angle PBQ = \\angle PCQ = 0 \\implies$\nif $Q$ is symmetric to $P$ with respect $M$ then $\\angle PBQ = \\angle PCQ$.\nThere exists a unique point $Q$ on segment $\\overline{AM}, PM < AM \\implies$\n\\[PQ = AM - PM = \\frac{99}{\\sqrt{148}} \\implies \\boxed{247}.\\]\nvladimir.shelomovskii@gmail.com, vvsss","answer":"247","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_12"} -{"id":49,"problem":"Let $A$ be an acute angle such that $\\tan A = 2 \\cos A.$ Find the number of positive integers $n$ less than or equal to $1000$ such that $\\sec^n A + \\tan^n A$ is a positive integer whose units digit is $9.$","solution":"Denote $a_n = \\sec^n A + \\tan^n A$.\nFor any $k$, we have\n\\begin{align*} a_n & = \\sec^n A + \\tan^n A \\\\ & = \\left( \\sec^{n-k} A + \\tan^{n-k} A \\right) \\left( \\sec^k A + \\tan^k A \\right) - \\sec^{n-k} A \\tan^k A - \\tan^{n-k} A \\sec^k A \\\\ & = a_{n-k} a_k - 2^k \\sec^{n-k} A \\cos^k A - 2^k \\tan^{n-k} A \\cot^k A \\\\ & = a_{n-k} a_k - 2^k a_{n-2k} . \\end{align*}\nNext, we compute the first several terms of $a_n$.\nBy solving equation $\\tan A = 2 \\cos A$, we get $\\cos A = \\frac{\\sqrt{2 \\sqrt{17} - 2}}{4}$.\nThus, $a_0 = 2$, $a_1 = \\sqrt{\\sqrt{17} + 4}$, $a_2 = \\sqrt{17}$, $a_3 = \\sqrt{\\sqrt{17} + 4} \\left( \\sqrt{17} - 2 \\right)$, $a_4 = 9$.\nIn the rest of analysis, we set $k = 4$.\nThus,\n\\begin{align*} a_n & = a_{n-4} a_4 - 2^4 a_{n-8} \\\\ & = 9 a_{n-4} - 16 a_{n-8} . \\end{align*}\nThus, to get $a_n$ an integer, we have $4 | n$.\nIn the rest of analysis, we only consider such $n$. Denote $n = 4 m$ and $b_m = a_{4n}$.\nThus,\n\\begin{align*} b_m & = 9 b_{m-1} - 16 b_{m-2} \\end{align*}\nwith initial conditions $b_0 = 2$, $b_1 = 9$.\nTo get the units digit of $b_m$ to be 9, we have\n\\begin{align*} b_m \\equiv -1 & \\pmod{2} \\\\ b_m \\equiv -1 & \\pmod{5} \\end{align*}\nModulo 2, for $m \\geq 2$, we have\n\\begin{align*} b_m & \\equiv 9 b_{m-1} - 16 b_{m-2} \\\\ & \\equiv b_{m-1} . \\end{align*}\nBecause $b_1 \\equiv -1 \\pmod{2}$, we always have $b_m \\equiv -1 \\pmod{2}$ for all $m \\geq 2$.\nModulo 5, for $m \\geq 5$, we have\n\\begin{align*} b_m & \\equiv 9 b_{m-1} - 16 b_{m-2} \\\\ & \\equiv - b_{m-1} - b_{m-2} . \\end{align*}\nWe have $b_0 \\equiv 2 \\pmod{5}$, $b_1 \\equiv -1 \\pmod{5}$,\n$b_2 \\equiv -1 \\pmod{5}$, $b_3 \\equiv 2 \\pmod{5}$, $b_4 \\equiv -1 \\pmod{5}$, $b_5 \\equiv -1 \\pmod{5}$, $b_6 \\equiv 2 \\pmod{5}$.\nTherefore, the congruent values modulo 5 is cyclic with period 3.\nTo get $b_m \\equiv -1 \\pmod{5}$, we have $3 \\nmid m \\pmod{3}$.\nFrom the above analysis with modulus 2 and modulus 5, we require $3 \\nmid m \\pmod{3}$.\nFor $n \\leq 1000$, because $n = 4m$, we only need to count feasible $m$ with $m \\leq 250$.\nThe number of feasible $m$ is\n\\begin{align*} 250 - \\left\\lfloor \\frac{250}{3} \\right\\rfloor & = 250 - 83 \\\\ & = \\boxed{\\textbf{(167) }} . \\end{align*}\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\n\\[\\tan A = 2 \\cos A \\implies \\sin A = 2 \\cos^2 A \\implies \\sin^2 A + \\cos^2 A = 4 \\cos^4 A + \\cos^2 A = 1\\]\n\\[\\implies \\cos^2 A = \\frac {\\sqrt {17} - 1}{8}.\\]\n\\[c_n = \\sec^n A + \\tan^n A = \\frac {1}{\\cos^n A} + 2^n \\cos^n A = (4\\cos^2 A +1)^{\\frac {n}{2}}+(4 \\cos^2 A)^{\\frac {n}{2}} =\\]\n\\[= \\left(\\frac {\\sqrt {17} + 1}{2}\\right)^{\\frac {n}{2}}+ \\left(\\frac {\\sqrt {17} - 1}{2}\\right)^{\\frac {n}{2}}.\\]\nIt is clear, that $c_n$ is not integer if $n \\ne 4k, k > 0$.\nDenote $x = \\frac {\\sqrt {17} + 1}{2}, y = \\frac {\\sqrt {17} - 1}{2} \\implies$\n\\[x \\cdot y = 4, x + y = \\sqrt{17}, x - y = 1 \\implies x^2 + y^2 = (x - y)^2 + 2xy = 9 = c_4.\\]\n\\[c_8 = x^4 + y^4 = (x^2 + y^2)^2 - 2x^2 y^2 = 9^2 - 2 \\cdot 16 = 49.\\]\n\\[c_{4k+4} = x^{4k+4} + y^{4k+4} = (x^{4k} + y^{4k})(x^2+y^2)- (x^2 y^2)(x^{4k-2}+y^{4k-2}) = 9 c_{4k}- 16 c_{4k \u2013 4} \\implies\\]\n\\[c_{12} = 9 c_8 - 16 c_4 = 9 \\cdot 49 - 16 \\cdot 9 = 9 \\cdot 33 = 297.\\]\n\\[c_{16} = 9 c_{12} - 16 c_8 = 9 \\cdot 297 - 16 \\cdot 49 = 1889.\\]\n\\[c_{12m + 4} \\pmod{10} = 9 \\cdot c_{12m} \\pmod{10} - 16 \\pmod{10} \\cdot c_{12m - 4} \\pmod{10} =\\]\n\\[= (9 \\cdot 7 - 6 \\cdot 9) \\pmod{10} = (3 - 4) \\pmod{10} = 9.\\]\n\\[c_{12m + 8}\\pmod{10} = 9 \\cdot c_{12m+4} \\pmod{10} - 16 \\pmod{10} \\cdot c_{12m } \\pmod{10} =\\]\n\\[= (9 \\cdot 9 - 6 \\cdot 7) \\pmod{10} = (1 - 2)\\pmod{10} = 9.\\]\n\\[c_{12m + 12} \\pmod{10} = 9 \\cdot c_{12m + 8} \\pmod{10} - 16 \\pmod{10} \\cdot c_{12m + 4} \\pmod{10} =\\]\n\\[= (9 \\cdot 9 - 6 \\cdot 9) \\pmod{10} = (1 - 4) \\pmod{10} = 7 \\implies\\]\nThe condition is satisfied iff $n = 12 k + 4$ or $n = 12k + 8$.\nIf $n \\le N$ then the number of possible n is $\\left\\lfloor \\frac{N}{4} \\right\\rfloor - \\left\\lfloor \\frac{N}{12} \\right\\rfloor$.\nFor $N = 1000$ we get $\\left\\lfloor \\frac{1000}{4} \\right\\rfloor - \\left\\lfloor \\frac{1000}{12} \\right\\rfloor = 250 - 83 = \\boxed{167}$.\nvladimir.shelomovskii@gmail.com, vvsss","answer":"167","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_13"} +{"id":47,"problem":"Find the number of collections of $16$ distinct subsets of $\\{1,2,3,4,5\\}$ with the property that for any two subsets $X$ and $Y$ in the collection, $X \\cap Y \\not= \\emptyset$.","solution":"Denote by $\\mathcal C$ a collection of 16 distinct subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$.\nDenote $N = \\min \\left\\{ |S|: S \\in \\mathcal C \\right\\}$.\nCase 1: $N = 0$.\nThis entails $\\emptyset \\in \\mathcal C$.\nHence, for any other set $A \\in \\mathcal C$, we have $\\emptyset \\cap A = \\emptyset$. This is infeasible.\nCase 2: $N = 1$.\nLet $\\{a_1\\} \\in \\mathcal C$.\nTo get $\\{a_1\\} \\cap A \\neq \\emptyset$ for all $A \\in \\mathcal C$.\nWe must have $a_1 \\in \\mathcal A$.\nThe total number of subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain $a_1$ is $2^4 = 16$.\nBecause $\\mathcal C$ contains 16 subsets.\nWe must have $\\mathcal C = \\left\\{ \\{a_1\\} \\cup A\u00a0: \\forall \\ A \\subseteq \\left\\{ 1, 2, 3, 4, 5 \\right\\} \\backslash \\left\\{a_1 \\right\\} \\right\\}$.\nTherefore, for any $X, Y \\in \\mathcal C$, we must have $X \\cap Y \\supseteq \\{a_1\\}$.\nSo this is feasible.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $a_1$.\nTherefore, the number of solutions is 5.\nCase 3: $N = 2$.\nCase 3.1: There is exactly one subset in $\\mathcal C$ that contains 2 elements.\nDenote this subset as $\\left\\{ a_1, a_2 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$.\nTherefore, the number of solutions is $\\binom{5}{2} = 10$.\nCase 3.2: There are exactly two subsets in $\\mathcal C$ that contain 2 elements.\nThey must take the form $\\left\\{ a_1, a_2 \\right\\}$ and $\\left\\{ a_1, a_3 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$ and $\\left\\{ a_2, a_4, a_5 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$ and $\\left\\{ a_1, a_3 \\right\\}$.\nTherefore, the number of solutions is $5 \\cdot \\binom{4}{2} = 30$.\nCase 3.3: There are exactly three subsets in $\\mathcal C$ that contain 2 elements.\nThey take the form $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_1, a_4 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_3, a_5 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_1, a_4 \\right\\}$.\nTherefore, the number of solutions is $5 \\cdot \\binom{4}{3} = 20$.\nCase 3.4: There are exactly three subsets in $\\mathcal C$ that contain 2 elements.\nThey take the form $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_2, a_3 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_4, a_5 \\right\\}$, $\\left\\{ a_1, a_4, a_5 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_2, a_3 \\right\\}$.\nTherefore, the number of solutions is $\\binom{5}{3} = 10$.\nCase 3.5: There are exactly four subsets in $\\mathcal C$ that contain 2 elements.\nThey take the form $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_1, a_4 \\right\\}$, $\\left\\{ a_1, a_5 \\right\\}$.\nWe then put all subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements into $\\mathcal C$, except $\\left\\{ a_3, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_4, a_5 \\right\\}$, $\\left\\{ a_1, a_4, a_5 \\right\\}$, $\\left\\{ a_2, a_3, a_4 \\right\\}$.\nThis satisfies $X \\cap Y \\neq \\emptyset$ for any $X, Y \\in \\mathcal C$.\nNow, we count the number of $\\mathcal C$ in this case.\nWe only need to determine $\\left\\{ a_1, a_2 \\right\\}$, $\\left\\{ a_1, a_3 \\right\\}$, $\\left\\{ a_1, a_4 \\right\\}$, $\\left\\{ a_1, a_5 \\right\\}$.\nTherefore, the number of solutions is 5.\nPutting all subcases together, the number of solutions is this case is $10 + 30 + 20 + 10 + 5 = 75$.\nCase 4: $N \\geq 3$.\nThe number of subsets of $\\left\\{ 1, 2, 3, 4, 5 \\right\\}$ that contain at least three elements is $\\sum_{i=3}^5 \\binom{5}{i} = 16$.\nBecause $\\mathcal C$ has 16 elements, we must select all such subsets into $\\mathcal C$.\nTherefore, the number of solutions in this case is 1.\nPutting all cases together, the total number of $\\mathcal C$ is $5 + 75 + 1 = \\boxed{\\textbf{(081) }}$.\nDenote the $A$ as $\\{ 1,2,3,4,5 \\}$ and the collection of subsets as $S$. \n\nCase 1: There are only sets of size $3$ or higher in $S$: \nAny two sets in $S$ must have at least one element common to both of them (since $3+3>5$). Since there are $16$ subsets of $A$ that have size $3$ or higher, there is only one possibility for this case.\n\nCase 2: There are only sets of size $2$ or higher in $S$: \nFirstly, there cannot be a no size $2$ set $S$, or it will be overcounting the first case.\nIf there is only one such size $2$ set, there are $10$ ways to choose it. That size $2$ set, say $X$, cannot be in $S$ with $Y = A\/X$ (a three element set). Thus, there are only $15$ possible size $3$ subsets that can be in $S$, giving us $10$ for this case.\nIf there are two sets with size $2$ in $S$, we can choose the common elements of these two subsets in $5$ ways, giving us a total of $5\\cdot 6 = 30$.\nIf there are three sets with size $2$, they can either share one common element, which can be done in $5 \\cdot 4 = 20$ ways, or they can share pairwise common elements (sort of like a cycle), which can be done $\\binom{5}{2} = 10$ ways. In total, we have $30$ possibilities.\nIf there are four sets with size $2$, they all have to share one common element, which can be done in $5\\cdot 1$ ways.\nThus, summing everything up, this will give us $75$ possible sets $S$\n\nCase 3: There is a set with size $1$ in $S$: \nNotice that be at most one size $1$ subset. There are $5$ ways to choose that single element set. Say it's $\\{ 1\\}$. All other subsets in $S$ must have a $1$ in them, but there are only $2^4-1 = 15$ of them. Thus this case yields $5\\cdot 1 = 5$ possibilities.\n\nThus, the total number of sets $S$ would be $1+75+5 = \\boxed{\\textbf{(081)}}$.\n~sml1809\nFirstly, there cannot be two subsets with cardinality 1, or they will not intersect.\nIf there is one subset $A$ with cardinality $1$; let the element in $A$ be $a$, then there are $2^4=16$ subsets that do not include $a$ so they do not work. Every remaining subsets $S$ will have $a$ as an element so $S\\cap{A}\\geq1$, since we just excluded all that do not. Since there are 15 subsets left, all are forced into the group of 16 subsets, so we just choose the number of $a$ to determine the set $A$. $A\\in\\{1,2,3,4,5\\}$ so there are 5 ways.\nFor the rest of the cases, we assume there are no sets $A$ with cardinality 1. Notice that the only way to \"violate\" the condition is to have subsets $X$ and $Y$ with cardinalities 2 and 3 in some order. Otherwise, by the Pigeonhole Principle, if two sets both have cardinalities more than 3, they are bound to have one element of intersection. Say a set $S$ has $|S|=2$, then there is clearly only one set $s$ that will make $S\\cap{s}=0$. By our previous claim, all other subsets that have cardinality $c\\geq{3}$ will work.\nNow if we generalize a bit: If a subset has $N$ 2-element subsets which belong to set $M$, then there are exactly $N$ subsets with cardinality 3 that don't work. Therefore, the number of \"violating subsets\" are all subsets with cardinality $c\\leq{1}$, all 2-element subsets that are not in $M$, and all corresponding cardinality 3 subsets. Subtracting from the total 32 subsets, we get that $32-(1+5+(10-N)+N)=16$ subsets that do work. This includes all subsets in $M$, so the remaining non-violating subsets are forced. This is equivalent now to choosing $N$ 2 element subsets.\nFollowing casework on the number of 2-element subsets:\nIf $N=1$: There are $\\binom{5}{2}=10$ ways.\nIf $N=2$: There are $5$ ways to choose the intersection between the 2 sets (remember they have to have at least one element of intersection) and $\\binom{4}{2}=6$ ways to choose the distinct elements in the subsets, so there are $5*6=30$ ways.\nIf $N=3$: It can be a cycle, where WLOG let the elements be $a,b,c$ so the sets are $\\{a,b\\}$, $\\{b,c\\}$, and $\\{c,a\\}$. This is just $\\binom{5}{3}=10$. Alternatively, it can also be the case where all sets share one element. There are 5 ways to choose this element and $\\binom{4}{2}=6$ ways to choose the remaining elements to assign to each set. There are $30$ ways.\nIf $N=4$: By the Pigeonhole Principle, the only way all pairwise sets have at one common intersection is if all share one element in common. There are 5 ways to choose this element and the remaining numbers are forced. There are 5 ways.\n$N\\geq{5}$ does not provide any valid cases since to have all pairwise elements to intersect one element, they must be the same element by the Pigeonhole Principle, but there are not enough subsets.\nIf $N=0$, then there is only one way since $\\binom{5}{3}+\\binom{5}{4}+\\binom{5}{5}=16$.\nAdding all cases yields $5+10+30+30+5+1=\\boxed{81}$ ways!\n-Magnetoninja","answer":"081","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_11"} +{"id":48,"problem":"In $\\triangle ABC$ with side lengths $AB = 13$, $BC = 14$, and $CA = 15$, let $M$ be the midpoint of $\\overline{BC}.$ Let $P$ be the point on the circumcircle of $\\triangle ABC$ such that $M$ is on $\\overline{AP}.$ There exists a unique point $Q$ on segment $\\overline{AM}$ such that $\\angle PBQ = \\angle PCQ.$ Then $AQ$ can be written as $\\frac{m}{\\sqrt{n}},$ where $m$ and $n$ are relatively prime positive integers. Find $m+n$.","solution":"Because $M$ is the midpoint of $BC$, following from the Stewart's theorem, $AM = 2 \\sqrt{37}$.\nBecause $A$, $B$, $C$, and $P$ are concyclic, $\\angle BPA = \\angle C$, $\\angle CPA = \\angle B$.\nDenote $\\theta = \\angle PBQ$.\nIn $\\triangle BPQ$, following from the law of sines,\n\\[ \\frac{BQ}{\\sin \\angle BPA} = \\frac{PQ}{\\angle PBQ} \\]\nThus,\n\\[ \\frac{BQ}{\\sin C} = \\frac{PQ}{\\sin \\theta} . \\hspace{1cm} (1) \\]\nIn $\\triangle CPQ$, following from the law of sines,\n\\[ \\frac{CQ}{\\sin \\angle CPA} = \\frac{PQ}{\\angle PCQ} \\]\nThus,\n\\[ \\frac{CQ}{\\sin B} = \\frac{PQ}{\\sin \\theta} . \\hspace{1cm} (2) \\]\nTaking $\\frac{(1)}{(2)}$, we get\n\\[ \\frac{BQ}{\\sin C} = \\frac{CQ}{\\sin B} \\]\nIn $\\triangle ABC$, following from the law of sines,\n\\[ \\frac{AB}{\\sin C} = \\frac{AC}{\\sin B} . \\hspace{1cm} (3) \\]\nThus, Equations (2) and (3) imply\n\\begin{align*} \\frac{BQ}{CQ} & = \\frac{AB}{AC} \\\\ & = \\frac{13}{15} . \\hspace{1cm} (4) \\end{align*}\n\nNext, we compute $BQ$ and $CQ$.\nWe have\n\\begin{align*} BQ^2 & = AB^2 + AQ^2 - 2 AB\\cdot AQ \\cos \\angle BAQ \\\\ & = AB^2 + AQ^2 - 2 AB\\cdot AQ \\cos \\angle BAM \\\\ & = AB^2 + AQ^2 - 2 AB\\cdot AQ \\cdot \\frac{AB^2 + AM^2 - BM^2}{2 AB \\cdot AM} \\\\ & = AB^2 + AQ^2 - AQ \\cdot \\frac{AB^2 + AM^2 - BM^2}{AM} \\\\ & = 169 + AQ^2 - \\frac{268}{2 \\sqrt{37}} AQ . \\hspace{1cm} (5) \\end{align*}\nWe have\n\\begin{align*} CQ^2 & = AC^2 + AQ^2 - 2 AC\\cdot AQ \\cos \\angle CAQ \\\\ & = AC^2 + AQ^2 - 2 AC\\cdot AQ \\cos \\angle CAM \\\\ & = AC^2 + AQ^2 - 2 AC\\cdot AQ \\cdot \\frac{AC^2 + AM^2 - CM^2}{2 AC \\cdot AM} \\\\ & = AC^2 + AQ^2 - AQ \\cdot \\frac{AC^2 + AM^2 - CM^2}{AM} \\\\ & = 225 + AQ^2 - \\frac{324}{2 \\sqrt{37}} AQ . \\hspace{1cm} (6) \\end{align*}\nTaking (5) and (6) into (4), we get $AQ = \\frac{99}{\\sqrt{148}}$\nTherefore, the answer is $99 + 148 = \\boxed{\\textbf{(247) }}$\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\nDefine $L_1$ to be the foot of the altitude from $A$ to $BC$. Furthermore, define $L_2$ to be the foot of the altitude from $Q$ to $BC$. From here, one can find $AL_1=12$, either using the 13-14-15 triangle or by calculating the area of $ABC$ two ways. Then, we find $BL_1=5$ and $L_1C = 9$ using Pythagorean theorem. Let $QL_2=x$. By AA similarity, $\\triangle{AL_1M}$ and $\\triangle{QL_2M}$ are similar. By similarity ratios, \\[\\frac{AL_1}{L_1M}=\\frac{QL_2}{L_2M}\\]\n\\[\\frac{12}{2}=\\frac{x}{L_2M}\\]\n\\[L_2M = \\frac{x}{6}\\]\nThus, $BL_2=BM-L_2M=7-\\frac{x}{6}$. Similarly, $CL_2=7+\\frac{x}{6}$. Now, we angle chase from our requirement to obtain new information.\n\\[\\angle{PBQ}=\\angle{PCQ}\\]\n\\[\\angle{QCM}+\\angle{PCM}=\\angle{QBM}+\\angle{PBM}\\]\n\\[\\angle{QCL_2}+\\angle{PCM}=\\angle{QBL_2}+\\angle{PBM}\\]\n\\[\\angle{PCM}-\\angle{PBM}=\\angle{QBL_2}-\\angle{QCL_2}\\]\n\\[\\angle{MAB}-\\angle{MAC}=\\angle{QBL_2}-\\angle{QCL_2}\\text{(By inscribed angle theorem)}\\]\n\\[(\\angle{MAL_1}+\\angle{L_1AB})-(\\angle{CAL_1}-\\angle{MAL_1})=\\angle{QBL_2}-\\angle{QCL_2}\\]\n\\[2\\angle{MAL_1}+\\angle{L_1AB}-\\angle{CAL_1}=\\angle{QBL_2}-\\angle{QCL_2}\\]\nTake the tangent of both sides to obtain \n\\[\\tan(2\\angle{MAL_1}+\\angle{L_1AB}-\\angle{CAL_1})=\\tan(\\angle{QBL_2}-\\angle{QCL_2})\\]\nBy the definition of the tangent function on right triangles, we have $\\tan{MAL_1}=\\frac{7-5}{12}=\\frac{1}{6}$, $\\tan{CAL_1}=\\frac{9}{12}=\\frac{3}{4}$, and $\\tan{L_1AB}=\\frac{5}{12}$. By abusing the tangent angle addition formula, we can find that \n\\[\\tan(2\\angle{MAL_1}+\\angle{L_1AB}-\\angle{CAL_1})=\\frac{196}{2397}\\]\nBy substituting $\\tan{\\angle{QBL_2}}=\\frac{6x}{42-x}$, $\\tan{\\angle{QCL_2}}=\\frac{6x}{42+x}$ and using tangent angle subtraction formula we find that \n\\[x=\\frac{147}{37}\\]\nFinally, using similarity formulas, we can find \n\\[\\frac{AQ}{AM}=\\frac{12-x}{x}\\]. Plugging in $x=\\frac{147}{37}$ and $AM=\\sqrt{148}$, we find that \\[AQ=\\frac{99}{\\sqrt{148}}\\] Thus, our final answer is $99+148=\\boxed{247}$. \n~sigma\nIt is clear that $BQCP$ is a parallelogram. By Stewart's Theorem, $AM=\\sqrt{148}$, POP on $M$ tells $PM=\\frac{49}{\\sqrt{148}}$\nAs $QM=PM, AQ=AM-PM=\\frac{99}{\\sqrt{148}}$ leads to $\\boxed{247}$\n~bluesoul (supplemental note: ~Mathavi)\n$\\textbf{NOTE: Why BQCP is a parallelogram}$\nIt's not actually immediately clear why this is the case. There are two ways to easily show this:\n$\\textbf{Competition solution:}$\nNotice that the problem statement tells us that point Q is $\\textit{unique.}$ EVERY piece of information in the problem statement is intentional, so we should try to use this to our benefit. None of the other solutions do, which is why they are more complicated than they need be.\nConsider point Q' s.t. $Q'M = MP$. Obviously, $\\angle Q'CP$ and $\\angle Q'BP$ are equal - we have perfect symmetry along line $AP$. Moreover, $BQ'CP$ is a parallelogram as its diagonals bisect each other. Since point $Q$ is unique, we know that $Q' \\textit{is } Q$. Thus $BQCP$ is a parallelogram. $\\blacksquare$\n$\\newline$\n$\\textbf{Rigorous proof (not recommended for competition scenario):}$\nConsider any quadrilateral $ABCD$ whose diagonals intersect at $O$ s.t. $AO = OC$ and $\\angle BAD = \\angle BCD$. We will prove that $ABCD$ is $\\textit{either a \\textbf{parallelogram} or a \\textbf{kite}}$. \n(Note that in our problem, since $AP$ and $BC$ are not orthogonal, ($ABC$ isn't isosceles) this is enough to show that $BQCP$ is a parallelogram).\n$\\newline$\n-- By same base\/same altitude, $[ABO] = [CBO]$ and $[ADO] = [CDO] \\implies [ABD] = [ABO] + [ADO] = [CBO] + [CDO] = [CBD]. \\newline$\nTherefore: $\\frac{1}{2} sin(\\angle BAD) \\overline{AB} \\times \\overline{AD} = \\frac{1}{2} sin(\\angle BCD) \\overline{CB} \\times \\overline{CD}.$ Since $\\angle BAD = \\angle BCD$, this reduces to $\\overline{AB} \\times \\overline{AD} = \\overline{CB} \\times \\overline{CD}. (E.1) \\newline$\nLet $AB = x$ and $AD = y$. Then, by $(E.1)$, $CB = kx$ and $CD = \\frac{y}{k}$ for some real $k$. Then by LoC on $\\triangle BAD$ and $\\triangle BCD$:\n$x^{2} + y^{2} - 2xy cos(\\angle BAD) = \\overline{BD} = x^{2}k^{2} + \\frac{y^{2}}{k^{2}} - 2xy cos(\\angle BCD) \\newline \\implies x^{2} + y^{2} = x^{2}k^{2} + \\frac{y^{2}}{k^{2}} \\newline \\implies (y^{2} - x^{2}k^{2})(k^{2} - 1) = 0.\\newline$\n-- $y^{2} - x^{2}k^{2} = 0 \\implies y = kx \\implies AD = BC$ and $AB = CD \\implies$ $ABCD$ is a parallelogram.\n-- $k^{2} - 1 = 0 \\implies k = 1$ ($k$ cannot be $-1$; no negative sided polygons here!) $\\implies AB = CB$ and $AD = CD \\implies$ $ABCD$ is a kite. $\\square$. ~Mathavi\nFirst, note that by Law of Sines, $\\frac{\\sin(\\angle{QBP})}{QP}=\\frac{\\sin(\\angle{BPQ})}{BQ}$ and that $\\frac{\\sin(\\angle{QCP})}{QP}=\\frac{\\sin(\\angle{QPC})}{QP}$. Equating the 2 expressions, you get that $\\frac{\\sin(\\angle{BPQ})}{BQ}=\\frac{\\sin(\\angle{QPC})}{QP}$. Now drop the altitude from $A$ to $BC$. As it is commonly known that the dropped altitude forms a $5-12-13$ and a $9-12-15$ triangle, you get the measures of $\\angle{ABC}$ and $\\angle{ACB}$ respectively, which are $\\arcsin(\\frac{12}{13})$ and $\\arcsin(\\frac{4}{5})$. However, by the inscribed angle theorem, you get that $\\angle{BPQ}=\\arcsin(\\frac{4}{5})$ and that $\\angle{QPC}=\\arcsin(\\frac{12}{13})$, respectively. Therefore, by Law of Sines (as previously stated) $\\frac{BQ}{CQ}=\\frac{13}{15}$.\nNow commence coordbashing. Let $B$ be the origin, and $A$ be the point $(5,12)$. As $AP$ passes through $A$, which is $(5,12)$, and $M$, which is $(7,0)$, it has the equation $-6x+42$, so therefore a point on this line can be written as $(x,42-6x)$. As we have the ratio of the lengths, which prompts us to write the lengths in terms of the distance formula, we can just plug and chug it in to get the ratio $\\frac{\\sqrt{37x^2-504x+1764}}{\\sqrt{37x^2-532x+1960}}=\\frac{13}{15}$. This can be squared to get $\\frac{37x^2-504x+1764}{37x^2-532x+1960}=\\frac{169}{225}$. This can be solved to get a solution of $x=\\frac{469}{74}$, and an extraneous solution of $5$ which obviously doesn\u2019t work. \nPlugging $x$ into the line equation gets you $y=\\frac{147}{37}$. The distance between this point and $A$, which is $(5,12)$ is $\\sqrt{\\frac{9801}{148}}$, or simplified to $\\frac{99}{\\sqrt{148}}\\Longrightarrow99+148=\\boxed{247}$\n~dragoon (minor $\\LaTeX$ fixes by rhydon516)\n[2023 AIME II 12.png](https:\/\/artofproblemsolving.com\/wiki\/index.php\/File:2023_AIME_II_12.png)\nWe use the law of Cosine and get \\[AB^2 = AM^2 + BM^2 - 2 AM \\cdot BM \\cos \\angle AMB,\\] \\[AC^2 = AM^2 + CM^2 + 2 AM \\cdot CM \\cos \\angle AMB \\implies\\] \\[AM^2 = \\frac {AB^2 + AC^2}{2}- BM^2 = \\sqrt{148} \\approx 12.\\]\nWe use the power of point $M$ with respect circumcircle $\\triangle ABC$ and get \n\\[AM \\cdot MP = BM \\cdot CM = BM^2 \\implies\\]\n\\[PM = \\frac {49}{\\sqrt {148}} \\approx \\frac {48}{12} \\approx 4 < AM.\\]\nIt is clear that if $Q = P,$ then $\\angle PBQ = \\angle PCQ = 0 \\implies$\nif $Q$ is symmetric to $P$ with respect $M$ then $\\angle PBQ = \\angle PCQ$.\nThere exists a unique point $Q$ on segment $\\overline{AM}, PM < AM \\implies$\n\\[PQ = AM - PM = \\frac{99}{\\sqrt{148}} \\implies \\boxed{247}.\\]\nvladimir.shelomovskii@gmail.com, vvsss","answer":"247","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_12"} +{"id":49,"problem":"Let $A$ be an acute angle such that $\\tan A = 2 \\cos A.$ Find the number of positive integers $n$ less than or equal to $1000$ such that $\\sec^n A + \\tan^n A$ is a positive integer whose units digit is $9$.","solution":"Denote $a_n = \\sec^n A + \\tan^n A$.\nFor any $k$, we have\n\\begin{align*} a_n & = \\sec^n A + \\tan^n A \\\\ & = \\left( \\sec^{n-k} A + \\tan^{n-k} A \\right) \\left( \\sec^k A + \\tan^k A \\right) - \\sec^{n-k} A \\tan^k A - \\tan^{n-k} A \\sec^k A \\\\ & = a_{n-k} a_k - 2^k \\sec^{n-k} A \\cos^k A - 2^k \\tan^{n-k} A \\cot^k A \\\\ & = a_{n-k} a_k - 2^k a_{n-2k} . \\end{align*}\nNext, we compute the first several terms of $a_n$.\nBy solving equation $\\tan A = 2 \\cos A$, we get $\\cos A = \\frac{\\sqrt{2 \\sqrt{17} - 2}}{4}$.\nThus, $a_0 = 2$, $a_1 = \\sqrt{\\sqrt{17} + 4}$, $a_2 = \\sqrt{17}$, $a_3 = \\sqrt{\\sqrt{17} + 4} \\left( \\sqrt{17} - 2 \\right)$, $a_4 = 9$.\nIn the rest of analysis, we set $k = 4$.\nThus,\n\\begin{align*} a_n & = a_{n-4} a_4 - 2^4 a_{n-8} \\\\ & = 9 a_{n-4} - 16 a_{n-8} . \\end{align*}\nThus, to get $a_n$ an integer, we have $4 | n$.\nIn the rest of analysis, we only consider such $n$. Denote $n = 4 m$ and $b_m = a_{4n}$.\nThus,\n\\begin{align*} b_m & = 9 b_{m-1} - 16 b_{m-2} \\end{align*}\nwith initial conditions $b_0 = 2$, $b_1 = 9$.\nTo get the units digit of $b_m$ to be 9, we have\n\\begin{align*} b_m \\equiv -1 & \\pmod{2} \\\\ b_m \\equiv -1 & \\pmod{5} \\end{align*}\nModulo 2, for $m \\geq 2$, we have\n\\begin{align*} b_m & \\equiv 9 b_{m-1} - 16 b_{m-2} \\\\ & \\equiv b_{m-1} . \\end{align*}\nBecause $b_1 \\equiv -1 \\pmod{2}$, we always have $b_m \\equiv -1 \\pmod{2}$ for all $m \\geq 2$.\nModulo 5, for $m \\geq 5$, we have\n\\begin{align*} b_m & \\equiv 9 b_{m-1} - 16 b_{m-2} \\\\ & \\equiv - b_{m-1} - b_{m-2} . \\end{align*}\nWe have $b_0 \\equiv 2 \\pmod{5}$, $b_1 \\equiv -1 \\pmod{5}$,\n$b_2 \\equiv -1 \\pmod{5}$, $b_3 \\equiv 2 \\pmod{5}$, $b_4 \\equiv -1 \\pmod{5}$, $b_5 \\equiv -1 \\pmod{5}$, $b_6 \\equiv 2 \\pmod{5}$.\nTherefore, the congruent values modulo 5 is cyclic with period 3.\nTo get $b_m \\equiv -1 \\pmod{5}$, we have $3 \\nmid m \\pmod{3}$.\nFrom the above analysis with modulus 2 and modulus 5, we require $3 \\nmid m \\pmod{3}$.\nFor $n \\leq 1000$, because $n = 4m$, we only need to count feasible $m$ with $m \\leq 250$.\nThe number of feasible $m$ is\n\\begin{align*} 250 - \\left\\lfloor \\frac{250}{3} \\right\\rfloor & = 250 - 83 \\\\ & = \\boxed{\\textbf{(167) }} . \\end{align*}\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\n\\[\\tan A = 2 \\cos A \\implies \\sin A = 2 \\cos^2 A \\implies \\sin^2 A + \\cos^2 A = 4 \\cos^4 A + \\cos^2 A = 1\\]\n\\[\\implies \\cos^2 A = \\frac {\\sqrt {17} - 1}{8}.\\]\n\\[c_n = \\sec^n A + \\tan^n A = \\frac {1}{\\cos^n A} + 2^n \\cos^n A = (4\\cos^2 A +1)^{\\frac {n}{2}}+(4 \\cos^2 A)^{\\frac {n}{2}} =\\]\n\\[= \\left(\\frac {\\sqrt {17} + 1}{2}\\right)^{\\frac {n}{2}}+ \\left(\\frac {\\sqrt {17} - 1}{2}\\right)^{\\frac {n}{2}}.\\]\nIt is clear, that $c_n$ is not integer if $n \\ne 4k, k > 0$.\nDenote $x = \\frac {\\sqrt {17} + 1}{2}, y = \\frac {\\sqrt {17} - 1}{2} \\implies$\n\\[x \\cdot y = 4, x + y = \\sqrt{17}, x - y = 1 \\implies x^2 + y^2 = (x - y)^2 + 2xy = 9 = c_4.\\]\n\\[c_8 = x^4 + y^4 = (x^2 + y^2)^2 - 2x^2 y^2 = 9^2 - 2 \\cdot 16 = 49.\\]\n\\[c_{4k+4} = x^{4k+4} + y^{4k+4} = (x^{4k} + y^{4k})(x^2+y^2)- (x^2 y^2)(x^{4k-2}+y^{4k-2}) = 9 c_{4k}- 16 c_{4k \u2013 4} \\implies\\]\n\\[c_{12} = 9 c_8 - 16 c_4 = 9 \\cdot 49 - 16 \\cdot 9 = 9 \\cdot 33 = 297.\\]\n\\[c_{16} = 9 c_{12} - 16 c_8 = 9 \\cdot 297 - 16 \\cdot 49 = 1889.\\]\n\\[c_{12m + 4} \\pmod{10} = 9 \\cdot c_{12m} \\pmod{10} - 16 \\pmod{10} \\cdot c_{12m - 4} \\pmod{10} =\\]\n\\[= (9 \\cdot 7 - 6 \\cdot 9) \\pmod{10} = (3 - 4) \\pmod{10} = 9.\\]\n\\[c_{12m + 8}\\pmod{10} = 9 \\cdot c_{12m+4} \\pmod{10} - 16 \\pmod{10} \\cdot c_{12m } \\pmod{10} =\\]\n\\[= (9 \\cdot 9 - 6 \\cdot 7) \\pmod{10} = (1 - 2)\\pmod{10} = 9.\\]\n\\[c_{12m + 12} \\pmod{10} = 9 \\cdot c_{12m + 8} \\pmod{10} - 16 \\pmod{10} \\cdot c_{12m + 4} \\pmod{10} =\\]\n\\[= (9 \\cdot 9 - 6 \\cdot 9) \\pmod{10} = (1 - 4) \\pmod{10} = 7 \\implies\\]\nThe condition is satisfied iff $n = 12 k + 4$ or $n = 12k + 8$.\nIf $n \\le N$ then the number of possible n is $\\left\\lfloor \\frac{N}{4} \\right\\rfloor - \\left\\lfloor \\frac{N}{12} \\right\\rfloor$.\nFor $N = 1000$ we get $\\left\\lfloor \\frac{1000}{4} \\right\\rfloor - \\left\\lfloor \\frac{1000}{12} \\right\\rfloor = 250 - 83 = \\boxed{167}$.\nvladimir.shelomovskii@gmail.com, vvsss","answer":"167","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_13"} {"id":50,"problem":"A cube-shaped container has vertices $A$, $B$, $C$, and $D$, where $\\overline{AB}$ and $\\overline{CD}$ are parallel edges of the cube, and $\\overline{AC}$ and $\\overline{BD}$ are diagonals of faces of the cube, as shown. Vertex $A$ of the cube is set on a horizontal plane $\\mathcal{P}$ so that the plane of the rectangle $ABDC$ is perpendicular to $\\mathcal{P},$ vertex $B$ is $2$ meters above $\\mathcal{P},$ vertex $C$ is $8$ meters above $\\mathcal{P},$ and vertex $D$ is $10$ meters above $\\mathcal{P}.$ The cube contains water whose surface is parallel to $\\mathcal{P}$ at a height of $7$ meters above $\\mathcal{P}.$ The volume of water is $\\frac{m}{n}$ cubic meters, where $m$ and $n$ are relatively prime positive integers. Find $m+n$.\n[asy] size(250); defaultpen(linewidth(0.6)); pair A = origin, B = (6,3), X = rotate(40)*B, Y = rotate(70)*X, C = X+Y, Z = X+B, D = B+C, W = B+Y; pair P1 = 0.8*C+0.2*Y, P2 = 2/3*C+1/3*X, P3 = 0.2*D+0.8*Z, P4 = 0.63*D+0.37*W; pair E = (-20,6), F = (-6,-5), G = (18,-2), H = (9,8); filldraw(E--F--G--H--cycle,rgb(0.98,0.98,0.2)); fill(A--Y--P1--P4--P3--Z--B--cycle,rgb(0.35,0.7,0.9)); draw(A--B--Z--X--A--Y--C--X^^C--D--Z); draw(P1--P2--P3--P4--cycle^^D--P4); dot(\"$A$\",A,S); dot(\"$B$\",B,S); dot(\"$C$\",C,N); dot(\"$D$\",D,N); label(\"$\\mathcal P$\",(-13,4.5)); [\/asy]","solution":"Let's first view the cube from a direction perpendicular to $ABDC$, as illustrated above. Let $x$ be the cube's side length. Since $\\triangle CHA \\sim \\triangle AGB$, we have\n\\[\\frac{CA}{CH} = \\frac{AB}{AG}.\\]\nWe know $AB = x$, $AG = \\sqrt{x^2-2^2}$, $AC = \\sqrt{2}x$, $CH = 8$. Plug them into the above equation, we get\n\\[\\frac{\\sqrt{2}x}{8} = \\frac{x}{\\sqrt{x^2-2^2}}.\\]\nSolving this we get the cube's side length $x = 6$, and $AC = 6\\sqrt{2}$.\nLet $PQ$ be the water's surface, both $P$ and $Q$ are $7$ meters from $\\mathcal P$. Notice that $C$ is $8$ meters from $\\mathcal P$, this means\n\\[CP = \\frac{1}{8}CA = \\frac{3\\sqrt{2}}{4}.\\]\nSimilarly,\n\\[DQ = \\frac{3}{8}CA = \\frac{9\\sqrt{2}}{4}.\\]\n\nNow, we realize that the 3D space inside the cube without water is a frustum, with $P$ on its smaller base and $Q$ on its larger base. To find its volume, all we need is to find the areas of both bases and the height, which is $x = 6$. To find the smaller base, let's move our viewpoint onto the plane $ABDC$ and view the cube from a direction parallel to $ABDC$, as shown above. The area of the smaller base is simply\n\\[S_1 = CP^2 = \\Bigl(\\frac{3\\sqrt{2}}{4}\\Bigr)^2 = \\frac{9}{8}.\\]\nSimilarly, the area of the larger base is\n\\[S_2 = DQ^2 = \\Bigl(\\frac{9\\sqrt{2}}{4}\\Bigr)^2 = \\frac{81}{8}.\\]\nFinally, applying the formula for a frustum's volume,\n\\[V = \\frac{1}{3} \\cdot x \\cdot (S_1 + \\sqrt{S_1S_2} + S_2) = \\frac{1}{3} \\cdot 6 \\cdot \\Bigl(\\frac{9}{8} + \\sqrt{\\frac{9}{8}\\cdot\\frac{81}{8}} + \\frac{81}{8}\\Bigl) = \\frac{117}{4}.\\]\nThe water's volume is thus\n\\[6^3 - \\frac{117}{4} = \\frac{747}{4},\\]\ngiving $\\boxed{751}$.\n[2023 AIME II 14.png](https:\/\/artofproblemsolving.com\/wiki\/index.php\/File:2023_AIME_II_14.png)\nDenote $h(X)$ the distance from point $X$ to $\\mathcal{P}, h(A) = 0, h(B) = 2,$\n$h(C) = 8, h(D) = 10, h(G) = h(I) = h(H) = 7, AB = a, AC = a \\sqrt{2}$.\nLet slope $AB$ to $\\mathcal{P}$ be $\\alpha.$ Notation is shown in the diagram.\n\\[\\tan \\alpha = \\frac {\\sin \\alpha}{\\cos \\alpha} = \\frac {h(B)}{AB}\\cdot \\frac {AC}{h(C)} = \\frac {\\sqrt{2}}{4} \\implies a = 6.\\]\nLet $S = GI \\cap CD \\implies h(S) = h(G) = 7$.\n\\[h(C) \u2013 h(G) = 8 - 7 = 1, h(D)- h(I) = 10 - 7 = 3.\\]\n\\[h(E) = h(F) = \\frac {h(D) +h(B)}{2} = 6 \\implies\\]\n\\[\\frac {DI}{DE} = \\frac {h(D) - h(I)}{h(D)-h(E)} = \\frac {3}{4} \\implies DI = DH = \\frac {9}{2}.\\]\nSimilarly $CG = \\frac {3}{2} \\implies SD = 9$.\nLet the volume without water be $V,$ volume of the pyramid $SCGJ$ be $U$.\nIt is clear that $U + V = 27U = \\frac {SD}{6} \\cdot DI^2 = \\frac {243}{8} \\implies$\n$V = \\frac {243 \\cdot 26}{8 \\cdot 27 } = \\frac {117}{4} = 6^3 - \\frac {747}{4}$ from which $\\boxed{751}$.\nvladimir.shelomovskii@gmail.com, vvsss\nWe introduce a Cartesian coordinate system to the diagram.\nWe put the origin at $A$. We let the $z$-components of $B$, $C$, $D$ be positive.\nWe set the $x$-axis in a direction such that $B$ is on the $x-O-z$ plane.\nThe coordinates of $A$, $B$, $C$ are $A = \\left( 0, 0, 0 \\right)$, $B = \\left( x_B, 0 , 2 \\right)$, $C = \\left( x_C, y_C, 8 \\right)$.\nBecause $AB \\perp AC$, $\\overrightarrow{AB} \\cdot \\overrightarrow{AC} = 0$.\nThus,\n\\[ x_B x_C + 16 = 0 . \\hspace{1cm} (1) \\]\nBecause $AC$ is a diagonal of a face, $AC^2 = 2 AB^2$.\nThus,\n\\[ x_C^2 + y_C^2 + 8^2 = 2 \\left( x_B^2 + 2^2 \\right) . \\hspace{1cm} (2) \\]\nBecause plane $ABCD$ is perpendicular to plan $P$, $\\hat z \\cdot \\left( \\overrightarrow{AB} \\times \\overrightarrow{AC} \\right) = 0$.\nThus,\n\\[ \\begin{vmatrix} 0 & 0 & 1 \\\\ x_B & 0 & 2 \\\\ x_C & y_C & 8 \\end{vmatrix} = 0 . \\hspace{1cm} (3) \\]\nJointly solving (1), (2), (3), we get one solution $x_B = 4 \\sqrt{2}$, $x_C = - 2 \\sqrt{2}$, $y_C = 0$.\nThus, the side length of the cube is $|AB| = \\sqrt{x_B^2 + 2^2} = 6$.\nDenote by $P$ and $Q$ two vertices such that $AP$ and $AQ$ are two edges, and satisfy the right-hand rule that $\\widehat{AB} \\times \\widehat{AP} = \\widehat{AQ}$.\nNow, we compute the coordinates of $P$ and $Q$.\nBecause $|AB| = 6$, we have $\\overrightarrow{AP} \\times \\overrightarrow{AQ} = 6 \\overrightarrow{AB}$, $\\overrightarrow{AQ} \\times \\overrightarrow{AB} = 6 \\overrightarrow{AP}$, $\\overrightarrow{AB} \\times \\overrightarrow{AP} = 6 \\overrightarrow{AQ}$.\nHence,\n\\begin{align*} \\begin{bmatrix} \\hat i & \\hat j & \\hat k \\\\ x_P & y_P & z_P \\\\ x_Q & y_Q & z_Q \\end{bmatrix} & = 6 \\left( 4 \\sqrt{2} \\hat i + 2 \\hat k \\right) , \\\\ \\begin{vmatrix} \\hat i & \\hat j & \\hat k \\\\ x_Q & y_Q & z_Q \\\\ 4 \\sqrt{2} & 0 & 2 \\end{vmatrix} & = 6 \\left( x_P \\hat i + y_P \\hat j + z_P \\hat k \\right) , \\\\ \\begin{vmatrix} \\hat i & \\hat j & \\hat k \\\\ 4 \\sqrt{2} & 0 & 2 \\\\ x_P & y_P & z_P \\end{vmatrix} & = 6 \\left( x_Q \\hat i + y_Q \\hat j + z_Q \\hat k \\right) . \\end{align*}\nBy solving these equations, we get\n$y_P^2 + y_Q^2 = 36 $.\n\nIn addition, we have $\\overrightarrow{AC} = \\overrightarrow{AP} + \\overrightarrow{AQ}$.\nThus, $P = \\left( - \\sqrt{2} , 3 \\sqrt{2} , 4 \\right)$, $Q = \\left( - \\sqrt{2} , - 3 \\sqrt{2} , 4 \\right)$.\nTherefore, the volume of the water is\n\\begin{align*} V = & 6^3 \\int_{u=0}^1 \\int_{v=0}^1 \\int_{w=0}^1 \\mathbf 1 \\left\\{ z_B u + z_P v + z_Q w \\leq 7 \\right\\} dw dv du \\\\ & = 6^3 \\int_{u=0}^1 \\int_{v=0}^1 \\int_{w=0}^1 \\mathbf 1 \\left\\{ 2 u + 4 v + 4 w \\leq 7 \\right\\} dw dv du \\\\ & = 6^3 - 6^3 \\int_{u=0}^1 \\int_{v=0}^1 \\int_{w=0}^1 \\mathbf 1 \\left\\{ 2 u + 4 v + 4 w > 7 \\right\\} dw dv du . \\end{align*}\nDefine $u' = 1 - u$, $v' = 1 - v$, $w' = 1 - w$.\nThus,\n\\begin{align*} V & = 6^3 - 6^3 \\int_{u=0}^1 \\int_{v=0}^1 \\int_{w=0}^1 \\mathbf 1 \\left\\{ 2 u' + 4 v' + 4 w' < 3 \\right\\} dw dv du \\\\ & = 6^3 - 6^3 \\int_{u'=0}^1 \\left( \\int_{v'=0}^1 \\int_{w'=0}^1 \\mathbf 1 \\left\\{ v' + w' < \\frac{3}{4} - \\frac{u'}{2} \\right\\} dw' dv' \\right) du' \\\\ & = 6^3 - 6^3 \\int_{u'=0}^1 \\frac{1}{2} \\left( \\frac{3}{4} - \\frac{u'}{2} \\right)^2 du' . \\end{align*}\nDefine $u'' = \\frac{3}{4} - \\frac{u'}{2}$.\nThus,\n\\begin{align*} V & = 6^3 - 6^3 \\int_{u'' = 1\/4}^{3\/4} \\left( u'' \\right)^2 du'' \\\\ & = 6^3 - 6^3 \\frac{1}{3} \\left( \\left(\\frac{3}{4}\\right)^3 - \\left(\\frac{1}{4}\\right)^3 \\right) \\\\ & = 216 - \\frac{117}{4} \\\\ & = \\frac{747}{4} . \\end{align*}\nTherefore, the answer is $747 + 4 = \\boxed{\\textbf{(751) }}$.","answer":"751","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_14"} -{"id":51,"problem":"For each positive integer $n$ let $a_n$ be the least positive integer multiple of $23$ such that $a_n \\equiv 1 \\pmod{2^n}.$ Find the number of positive integers $n$ less than or equal to $1000$ that satisfy $a_n = a_{n+1}.$","solution":"Denote $a_n = 23 b_n$.\nThus, for each $n$, we need to find smallest positive integer $k_n$, such that\n\\[ 23 b_n = 2^n k_n + 1 . \\]\nThus, we need to find smallest $k_n$, such that\n\\[ 2^n k_n \\equiv - 1 \\pmod{23} . \\]\nNow, we find the smallest $m$, such that $2^m \\equiv 1 \\pmod{23}$.\nBy Fermat's Theorem, we must have $m | \\phi \\left( 23 \\right)$. That is, $m | 22$.\nWe find $m = 11$.\nTherefore, for each $n$, we need to find smallest $k_n$, such that\n\\[ 2^{{\\rm Rem} \\left( n , 11 \\right)} k_n \\equiv - 1 \\pmod{23} . \\]\nWe have the following results:\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 0\\), then \\(k_n = 22\\) and \\(b_n = 1\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 1\\), then \\(k_n = 11\\) and \\(b_n = 1\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 2\\), then \\(k_n = 17\\) and \\(b_n = 3\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 3\\), then \\(k_n = 20\\) and \\(b_n = 7\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 4\\), then \\(k_n = 10\\) and \\(b_n = 7\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 5\\), then \\(k_n = 5\\) and \\(b_n = 7\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 6\\), then \\(k_n = 14\\) and \\(b_n = 39\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 7\\), then \\(k_n = 7\\) and \\(b_n = 39\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 8\\), then \\(k_n = 15\\) and \\(b_n = 167\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 9\\), then \\(k_n = 19\\) and \\(b_n = 423\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 10\\), then \\(k_n = 21\\) and \\(b_n = 935\\).\nTherefore, in each cycle, $n \\in \\left\\{ 11 l , 11l + 1 , \\cdots , 11l + 10 \\right\\}$, we have $n = 11l$, $11l + 3$, $11l + 4$, $11l + 6$, such that $b_n = b_{n+1}$. That is, $a_n = a_{n+1}$.\nAt the boundary of two consecutive cycles, $b_{11L + 10} \\neq b_{11 \\left(l + 1 \\right)}$.\nWe have $1000 = 90 \\cdot 11 + 10$.\nTherefore, the number of feasible $n$ is $91 \\cdot 4 - 1 = \\boxed{\\textbf{(363) }}$.\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\nObserve that if $a_{n-1} - 1$ is divisible by $2^n$, $a_n = a_{n-1}$. If not, $a_n = a_{n-1} + 23 \\cdot 2^{n-1}$.\nThis encourages us to let $b_n = \\frac{a_n - 1}{2^n}$. Rewriting the above equations, we have\n\\[b_n = \\begin{cases} \\frac{b_{n-1}}{2} & \\text{if } 2 \\text{ } \\vert \\text{ } b_{n-1} \\\\ \\frac{b_{n-1}+23}{2} &\\text{if } 2 \\not\\vert \\text{ } b_{n-1} \\end{cases}\\]\nThe first few values of $b_n$ are $11, 17, 20, 10, 5, 14, 7, 15, 19, 21,$ and $22$. We notice that $b_{12} = b_1 = 11$, and thus the sequence is periodic with period $11$.\nNote that $a_n = a_{n+1}$ if and only if $b_n$ is even. This occurs when $n$ is congruent to $0, 3, 4$ or $6$ mod $11$, giving four solutions for each period.\nFrom $1$ to $1001$ (which is $91 \\times 11$), there are $91 \\times 4 = 364$ values of $n$. We subtract $1$ from the total since $1001$ satisfies the criteria but is greater than $1000$ to get a final answer of $\\fbox{363}$ .\n~[Bxiao31415](https:\/\/artofproblemsolving.com\/wiki\/index.php\/User:Bxiao31415)\n(small changes by bobjoebilly and [IraeVid13](https:\/\/artofproblemsolving.com\/wiki\/index.php\/User:Iraevid13))\nWe first check that $\\gcd(23, 2^n) = 1$ hence we are always seeking a unique modular inverse of $23$, $b_n$, such that $a_n \\equiv 23b_n \\equiv 1 \\mod{2^n}$.\n\nNow that we know that $b_n$ is unique, we proceed to recast this problem in binary. This is convenient because $x \\mod{2^n}$ is simply the last $n$-bits of $x$ in binary, and if $x \\equiv 1 \\mod{2^n}$, it means that of the last $n$ bits of $x$, only the rightmost bit (henceforth $0$th bit) is $1$.\nAlso, multiplication in binary can be thought of as adding shifted copies of the multiplicand. For example:\n\\begin{align} 10111_2 \\times 1011_2 &= 10111_2 \\times (1000_2 + 10_2 + 1_2) \\\\ &= 10111000_2 + 101110_2 + 10111_2 \\\\ &= 11111101_2 \\end{align}\nNow note $23 = 10111_2$, and recall that our objective is to progressively zero out the $n$ leftmost bits of $a_n = 10111_2 \\times b_n$ except for the $0$th bit. \nWrite $b_n = \\underline{c_{n-1}\\cdots c_2c_1c_0}_2$, we note that $c_0$ uniquely defines the $0$th bit of $a_n$, and once we determine $c_0$, $c_1$ uniquely determines the $1$st bit of $a_n$, so on and so forth. \nFor example, $c_0 = 1$ satisfies $a_1 \\equiv10111_2 \\times 1_2 \\equiv 1 \\mod{10_2}$\nNext, we note that the second bit of $a_1$ is $1$, so we must also have $c_1 = 1$ in order to zero it out, giving\n\\[a_2 \\equiv 10111_2 \\times 11_2 \\equiv 101110_2 + a_1 \\equiv 1000101_2 \\equiv 01_2 \\mod{100_2}\\]\n$a_{n+1} = a_{n}$ happens precisely when $c_n = 0$. In fact we can see this in action by working out $a_3$. Note that $a_2$ has 1 on the $2$nd bit, so we must choose $c_2 = 1$. This gives \n\\[a_3 \\equiv 10111_2 \\times 111_2 \\equiv 1011100_2 + a_2 \\equiv 10100001_2 \\equiv 001_2 \\mod{1000_2}\\]\nNote that since the $3$rd and $4$th bit are $0$, $c_3 = c_4 = 0$, and this gives $a_3 = a_4 = a_5$.\n\nIt may seem that this process will take forever, but note that $23 = 10111_2$ has $4$ bits behind the leading digit, and in the worst case, the leading digits of $a_n$ will have a cycle length of at most $16$. In fact, we find that the cycle length is $11$, and in the process found that $a_3 = a_4 = a_5$, $a_6 = a_7$, and $a_{11} = a_{12}$.\nSince we have $90$ complete cycles of length $11$, and the last partial cycle yields $a_{993} = a_{994} = a_{995}$ and $a_{996} = a_{997}$, we have a total of $90 \\times 4 + 3 = \\boxed{363}$ values of $n \\le 1000$ such that $a_n = a_{n+1}$\n~ cocoa @ [https:\/\/www.corgillogical.com](https:\/\/artofproblemsolving.comhttps:\/\/www.corgillogical.com)","answer":"363","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_15"} -{"id":52,"problem":"Recall that a palindrome is a number that reads the same forward and backward. Find the greatest integer less than $1000$ that is a palindrome both when written in base ten and when written in base eight, such as $292 = 444_{\\text{eight}}.$","solution":"Assuming that such palindrome is greater than $777_8 = 511,$ we conclude that the palindrome has four digits when written in base $8.$ Let such palindrome be \\[(\\underline{ABBA})_8 = 512A + 64B + 8B + A = 513A + 72B.\\]\nIt is clear that $A=1,$ so we repeatedly add $72$ to $513$ until we get palindromes less than $1000:$\n\\begin{align*} 513+72\\cdot0 &= 513, \\\\ 513+72\\cdot1 &= \\boxed{585}, \\\\ 513+72\\cdot2 &= 657, \\\\ 513+72\\cdot3 &= 729, \\\\ 513+72\\cdot4 &= 801, \\\\ 513+72\\cdot5 &= 873, \\\\ 513+72\\cdot6 &= 945, \\\\ 513+72\\cdot7 &= 1017. \\\\ \\end{align*}\n~MRENTHUSIASM","answer":"585","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_2"} +{"id":51,"problem":"For each positive integer $n$ let $a_n$ be the least positive integer multiple of $23$ such that $a_n \\equiv 1 \\pmod{2^n}.$ Find the number of positive integers $n$ less than or equal to $1000$ that satisfy $a_n = a_{n+1}$.","solution":"Denote $a_n = 23 b_n$.\nThus, for each $n$, we need to find smallest positive integer $k_n$, such that\n\\[ 23 b_n = 2^n k_n + 1 . \\]\nThus, we need to find smallest $k_n$, such that\n\\[ 2^n k_n \\equiv - 1 \\pmod{23} . \\]\nNow, we find the smallest $m$, such that $2^m \\equiv 1 \\pmod{23}$.\nBy Fermat's Theorem, we must have $m | \\phi \\left( 23 \\right)$. That is, $m | 22$.\nWe find $m = 11$.\nTherefore, for each $n$, we need to find smallest $k_n$, such that\n\\[ 2^{{\\rm Rem} \\left( n , 11 \\right)} k_n \\equiv - 1 \\pmod{23} . \\]\nWe have the following results:\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 0\\), then \\(k_n = 22\\) and \\(b_n = 1\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 1\\), then \\(k_n = 11\\) and \\(b_n = 1\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 2\\), then \\(k_n = 17\\) and \\(b_n = 3\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 3\\), then \\(k_n = 20\\) and \\(b_n = 7\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 4\\), then \\(k_n = 10\\) and \\(b_n = 7\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 5\\), then \\(k_n = 5\\) and \\(b_n = 7\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 6\\), then \\(k_n = 14\\) and \\(b_n = 39\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 7\\), then \\(k_n = 7\\) and \\(b_n = 39\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 8\\), then \\(k_n = 15\\) and \\(b_n = 167\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 9\\), then \\(k_n = 19\\) and \\(b_n = 423\\).\nIf \\({\\rm Rem} \\left( n , 11 \\right) = 10\\), then \\(k_n = 21\\) and \\(b_n = 935\\).\nTherefore, in each cycle, $n \\in \\left\\{ 11 l , 11l + 1 , \\cdots , 11l + 10 \\right\\}$, we have $n = 11l$, $11l + 3$, $11l + 4$, $11l + 6$, such that $b_n = b_{n+1}$. That is, $a_n = a_{n+1}$.\nAt the boundary of two consecutive cycles, $b_{11L + 10} \\neq b_{11 \\left(l + 1 \\right)}$.\nWe have $1000 = 90 \\cdot 11 + 10$.\nTherefore, the number of feasible $n$ is $91 \\cdot 4 - 1 = \\boxed{\\textbf{(363) }}$.\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\nObserve that if $a_{n-1} - 1$ is divisible by $2^n$, $a_n = a_{n-1}$. If not, $a_n = a_{n-1} + 23 \\cdot 2^{n-1}$.\nThis encourages us to let $b_n = \\frac{a_n - 1}{2^n}$. Rewriting the above equations, we have\n\\[b_n = \\begin{cases} \\frac{b_{n-1}}{2} & \\text{if } 2 \\text{ } \\vert \\text{ } b_{n-1} \\\\ \\frac{b_{n-1}+23}{2} &\\text{if } 2 \\not\\vert \\text{ } b_{n-1} \\end{cases}\\]\nThe first few values of $b_n$ are $11, 17, 20, 10, 5, 14, 7, 15, 19, 21,$ and $22$. We notice that $b_{12} = b_1 = 11$, and thus the sequence is periodic with period $11$.\nNote that $a_n = a_{n+1}$ if and only if $b_n$ is even. This occurs when $n$ is congruent to $0, 3, 4$ or $6$ mod $11$, giving four solutions for each period.\nFrom $1$ to $1001$ (which is $91 \\times 11$), there are $91 \\times 4 = 364$ values of $n$. We subtract $1$ from the total since $1001$ satisfies the criteria but is greater than $1000$ to get a final answer of $\\fbox{363}$ .\n~[Bxiao31415](https:\/\/artofproblemsolving.com\/wiki\/index.php\/User:Bxiao31415)\n(small changes by bobjoebilly and [IraeVid13](https:\/\/artofproblemsolving.com\/wiki\/index.php\/User:Iraevid13))\nWe first check that $\\gcd(23, 2^n) = 1$ hence we are always seeking a unique modular inverse of $23$, $b_n$, such that $a_n \\equiv 23b_n \\equiv 1 \\mod{2^n}$.\n\nNow that we know that $b_n$ is unique, we proceed to recast this problem in binary. This is convenient because $x \\mod{2^n}$ is simply the last $n$-bits of $x$ in binary, and if $x \\equiv 1 \\mod{2^n}$, it means that of the last $n$ bits of $x$, only the rightmost bit (henceforth $0$th bit) is $1$.\nAlso, multiplication in binary can be thought of as adding shifted copies of the multiplicand. For example:\n\\begin{align} 10111_2 \\times 1011_2 &= 10111_2 \\times (1000_2 + 10_2 + 1_2) \\\\ &= 10111000_2 + 101110_2 + 10111_2 \\\\ &= 11111101_2 \\end{align}\nNow note $23 = 10111_2$, and recall that our objective is to progressively zero out the $n$ leftmost bits of $a_n = 10111_2 \\times b_n$ except for the $0$th bit. \nWrite $b_n = \\underline{c_{n-1}\\cdots c_2c_1c_0}_2$, we note that $c_0$ uniquely defines the $0$th bit of $a_n$, and once we determine $c_0$, $c_1$ uniquely determines the $1$st bit of $a_n$, so on and so forth. \nFor example, $c_0 = 1$ satisfies $a_1 \\equiv10111_2 \\times 1_2 \\equiv 1 \\mod{10_2}$\nNext, we note that the second bit of $a_1$ is $1$, so we must also have $c_1 = 1$ in order to zero it out, giving\n\\[a_2 \\equiv 10111_2 \\times 11_2 \\equiv 101110_2 + a_1 \\equiv 1000101_2 \\equiv 01_2 \\mod{100_2}\\]\n$a_{n+1} = a_{n}$ happens precisely when $c_n = 0$. In fact we can see this in action by working out $a_3$. Note that $a_2$ has 1 on the $2$nd bit, so we must choose $c_2 = 1$. This gives \n\\[a_3 \\equiv 10111_2 \\times 111_2 \\equiv 1011100_2 + a_2 \\equiv 10100001_2 \\equiv 001_2 \\mod{1000_2}\\]\nNote that since the $3$rd and $4$th bit are $0$, $c_3 = c_4 = 0$, and this gives $a_3 = a_4 = a_5$.\n\nIt may seem that this process will take forever, but note that $23 = 10111_2$ has $4$ bits behind the leading digit, and in the worst case, the leading digits of $a_n$ will have a cycle length of at most $16$. In fact, we find that the cycle length is $11$, and in the process found that $a_3 = a_4 = a_5$, $a_6 = a_7$, and $a_{11} = a_{12}$.\nSince we have $90$ complete cycles of length $11$, and the last partial cycle yields $a_{993} = a_{994} = a_{995}$ and $a_{996} = a_{997}$, we have a total of $90 \\times 4 + 3 = \\boxed{363}$ values of $n \\le 1000$ such that $a_n = a_{n+1}$\n~ cocoa @ [https:\/\/www.corgillogical.com](https:\/\/artofproblemsolving.comhttps:\/\/www.corgillogical.com)","answer":"363","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_15"} +{"id":52,"problem":"Recall that a palindrome is a number that reads the same forward and backward. Find the greatest integer less than $1000$ that is a palindrome both when written in base ten and when written in base eight, such as $292 = 444_{\\text{eight}}$.","solution":"Assuming that such palindrome is greater than $777_8 = 511,$ we conclude that the palindrome has four digits when written in base $8.$ Let such palindrome be \\[(\\underline{ABBA})_8 = 512A + 64B + 8B + A = 513A + 72B.\\]\nIt is clear that $A=1,$ so we repeatedly add $72$ to $513$ until we get palindromes less than $1000:$\n\\begin{align*} 513+72\\cdot0 &= 513, \\\\ 513+72\\cdot1 &= \\boxed{585}, \\\\ 513+72\\cdot2 &= 657, \\\\ 513+72\\cdot3 &= 729, \\\\ 513+72\\cdot4 &= 801, \\\\ 513+72\\cdot5 &= 873, \\\\ 513+72\\cdot6 &= 945, \\\\ 513+72\\cdot7 &= 1017. \\\\ \\end{align*}\n~MRENTHUSIASM","answer":"585","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_2"} {"id":53,"problem":"Let $\\triangle ABC$ be an isosceles triangle with $\\angle A = 90^\\circ.$ There exists a point $P$ inside $\\triangle ABC$ such that $\\angle PAB = \\angle PBC = \\angle PCA$ and $AP = 10.$ Find the area of $\\triangle ABC$.\n[asy] size(200); pair A, B, C, P; A = origin; B = (0,10*sqrt(5)); C = (10*sqrt(5),0); P = intersectionpoints(Circle(A,10),Circle(C,20))[0]; dot(\"$A$\",A,1.5*SW,linewidth(4)); dot(\"$B$\",B,1.5*NW,linewidth(4)); dot(\"$C$\",C,1.5*SE,linewidth(4)); dot(\"$P$\",P,1.5*NE,linewidth(4)); markscalefactor=0.125; draw(rightanglemark(B,A,C,10),red); draw(anglemark(P,A,B,25),red); draw(anglemark(P,B,C,25),red); draw(anglemark(P,C,A,25),red); add(pathticks(anglemark(P,A,B,25), n = 1, r = 0.1, s = 10, red)); add(pathticks(anglemark(P,B,C,25), n = 1, r = 0.1, s = 10, red)); add(pathticks(anglemark(P,C,A,25), n = 1, r = 0.1, s = 10, red)); draw(A--B--C--cycle^^P--A^^P--B^^P--C); label(\"$10$\",midpoint(A--P),dir(-30),blue); [\/asy]","solution":"This solution refers to the Diagram section.\nLet $\\angle PAB = \\angle PBC = \\angle PCA = \\theta,$ from which $\\angle PAC = 90^\\circ-\\theta,$ and $\\angle APC = 90^\\circ$.\nMoreover, we have $\\angle PBA = \\angle PCB = 45^\\circ-\\theta,$ as shown below:\n\nNote that $\\triangle PAB \\sim \\triangle PBC$ by AA Similarity. The ratio of similitude is $\\frac{PA}{PB} = \\frac{PB}{PC} = \\frac{AB}{BC},$ so $\\frac{10}{PB} = \\frac{1}{\\sqrt2}$ and thus $PB=10\\sqrt2.$ Similarly, we can figure out that $PC=20$.\nFinally, $AC=\\sqrt{10^2+20^2}=10\\sqrt{5}$, so the area of $\\triangle ABC$ is \\[\\frac12\\cdot AB\\cdot AC = \\frac12\\cdot (10\\sqrt{5})^2 = \\boxed{250}.\\]\n~s214425\n~MRENTHUSIASM\n~Mathkiddie\nSince the triangle is a right isosceles triangle, $\\angle B = \\angle C = 45^\\circ$.\nLet the common angle be $\\theta$. Note that $\\angle PAC = 90^\\circ-\\theta$, thus $\\angle APC = 90^\\circ$. From there, we know that $AC = \\frac{10}{\\sin\\theta}$.\nNote that $\\angle ABP = 45^\\circ-\\theta$, so from law of sines we have\n\\[\\frac{10}{\\sin\\theta \\cdot \\frac{\\sqrt{2}}{2}}=\\frac{10}{\\sin(45^\\circ-\\theta)}.\\]\nDividing by $10$ and multiplying across yields\n\\[\\sqrt{2}\\sin(45^\\circ-\\theta)=\\sin\\theta.\\]\nFrom here use the sine subtraction formula, and solve for $\\sin\\theta$:\n\\begin{align*} \\cos\\theta-\\sin\\theta&=\\sin\\theta \\\\ 2\\sin\\theta&=\\cos\\theta \\\\ 4\\sin^2\\theta&=\\cos^2\\theta \\\\ 4\\sin^2\\theta&=1-\\sin^2\\theta \\\\ 5\\sin^2\\theta&=1 \\\\ \\sin\\theta&=\\frac{1}{\\sqrt{5}}. \\end{align*}\nSubstitute this to find that $AC=10\\sqrt{5}$, thus the area is $\\frac{(10\\sqrt{5})^2}{2}=\\boxed{250}$.\n~SAHANWIJETUNGA\nSince the triangle is a right isosceles triangle, $\\angle B = \\angle C = 45^\\circ$.\nDo some angle chasing yielding:\n\n$\\angle APB = \\angle BPC = 135^\\circ$\n$\\angle APC=90^\\circ$\nWe have $AC=\\frac{10}{\\sin\\theta}$ since $\\triangle APC$ is a right triangle. Since $\\triangle ABC$ is a $45^\\circ$-$45^\\circ$-$90^\\circ$ triangle, $AB=\\frac{10}{\\sin\\theta}$, and $BC=\\frac{10\\sqrt{2}}{\\sin\\theta}$. \nNote that $\\triangle APB \\sim \\triangle BPC$ by a factor of $\\sqrt{2}$. Thus, $BP = 10\\sqrt{2}$, and $PC = 20$.\nFrom Pythagorean theorem, $AC=10\\sqrt{5}$ so the area of $\\triangle ABC$ is $\\frac{(10\\sqrt{5})^2}{2}=\\boxed{250}$.\n~SAHANWIJETUNGA\nSince the triangle is a right isosceles triangle, $\\angle B = \\angle C = 45^\\circ$.\nNotice that in triangle $PBC$, $\\angle PBC + 45-\\angle PCA = 45^\\circ$, so $\\angle BPC = 135^\\circ$. Similar logic shows $\\angle APC = 135^\\circ$.\nNow, we see that $\\triangle APB \\sim \\triangle BPC$ with ratio $1:\\sqrt{2}$ (as $\\triangle ABC$ is a $45^\\circ$-$45^\\circ$-$90^\\circ$ triangle). Hence, $\\overline{PB}=10\\sqrt{2}$. We use the Law of Cosines to find $AB$.\n\\begin{align*} AB^2&=BP^2+AP^2-2ab\\cos(APB) \\\\ &=100+200-2(10)(10\\sqrt{2}\\cos(135^\\circ)) \\\\ &=300+200\\cdot\\sqrt{2}\\cdot\\frac{1}{\\sqrt{2}} \\\\ &=500. \\end{align*}\nSince $\\triangle ABC$ is a right triangle, the area is $\\frac{AB^2}{2}=\\frac{500}{2}=\\boxed{250}$.\n~Kiran\nDenote the area of $X$ by $[X].$ As in previous solutions, we see that $\\angle APC = 90 ^\\circ, \\triangle BPC \\sim \\triangle APB$ with ratio $k = \\sqrt{2}\\implies$ \\[\\frac {PC}{PB} = \\frac {PB}{PA} = k \\implies PC = k^2 \\cdot AP = 20 \\implies [APC] = \\frac {AP \\cdot PC}{2} = 100.\\]\n\\[[BPC] = k^2 [APB] = 2 [APB].\\]\n\\[AB = BC, \\angle PCA = \\angle PAB \\implies \\frac {[APC]}{[APB]} = \\frac {PC}{PA} = 2 \\implies\\]\n\\[[ABC] = [APB] + [APC] + [BPC] = [APC] \\cdot (\\frac {1}{2} + 1 + 2 \\cdot \\frac {1}{2}) = \\frac {5}{2} \\cdot [APC] = \\boxed{250}.\\]\nvladimir.shelomovskii@gmail.com, vvsss\nDenote $\\angle PCA = \\theta$. Then, by trig Ceva's: \n\\begin{align*} \\frac{\\sin^3(\\theta)}{\\sin(90-\\theta) \\cdot \\left(\\sin(45-\\theta)\\right)^2} &= 1 \\\\ \\sin^3(\\theta) &= \\cos(\\theta) \\cdot \\left(\\sin(45) \\cos(\\theta) - \\cos(45) \\sin(\\theta)\\right)^2 \\\\ 2\\sin^3(\\theta) &= \\cos(\\theta) \\cdot \\left(\\cos(\\theta) - \\sin(\\theta)\\right)^2 \\\\ 2\\sin^2(\\theta) &= \\cot(\\theta) \\cdot \\left(1 - 2\\sin(\\theta)\\cos(\\theta)\\right) \\\\ 2\\sin^2(\\theta) &= \\cot(\\theta) - 2\\cos^2(\\theta) \\\\ \\cot(\\theta) &= 2 \\\\ \\sin(\\theta) &= \\frac{\\sqrt{5}}{5}. \\end{align*}\nNote that $\\angle APC$ is a right angle. Therefore: \n\\begin{align*} \\sin(\\theta) &= \\frac{AP}{AC} \\\\ AC &= \\frac{10}{\\frac{\\sqrt{5}}{5}} \\\\ &= 10\\sqrt{5} \\\\ |ABC| &= \\frac{AC^2}{2} \\\\ &= \\boxed{250}. \\end{align*}\n~ConcaveTriangle\nNotice that point $P$ is one of the two Brocard Points of $\\triangle ABC$. (The angle equalities given in the problem are equivalent to the definition of a Brocard point.) By the Brocard point formula,\n\\begin{align*} \\cot(\\phi) = \\cot(A)+\\cot(B)+\\cot(C) \\end{align*}\n, where $\\phi$ is equal to $\\angle PAB$.(This is also called the Brocard angle of triangle ABC). Because the triangle is an isosceles right triangle, the cotangents are easy to compute:\n\\begin{align*}\\cot(\\phi) = 0 + 1 + 1 \\\\ \\cot(\\phi) = 2\\end{align*}\nBy definition, $\\cot(\\phi) = \\frac{\\cos(\\phi)}{\\sin(\\phi)}$. By the Pythagorean identity, $\\cos(\\phi)=\\frac{2\\sqrt{5}}{5}$ and $\\sin(\\phi) = \\cos(\\phi)=\\frac{\\sqrt{5}}{5}$. Consider triangle $APB$. By the problem condition, $\\angle PBA = 45-\\phi$, so $\\angle BPA = 135^{\\circ}$\n\\begin{align*}\\sin{45-\\theta} = \\sin{45}\\cos{\\phi}-\\cos{45}\\sin{\\phi} = \\frac{\\sqrt{10}}{10}\\end{align*}\nNow, we can use the Law of Sines.\n\\begin{align*} \\frac{AP}{\\sin{45-\\theta}}&=\\frac{AB}{\\sin{135}} \\\\ 10 \\sqrt{10} &= \\sqrt{2} AB \\\\ AB &= 10 \\sqrt{5} \\end{align*}\nTherefore, the answer is \\[[ABC] = \\frac{1}{2} (AB)^2 = \\boxed{250}.\\]\n~ewei12","answer":"250","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_3"} -{"id":54,"problem":"Let $x,y,$ and $z$ be real numbers satisfying the system of equations\n\\begin{align*} xy + 4z &= 60 \\\\ yz + 4x &= 60 \\\\ zx + 4y &= 60. \\end{align*}\nLet $S$ be the set of possible values of $x.$ Find the sum of the squares of the elements of $S.$","solution":"We first subtract the second equation from the first, noting that they both equal $60$. \n\\begin{align*} xy+4z-yz-4x&=0 \\\\ 4(z-x)-y(z-x)&=0 \\\\ (z-x)(4-y)&=0 \\end{align*}\nCase 1: Let $y=4$.\nThe first and third equations simplify to:\n\\begin{align*} x+z&=15 \\\\ xz&=44 \\end{align*}\nfrom which it is apparent that $x=4$ and $x=11$ are solutions.\nCase 2: Let $x=z$.\nThe first and third equations simplify to:\n\\begin{align*} xy+4x&=60 \\\\ x^2+4y&=60 \\end{align*}\nWe subtract the following equations, yielding:\n\\begin{align*} x^2+4y-xy-4x&=0 \\\\ x(x-4)-y(x-4)&=0 \\\\ (x-4)(x-y)&=0 \\end{align*}\nWe thus have $x=4$ and $x=y$, substituting in $x=y=z$ and solving yields $x=6$ and $x=-10$.\nThen, we just add the squares of the solutions (make sure not to double count the $4$), and get \\[4^2+11^2+(-6)^2+10^2=16+121+36+100=\\boxed{273}.\\]\n~SAHANWIJETUNGA\nWe index these equations as (1), (2), and (3), respectively.\nTaking $(1)-(2)$, we get\n\\[ \\left( x - z \\right) \\left( y - 4 \\right) = 0 . \\]\nDenote $x' = x - 4$, $y' = y - 4$, $z' = z - 4$.\nThus, the above equation can be equivalently written as\n\\[ \\left( x' - z' \\right) y' = 0 . \\hspace{1cm} (1') \\]\nSimilarly, by taking $(2)-(3)$, we get\n\\[ \\left( y' - x' \\right) z' = 0 . \\hspace{1cm} (2') \\]\nBy taking $(3) - (1)$, we get\n\\[ \\left( z' - y' \\right) x' = 0 . \\hspace{1cm} (3') \\]\nFrom $(3')$, we have the following two cases.\nCase 1: $x' = 0$.\nPlugging this into $(1')$ and $(2')$, we get $y'z' = 0$.\nThus, $y' = 0$ or $z' = 0$.\nBecause we only need to compute all possible values of $x$, without loss of generality, we only need to analyze one case that $y' = 0$.\nPlugging $x' = 0$ and $y' = 0$ into (1), we get a feasible solution $x = 4$, $y = 4$, $z = 11$.\nCase 2: $x' \\neq 0$ and $z' - y' = 0$.\nPlugging this into $(1')$ and $(2')$, we get $\\left( x' - y' \\right) y' = 0$.\nCase 2.1: $y' = 0$.\nThus, $z' = 0$. Plugging $y' = 0$ and $z' = 0$ into (1), we get a feasible solution $x = 11$, $y = 4$, $z = 4$.\nCase 2.2: $y' \\neq 0$ and $x' = y'$.\nThus, $x' = y' = z'$. Plugging these into (1), we get $\\left( x, y, z \\right) = \\left( -10, -10, -10 \\right)$ or $\\left( 6, 6, 6 \\right)$.\nPutting all cases together, $S = \\left\\{ 4, 11, -10, 6 \\right\\}$.\nTherefore, the sum of the squares of the elements of $S$ is\n\\begin{align*} 4^2 + 11^2 + \\left( -10 \\right)^2 + 6^2 = \\boxed{\\textbf{(273) }} . \\end{align*}\n~ Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\nWe index these equations as (1), (2), and (3), respectively.\nUsing equation (1), we get $z = \\frac{60 - xy}{4} = 15 - \\frac{xy}{4}$\nWe need to solve for x, so we plug this value of z into equation (3) to get:\n\\[15x - \\frac{x^2y}{4} - 4y = 60\\]\n\\[\\frac{y}{4} * x^2 - 15x + (60 + 4y) = 0\\]\nWe use the quadratic formula to get possible values of x:\n\\[x = \\frac{15 \\pm \\sqrt{15^2 - 4(\\frac{y}{4})(60 + 4y)}}{\\frac{y}{2}}\\]\n\\[x = \\frac{30 \\pm 2\\sqrt{225 - 60y + 4y^2}}{y}\\]\n\\[x = \\frac{30 \\pm 2\\sqrt{(2y-15)^2}}{y}\\]\n\\[x = \\frac{30 \\pm 2(2y - 15)}{y}\\]\n\\[x = \\frac{30 \\pm (4y - 30)}{y}\\]\nHere, we have two cases, (plus) and (minus)\nIn the plus case, we have:\n\\[x = \\frac{(30 + 4y - 30)}{y}\\]\n\\[x = 4\\]\nSo, our first case gives us one value of x, which is 4.\nIn the minus case, we have:\n\\[x = \\frac{30 - (4y - 30)}{y}\\]\n\\[x = \\frac{60 - 4y}{y}\\]\n\\[x = \\frac{60}{y} - 4\\]\nFor this case, we now have values of x in terms of y. \nPlugging this expression for x in equation (1), we get\n\\[60 - 4y + 4z = 60\\]\n\\[4z = 4y\\]\n\\[z = y\\]\nSo we know that for this case, z = y. \nUsing this information in equation (2), we get\n\\[y^2 + \\frac{240}{y} - 16 = 60\\]\n\\[y^2 + \\frac{240}{y} - 76 = 0\\]\nMultiplying both sides by y, we get a cubic expression:\n\\[y^3 + 0y^2 - 76y + 240 = 0\\]\nHere we just have to figure out the values of y that make this equation true. I used Vieta's Formulas to get a possible list, but you could also use the rational root theorem and synthetic division to find these. We call the three values of y that solve this equation: $y_{1},y_{2},y_{3}$\nUsing Vieta's Formulas, you get these three expressions:\n\\[y_{1} + y_{2} + y_{3} = 0\\]\n\\[y_{1} * y_{2} * y_{3} = -240\\]\n\\[(y_{1} * y_{2}) + (y_{2} * y_{3}) + (y_{1} * y_{3}) = -76\\]\nIn addition, we know that $y \\vert 60$, because of our expression for x. \nSince the three values of y multiply to a negative number but also add to 0, we know that one value is negative and the other two are positive, and that the absolute value of the negative value is greater than both of the positive values.\nList of possible values for y are $\\{-60,-30,-20,-15,-12,-10,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,10,12,15,20,30,60\\}$\nFrom a list of these values, the only values that work are $y_1 = -10, y_2 = 6, y_3 = 4$ because\n\\[-10 + 6 + 4 = 0\\]\n\\[-10 * 6 * 4 = -240\\]\n\\[(-10 * 6) + (-10 * 4) + (6 * 4) = -60 - 40 + 24 = -76\\]\nPlugging in these values for y into our expression for x, we get:\n\\[x = \\frac{60}{-10} - 4 = -10\\]\n\\[x = \\frac{60}{6} - 4 = 6\\]\n\\[x = \\frac{60}{4} - 4 = 11\\]\nSo, now we have accounted for both cases, and we have 4 values of x = $\\{-10,4,6,11\\}$\nSquaring all these terms we get: 100 + 16 + 36 + 121 = 273, so our answer is $\\boxed{\\textbf{(273)}}$\n~Cardtricks\nSince all three equations are in the form $\\frac{K}{a} + 4a = 60$ where $K = xyz$, we can rearrange this to see that $x$, $y$, and $z$ all satisfy \n\\[ 4a^2 - 60a + K = 0. \\]\nLet this quadratic have roots $a_1$ and $a_2$. Then, there are two cases to consider: two of $x$, $y$, $z$ are equal to $a_1$ and the third is equal to $a_2$, or all of $x$, $y$, $z$ are equal to $a_1$.\nCase 1: WLOG let $x = y = a_1$ and $z = a_2$.\nThen by Vieta's,\n\\[x + z = 15 \\hspace{1cm} (1)\\]\n\\[xz = \\frac{x^2z}{4} \\hspace{1cm} (2)\\]\nwhich gives $x = y = 4$ and $z = 11$. But we can swap $x$, $y$, and $z$ however we like, so this also gives $x = 11$ as a solution. In total, this case yields $x = 4$ and $x = 11$ as possible values of $x$.\nCase 2: WLOG let $x = y = z = a_1$.\nAgain, by Vieta's,\n\\[x + a_2 = 15 \\hspace{1cm} (1)\\]\n\\[xa_2 = \\frac{x^3}{4} \\hspace{1cm} (2)\\]\nWe can use $(2)$ to isolate $a_2$ in terms of $x$, then plug that into $(1)$ to get that $x^2 + 4x - 60 = 0$. This yields $x = -10$ and $x = 6$ as additional possible values of $x$.\nIn all, $x$ can be any of $\\{ 4, 11, -10, 6 \\}$, so the requested answer is $4^2 + 11^2 + (-10)^2 + 6^2 = \\boxed{273}$.\nWe index these equations as (1), (2), and (3) respectively (same as solution 2). There are two possible cases:\nCase 1: $x = \\pm 4$\nIn this case, we simply plug in $x = 4$ and $x = -4$. We note that $x=4$ is a valid case.\nCase 2: $x \\neq \\pm 4$\nIn this case, using equation (3), we get $y = 15 - \\frac{xz}{4}$. Plugging that into equation (1), we get $z = \\frac{240-60x}{16-x^2}$. Plugging that expression back into the original expression for $y$ we obtain $y = 15 - \\frac{60x-15x^2}{16-x^2}$. \nNow we plug these two expressions into equation (2):\n\\[\\left(15 - \\frac{60x-15x^2}{16-x^2}\\right)\\left(\\frac{240-60x}{16-x^2}\\right) = 60-4x\\]\nmultiplying both sides by $(16-x^2)$ and factoring, we get:\n\\[\\left(15(4-x)(4+x)-60x+15x^2\\right)\\left(\\frac{60(4-x)}{(4+x)(4-x)}\\right) = 4(15 - x)(4 + x)(4 - x)\\]\nwhich simplifies to:\n\\[x^3 - 7x^2 - 104x + 660 = 0\\]\nwe note that $x = 6$ is a root. Factoring, we get the other roots, -10 and 11. \nOur desired answer is the sum of the square of all these roots: \\[4^2 + 6^2 + (-10)^2 + 11^2 = \\boxed{273}\\]\n~Chupdogs","answer":"273","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_4"} -{"id":55,"problem":"Let $S$ be the set of all positive rational numbers $r$ such that when the two numbers $r$ and $55r$ are written as fractions in lowest terms, the sum of the numerator and denominator of one fraction is the same as the sum of the numerator and denominator of the other fraction. The sum of all the elements of $S$ can be expressed in the form $\\frac{p}{q},$ where $p$ and $q$ are relatively prime positive integers. Find $p+q.$","solution":"Denote $r = \\frac{a}{b}$, where $\\left( a, b \\right) = 1$.\nWe have $55 r = \\frac{55a}{b}$.\nSuppose $\\left( 55, b \\right) = 1$, then the sum of the numerator and the denominator of $55r$ is $55a + b$.\nThis cannot be equal to the sum of the numerator and the denominator of $r$, $a + b$.\nTherefore, $\\left( 55, b \\right) \\neq 1$.\nCase 1: $b$ can be written as $5c$ with $\\left( c, 11 \\right) = 1$.\nThus, $55r = \\frac{11a}{c}$.\nBecause the sum of the numerator and the denominator of $r$ and $55r$ are the same,\n\\[ a + 5c = 11a + c . \\]\nHence, $2c = 5 a$.\nBecause $\\left( a, b \\right) = 1$, $\\left( a, c \\right) = 1$.\nThus, $a = 2$ and $c = 5$.\nTherefore, $r = \\frac{a}{5c} = \\frac{2}{25}$.\nCase 2: $b$ can be written as $11d$ with $\\left( d, 5 \\right) = 1$.\nThus, $55r = \\frac{5a}{c}$.\nBecause the sum of the numerator and the denominator of $r$ and $55r$ are the same,\n\\[ a + 11c = 5a + c . \\]\nHence, $2a = 5 c$.\nBecause $\\left( a, b \\right) = 1$, $\\left( a, c \\right) = 1$.\nThus, $a = 5$ and $c = 2$.\nTherefore, $r = \\frac{a}{11c} = \\frac{5}{22}$.\nCase 3: $b$ can be written as $55 e$.\nThus, $55r = \\frac{a}{c}$.\nBecause the sum of the numerator and the denominator of $r$ and $55r$ are the same,\n\\[ a + 55c = a + c . \\]\nHence, $c = 0$. This is infeasible.\nThus, there is no solution in this case.\nPutting all cases together, $S = \\left\\{ \\frac{2}{25}, \\frac{5}{22} \\right\\}$.\nTherefore, the sum of all numbers in $S$ is\n\\[ \\frac{2}{25} + \\frac{5}{22} = \\frac{169}{550} . \\]\nTherefore, the answer is $169 + 550 = \\boxed{\\textbf{(719) }}$.\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)","answer":"719","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_5"} +{"id":54,"problem":"Let $x,y,$ and $z$ be real numbers satisfying the system of equations\n\\begin{align*} xy + 4z &= 60 \\\\ yz + 4x &= 60 \\\\ zx + 4y &= 60. \\end{align*}\nLet $S$ be the set of possible values of $x.$ Find the sum of the squares of the elements of $S$.","solution":"We first subtract the second equation from the first, noting that they both equal $60$. \n\\begin{align*} xy+4z-yz-4x&=0 \\\\ 4(z-x)-y(z-x)&=0 \\\\ (z-x)(4-y)&=0 \\end{align*}\nCase 1: Let $y=4$.\nThe first and third equations simplify to:\n\\begin{align*} x+z&=15 \\\\ xz&=44 \\end{align*}\nfrom which it is apparent that $x=4$ and $x=11$ are solutions.\nCase 2: Let $x=z$.\nThe first and third equations simplify to:\n\\begin{align*} xy+4x&=60 \\\\ x^2+4y&=60 \\end{align*}\nWe subtract the following equations, yielding:\n\\begin{align*} x^2+4y-xy-4x&=0 \\\\ x(x-4)-y(x-4)&=0 \\\\ (x-4)(x-y)&=0 \\end{align*}\nWe thus have $x=4$ and $x=y$, substituting in $x=y=z$ and solving yields $x=6$ and $x=-10$.\nThen, we just add the squares of the solutions (make sure not to double count the $4$), and get \\[4^2+11^2+(-6)^2+10^2=16+121+36+100=\\boxed{273}.\\]\n~SAHANWIJETUNGA\nWe index these equations as (1), (2), and (3), respectively.\nTaking $(1)-(2)$, we get\n\\[ \\left( x - z \\right) \\left( y - 4 \\right) = 0 . \\]\nDenote $x' = x - 4$, $y' = y - 4$, $z' = z - 4$.\nThus, the above equation can be equivalently written as\n\\[ \\left( x' - z' \\right) y' = 0 . \\hspace{1cm} (1') \\]\nSimilarly, by taking $(2)-(3)$, we get\n\\[ \\left( y' - x' \\right) z' = 0 . \\hspace{1cm} (2') \\]\nBy taking $(3) - (1)$, we get\n\\[ \\left( z' - y' \\right) x' = 0 . \\hspace{1cm} (3') \\]\nFrom $(3')$, we have the following two cases.\nCase 1: $x' = 0$.\nPlugging this into $(1')$ and $(2')$, we get $y'z' = 0$.\nThus, $y' = 0$ or $z' = 0$.\nBecause we only need to compute all possible values of $x$, without loss of generality, we only need to analyze one case that $y' = 0$.\nPlugging $x' = 0$ and $y' = 0$ into (1), we get a feasible solution $x = 4$, $y = 4$, $z = 11$.\nCase 2: $x' \\neq 0$ and $z' - y' = 0$.\nPlugging this into $(1')$ and $(2')$, we get $\\left( x' - y' \\right) y' = 0$.\nCase 2.1: $y' = 0$.\nThus, $z' = 0$. Plugging $y' = 0$ and $z' = 0$ into (1), we get a feasible solution $x = 11$, $y = 4$, $z = 4$.\nCase 2.2: $y' \\neq 0$ and $x' = y'$.\nThus, $x' = y' = z'$. Plugging these into (1), we get $\\left( x, y, z \\right) = \\left( -10, -10, -10 \\right)$ or $\\left( 6, 6, 6 \\right)$.\nPutting all cases together, $S = \\left\\{ 4, 11, -10, 6 \\right\\}$.\nTherefore, the sum of the squares of the elements of $S$ is\n\\begin{align*} 4^2 + 11^2 + \\left( -10 \\right)^2 + 6^2 = \\boxed{\\textbf{(273) }} . \\end{align*}\n~ Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\nWe index these equations as (1), (2), and (3), respectively.\nUsing equation (1), we get $z = \\frac{60 - xy}{4} = 15 - \\frac{xy}{4}$\nWe need to solve for x, so we plug this value of z into equation (3) to get:\n\\[15x - \\frac{x^2y}{4} - 4y = 60\\]\n\\[\\frac{y}{4} * x^2 - 15x + (60 + 4y) = 0\\]\nWe use the quadratic formula to get possible values of x:\n\\[x = \\frac{15 \\pm \\sqrt{15^2 - 4(\\frac{y}{4})(60 + 4y)}}{\\frac{y}{2}}\\]\n\\[x = \\frac{30 \\pm 2\\sqrt{225 - 60y + 4y^2}}{y}\\]\n\\[x = \\frac{30 \\pm 2\\sqrt{(2y-15)^2}}{y}\\]\n\\[x = \\frac{30 \\pm 2(2y - 15)}{y}\\]\n\\[x = \\frac{30 \\pm (4y - 30)}{y}\\]\nHere, we have two cases, (plus) and (minus)\nIn the plus case, we have:\n\\[x = \\frac{(30 + 4y - 30)}{y}\\]\n\\[x = 4\\]\nSo, our first case gives us one value of x, which is 4.\nIn the minus case, we have:\n\\[x = \\frac{30 - (4y - 30)}{y}\\]\n\\[x = \\frac{60 - 4y}{y}\\]\n\\[x = \\frac{60}{y} - 4\\]\nFor this case, we now have values of x in terms of y. \nPlugging this expression for x in equation (1), we get\n\\[60 - 4y + 4z = 60\\]\n\\[4z = 4y\\]\n\\[z = y\\]\nSo we know that for this case, z = y. \nUsing this information in equation (2), we get\n\\[y^2 + \\frac{240}{y} - 16 = 60\\]\n\\[y^2 + \\frac{240}{y} - 76 = 0\\]\nMultiplying both sides by y, we get a cubic expression:\n\\[y^3 + 0y^2 - 76y + 240 = 0\\]\nHere we just have to figure out the values of y that make this equation true. I used Vieta's Formulas to get a possible list, but you could also use the rational root theorem and synthetic division to find these. We call the three values of y that solve this equation: $y_{1},y_{2},y_{3}$\nUsing Vieta's Formulas, you get these three expressions:\n\\[y_{1} + y_{2} + y_{3} = 0\\]\n\\[y_{1} * y_{2} * y_{3} = -240\\]\n\\[(y_{1} * y_{2}) + (y_{2} * y_{3}) + (y_{1} * y_{3}) = -76\\]\nIn addition, we know that $y \\vert 60$, because of our expression for x. \nSince the three values of y multiply to a negative number but also add to 0, we know that one value is negative and the other two are positive, and that the absolute value of the negative value is greater than both of the positive values.\nList of possible values for y are $\\{-60,-30,-20,-15,-12,-10,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,10,12,15,20,30,60\\}$\nFrom a list of these values, the only values that work are $y_1 = -10, y_2 = 6, y_3 = 4$ because\n\\[-10 + 6 + 4 = 0\\]\n\\[-10 * 6 * 4 = -240\\]\n\\[(-10 * 6) + (-10 * 4) + (6 * 4) = -60 - 40 + 24 = -76\\]\nPlugging in these values for y into our expression for x, we get:\n\\[x = \\frac{60}{-10} - 4 = -10\\]\n\\[x = \\frac{60}{6} - 4 = 6\\]\n\\[x = \\frac{60}{4} - 4 = 11\\]\nSo, now we have accounted for both cases, and we have 4 values of x = $\\{-10,4,6,11\\}$\nSquaring all these terms we get: 100 + 16 + 36 + 121 = 273, so our answer is $\\boxed{\\textbf{(273)}}$\n~Cardtricks\nSince all three equations are in the form $\\frac{K}{a} + 4a = 60$ where $K = xyz$, we can rearrange this to see that $x$, $y$, and $z$ all satisfy \n\\[ 4a^2 - 60a + K = 0. \\]\nLet this quadratic have roots $a_1$ and $a_2$. Then, there are two cases to consider: two of $x$, $y$, $z$ are equal to $a_1$ and the third is equal to $a_2$, or all of $x$, $y$, $z$ are equal to $a_1$.\nCase 1: WLOG let $x = y = a_1$ and $z = a_2$.\nThen by Vieta's,\n\\[x + z = 15 \\hspace{1cm} (1)\\]\n\\[xz = \\frac{x^2z}{4} \\hspace{1cm} (2)\\]\nwhich gives $x = y = 4$ and $z = 11$. But we can swap $x$, $y$, and $z$ however we like, so this also gives $x = 11$ as a solution. In total, this case yields $x = 4$ and $x = 11$ as possible values of $x$.\nCase 2: WLOG let $x = y = z = a_1$.\nAgain, by Vieta's,\n\\[x + a_2 = 15 \\hspace{1cm} (1)\\]\n\\[xa_2 = \\frac{x^3}{4} \\hspace{1cm} (2)\\]\nWe can use $(2)$ to isolate $a_2$ in terms of $x$, then plug that into $(1)$ to get that $x^2 + 4x - 60 = 0$. This yields $x = -10$ and $x = 6$ as additional possible values of $x$.\nIn all, $x$ can be any of $\\{ 4, 11, -10, 6 \\}$, so the requested answer is $4^2 + 11^2 + (-10)^2 + 6^2 = \\boxed{273}$.\nWe index these equations as (1), (2), and (3) respectively (same as solution 2). There are two possible cases:\nCase 1: $x = \\pm 4$\nIn this case, we simply plug in $x = 4$ and $x = -4$. We note that $x=4$ is a valid case.\nCase 2: $x \\neq \\pm 4$\nIn this case, using equation (3), we get $y = 15 - \\frac{xz}{4}$. Plugging that into equation (1), we get $z = \\frac{240-60x}{16-x^2}$. Plugging that expression back into the original expression for $y$ we obtain $y = 15 - \\frac{60x-15x^2}{16-x^2}$. \nNow we plug these two expressions into equation (2):\n\\[\\left(15 - \\frac{60x-15x^2}{16-x^2}\\right)\\left(\\frac{240-60x}{16-x^2}\\right) = 60-4x\\]\nmultiplying both sides by $(16-x^2)$ and factoring, we get:\n\\[\\left(15(4-x)(4+x)-60x+15x^2\\right)\\left(\\frac{60(4-x)}{(4+x)(4-x)}\\right) = 4(15 - x)(4 + x)(4 - x)\\]\nwhich simplifies to:\n\\[x^3 - 7x^2 - 104x + 660 = 0\\]\nwe note that $x = 6$ is a root. Factoring, we get the other roots, -10 and 11. \nOur desired answer is the sum of the square of all these roots: \\[4^2 + 6^2 + (-10)^2 + 11^2 = \\boxed{273}\\]\n~Chupdogs","answer":"273","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_4"} +{"id":55,"problem":"Let $S$ be the set of all positive rational numbers $r$ such that when the two numbers $r$ and $55r$ are written as fractions in lowest terms, the sum of the numerator and denominator of one fraction is the same as the sum of the numerator and denominator of the other fraction. The sum of all the elements of $S$ can be expressed in the form $\\frac{p}{q},$ where $p$ and $q$ are relatively prime positive integers. Find $p+q$.","solution":"Denote $r = \\frac{a}{b}$, where $\\left( a, b \\right) = 1$.\nWe have $55 r = \\frac{55a}{b}$.\nSuppose $\\left( 55, b \\right) = 1$, then the sum of the numerator and the denominator of $55r$ is $55a + b$.\nThis cannot be equal to the sum of the numerator and the denominator of $r$, $a + b$.\nTherefore, $\\left( 55, b \\right) \\neq 1$.\nCase 1: $b$ can be written as $5c$ with $\\left( c, 11 \\right) = 1$.\nThus, $55r = \\frac{11a}{c}$.\nBecause the sum of the numerator and the denominator of $r$ and $55r$ are the same,\n\\[ a + 5c = 11a + c . \\]\nHence, $2c = 5 a$.\nBecause $\\left( a, b \\right) = 1$, $\\left( a, c \\right) = 1$.\nThus, $a = 2$ and $c = 5$.\nTherefore, $r = \\frac{a}{5c} = \\frac{2}{25}$.\nCase 2: $b$ can be written as $11d$ with $\\left( d, 5 \\right) = 1$.\nThus, $55r = \\frac{5a}{c}$.\nBecause the sum of the numerator and the denominator of $r$ and $55r$ are the same,\n\\[ a + 11c = 5a + c . \\]\nHence, $2a = 5 c$.\nBecause $\\left( a, b \\right) = 1$, $\\left( a, c \\right) = 1$.\nThus, $a = 5$ and $c = 2$.\nTherefore, $r = \\frac{a}{11c} = \\frac{5}{22}$.\nCase 3: $b$ can be written as $55 e$.\nThus, $55r = \\frac{a}{c}$.\nBecause the sum of the numerator and the denominator of $r$ and $55r$ are the same,\n\\[ a + 55c = a + c . \\]\nHence, $c = 0$. This is infeasible.\nThus, there is no solution in this case.\nPutting all cases together, $S = \\left\\{ \\frac{2}{25}, \\frac{5}{22} \\right\\}$.\nTherefore, the sum of all numbers in $S$ is\n\\[ \\frac{2}{25} + \\frac{5}{22} = \\frac{169}{550} . \\]\nTherefore, the answer is $169 + 550 = \\boxed{\\textbf{(719) }}$.\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)","answer":"719","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_5"} {"id":56,"problem":"Consider the L-shaped region formed by three unit squares joined at their sides, as shown below. Two points $A$ and $B$ are chosen independently and uniformly at random from inside the region. The probability that the midpoint of $\\overline{AB}$ also lies inside this L-shaped region can be expressed as $\\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m+n$.\n[asy] unitsize(2cm); draw((0,0)--(2,0)--(2,1)--(1,1)--(1,2)--(0,2)--cycle); draw((0,1)--(1,1)--(1,0),dashed); [\/asy]","solution":"We proceed by calculating the complement. \nNote that the only configuration of the 2 points that makes the midpoint outside of the L shape is one point in the top square, and one in the right square. This occurs with $\\frac{2}{3} \\cdot \\frac{1}{3}$ probability. \nLet the topmost coordinate have value of: $(x_1,y_1+1)$, and rightmost value of: $(x_2+1,y_2)$.\nThe midpoint of them is thus: \\[\\left(\\frac{x_1+x_2+1}{2}, \\frac{y_1+y_2+1}{2} \\right)\\]\nIt is clear that $x_1, x_2, y_1, y_2$ are all between 0 and 1. For the midpoint to be outside the L-shape, both coordinates must be greater than 1, thus: \n\\[\\frac{x_1+x_2+1}{2}>1\\]\n\\[x_1+x_2>1\\]\nBy symmetry this has probability $\\frac{1}{2}$. Also by symmetry, the probability the y-coordinate works as well is $\\frac{1}{2}$. Thus the probability that the midpoint is outside the L-shape is: \n\\[\\frac{2}{3} \\cdot \\frac{1}{3} \\cdot \\frac{1}{2} \\cdot \\frac{1}{2} = \\frac{1}{18}\\]\nWe want the probability that the point is inside the L-shape however, which is $1-\\frac{1}{18}=\\frac{17}{18}$, yielding the answer of $17+18=\\boxed{35}$\n~SAHANWIJETUNGA\nWe assume each box has side length 1.\nWe index the upper left box, the bottom left box, the bottom right box as II, III, IV, respectively.\nWe index the missing upper right box as I.\nWe put the graph to a coordinate system by putting the intersecting point of four foxes at the origin, the positive direction of the $x$axis at the intersecting line of boxes I and IV, and the positive direction of the $y$-axis at the intersecting line of boxes I and II.\nWe denote by $M$ the midpoint of $AB$.\nTherefore,\n\\begin{align*} \\Bbb P \\left( M \\in II \\cup III \\cup IV \\right) & = 1 - \\Bbb P \\left( M \\in I \\right) . \\end{align*}\nWe observe that a necessary for $M \\in I$ is either $A \\in II$ and $B \\in IV$, or $A \\in IV$ and $B \\in II$.\nIn addition, by symmetry,\n\\[ \\Bbb P \\left( M \\in I | A \\in II, B \\in IV \\right) = \\Bbb P \\left( M \\in I | A \\in IV, B \\in II \\right) . \\]\nThus,\n\\begin{align*} \\Bbb P \\left( M \\in I \\right) & = 2 \\Bbb P \\left( M \\in I | A \\in II, B \\in IV \\right) \\Bbb P \\left( A \\in II, B \\in IV \\right) \\\\ & = 2 \\Bbb P \\left( M \\in I | A \\in II, B \\in IV \\right) \\Bbb P \\left( A \\in II \\right) \\Bbb P \\left( B \\in IV \\right) \\\\ & = 2 \\Bbb P \\left( M \\in I | A \\in II, B \\in IV \\right) \\cdot \\frac{1}{3} \\cdot \\frac{1}{3} \\\\ & = \\frac{2}{9} \\Bbb P \\left( M \\in I | A \\in II, B \\in IV \\right) \\\\ & = \\frac{2}{9} \\Bbb P \\left( x_M > 0, y_M > 0 | x_A < 0, y_A > 0, x_B > 0, y_B < 0 \\right) \\\\ & = \\frac{2}{9} \\Bbb P \\left( x_M > 0 | x_A < 0, x_B > 0 \\right) \\cdot \\Bbb P \\left( y_M > 0 | y_A > 0, y_B < 0 \\right) \\\\ & = \\frac{2}{9} \\Bbb P \\left( x_M > 0 | x_A < 0, x_B > 0 \\right)^2 \\\\ & = \\frac{2}{9} \\Bbb P \\left( x_A + x_B > 0 | x_A < 0, x_B > 0 \\right)^2 \\\\ & = \\frac{2}{9} \\left( \\int_{x_A = -1}^0 \\int_{x_B = 0}^1 \\mathbf 1 \\left\\{ x_A + x_B > 0 \\right\\} dx_B dx_A \\right)^2 \\\\ & = \\frac{2}{9} \\left( \\int_{x_A = -1}^0 \\int_{x_B = - x_A}^1 dx_B dx_A \\right)^2 \\\\ & = \\frac{2}{9} \\left( \\int_{x_A = -1}^0 \\left( 1 + x_A \\right) dx_A \\right)^2 \\\\ & = \\frac{2}{9} \\left( \\frac{1}{2} \\right)^2 \\\\ & = \\frac{1}{18} . \\end{align*}\nThe second equality follows from the condition that the positions of $A$ and $B$ are independent.\nThe sixth equality follows from the condition that for each point of $A$ and $B$, the $x$ and $y$ coordinate are independent.\nTherefore,\n\\begin{align*} \\Bbb P \\left( M \\in II \\cup III \\cup IV \\right) & = 1 - \\frac{1}{18} \\\\ & = \\frac{17}{18} . \\end{align*}\nTherefore, the answer is $17 + 18 = \\boxed{\\textbf{(035) }}$.\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\n[2023 AIME I 6.png](https:\/\/artofproblemsolving.com\/wiki\/index.php\/File:2023_AIME_I_6.png)\nThe only configuration of two points that makes the midpoint outside of the $L-$shape is one point in the top square, and one in the right square with probability $\\frac{2}{9}$ (see Solution $1.)$\nWe use the coordinate system shown in diagram. Let the arbitrary point $A(x, -y), x \\in [0,1], y \\in [0,1]$ be in right square. \nIt is clear that iff point $B$ lies in yellow rectangle with sides $x$ and $1 \u2013 y,$ then the midpoint $AB$ lies outside of the $L$.\nProbability of this is $p = x(1 \u2013 y)$.\nConsider the points $A_1(1-y,-x), A_2(1-x,y-1), A_3(y,x-1)$.\nSimilarly we find $p_1 = (1-y)(1-x), p_2= (1-x)y, p_3 = xy$.\nThe probability that the midpoint of one of the segments $A_1B, A_2B, A_3B$ and $AB$ is outside of the $L-$shape is \\[\\frac {p_1+p_2+p_3+p}{4} = \\frac {1}{4}.\\]\nIf point $A$ is in the right square, point $B$ in the top square, the probability that the midpoint of $\\overline{AB}$ lies outside $L-$shape is $\\frac {1}{4} \\implies$\nIf points $A$ and $B$ are chosen independently and uniformly at random in $L-$shape, then the probability that the midpoint of $\\overline{AB}$ lies outside $L-$shape is $\\frac {1}{4} \\cdot \\frac {2}{9} = \\frac {1}{18}$.\nTherefore the probability that the point is inside the $L-$shape is $1-\\frac{1}{18}=\\frac{17}{18} \\implies \\boxed{35}$.\nvladimir.shelomovskii@gmail.com, vvsss\nConsider this diagram:\n[Screenshot 2024-01-10 101738.png](https:\/\/artofproblemsolving.com\/wiki\/index.php\/File:Screenshot_2024-01-10_101738.png)\nFirst, the one of points must be in the uppermost box and the other in the rightmost box. This happens with probability 2\/3*1\/3=2\/9.\nWe need the midpoints of the $x$ coordinates to be greater than $1$ but less than $2$.\nWe need the midpoints of the $y$ coordinates to be greater than $1$ but less than $2$.\nThus, we set up:\n\\[1<\\frac{x_1+x_2}{2}<2\\]\n\\[1<\\frac{y_1+y_2}{2}<2\\]\nUsing geometric probability, as shown below, we get that the probability of happening is 1\/2. This is for both. So we have probability 1\/2*1\/2=1\/4.\n[Screenshot 2024-01-10 101905.png](https:\/\/artofproblemsolving.com\/wiki\/index.php\/File:Screenshot_2024-01-10_101905.png)\nThus, the desired is 2\/9*1\/4=1\/18 => 1-1\/18=17\/18.\nmathboy282","answer":"35","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_6"} {"id":57,"problem":"Each vertex of a regular dodecagon ($12$-gon) is to be colored either red or blue, and thus there are $2^{12}$ possible colorings. Find the number of these colorings with the property that no four vertices colored the same color are the four vertices of a rectangle.","solution":"Note that the condition is equivalent to stating that there are no 2 pairs of oppositely spaced vertices with the same color.\nCase 1: There are no pairs. This yields $2$ options for each vertices 1-6, and the remaining vertices 7-12 are set, yielding $2^6=64$ cases.\nCase 2: There is one pair. Again start with 2 options for each vertex in 1-6, but now multiply by 6 since there are 6 possibilities for which pair can have the same color assigned instead of the opposite. Thus, the cases are: $2^6*6=384$\ncase 3: There are two pairs, but oppositely colored. Start with $2^6$ for assigning 1-6, then multiply by 6C2=15 for assigning which have repeated colors. Divide by 2 due to half the cases having the same colored opposites. $2^6*15\/2=480$\nIt is apparent that no other cases exist, as more pairs would force there to be 2 pairs of same colored oppositely spaced vertices with the same color. Thus, the answer is: $64+384+480=\\boxed{928}$\n~SAHANWIJETUNGA\nFirst, we identify the geometric condition for the sentence ``four vertices colored the\nsame color are the four vertices of a rectangle.\nConsider any four vertices on the dodecagon, $A$, $B$, $C$, $D$.\nDenote by $O$ the center of the dodecagon.\nBecause $OA = OB = OC$, $\\angle OAB = \\angle OBA$ and $\\angle OBC = \\angle OCB$.\nThus,\n\\begin{align*} \\angle ABC & = \\angle OBA + \\angle OBC \\\\ & = \\frac{\\angle OBA + \\angle OAB}{2} + \\frac{\\angle OBC + \\angle OCB}{2} \\\\ & = \\frac{180^\\circ - \\angle AOB}{2} + \\frac{180^\\circ - \\angle COB}{2} \\\\ & = 180^\\circ - \\frac{\\angle AOB + \\angle COB}{2} \\\\ & = 180^\\circ - \\frac{\\angle AOC}{2} . \\end{align*}\nHence, $\\angle ABC = 90^\\circ$ if and only if $\\angle AOC = 180^\\circ$.\nSimilarly, $\\angle ADC = 90^\\circ$ if and only if $\\angle AOC = 180^\\circ$, and $\\angle BCD = 90^\\circ$ (or $\\angle DAB = 90^\\circ$) if and only if $\\angle BOD = 180^\\circ$.\nTherefore, $ABCD$ is a rectangle if and only if two diagonals both pass through $O$.\nNow, we categorize 12 vertices into 6 groups. Each group contains 2 diagonal vertices.\nNext, we compute the number of coloring configurations such that the above same-color rectangles do not exist.\nCase 1: Two vertices in each group has distinct colors.\nFor each group, we only need to determine which vertex is red. The other one must be blue.\nTherefore, the number of configurations in this case is $2^6$.\nCase 2: There is one group who vertices have the same color. All other groups are with vertices that have distinct colors.\nWe construct such an instance in the following steps.\nStep 1: We determine which group has two vertices that have the same color.\nThe number of ways is 6.\nStep 2: For the selected group, we choose a color for its two vertices.\nThe number of ways is 2.\nStep 3: For each unselected group, we determine which vertex is red.\nThe number of ways is $2^5$.\nFollowing from the rule of product, the total number of configurations in this case is $6 \\cdot 2 \\cdot 2^5 = 6 \\cdot 2^6$.\nCase 3: One group has two red vertices, one group has two blue vertices, and each of the other four groups has vertices with distinct colors.\nWe construct such an instance in the following steps.\nStep 1: We determine which group has two vertices that have both red color.\nThe number of ways is 6.\nStep 2: We determine which group has two vertices that have both blue color.\nThe number of ways is 5.\nStep 3: For each unselected group, we determine which vertex is red.\nThe number of ways is $2^4$.\nFollowing from the rule of product, the total number of configurations in this case is $6 \\cdot 5 \\cdot 2^4 = 30 \\cdot 2^4$.\nPutting all cases together, the total number of feasible configurations is\n\\[ 2^6 + 6 \\cdot 2^6 + 30 \\cdot 2^4 = \\boxed{\\textbf{(928) }}. \\]\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\nNote that a rectangle is formed if and only if it's diagonals pass through the center of the dodecagon and the diagonal's endpoints are the same color. \nConsider the $6$ diagonals that pass through the center. A rectangle is formed if the endpoints of some pair of them are all the same color. We can now perform casework on the diagonals:\nCase $1:$ The endpoints of all the diagonals are all different (e.g. for all diagonals, the endpoints are red and blue in some order).\nThe amount of ways to do this is $2^6=64,$ since there are $2$ ways to order which vertice is red and which is blue for each diagonal. \nCase $2:$ There exists one diagonal such that the endpoints are the same color.\nThere are $6$ ways to choose this diagonal, $2$ ways to choose which color it is, and $2^5$ ways to color the rest of the diagonals. Therefore, the total for this case is $6 \\cdot 2 \\cdot 2^5 = 384$.\nCase $3:$ There exists two diagonals such that the endpoints are the same color, but they are different colors\nThen, there are $6 \\cdot 5=30$ ways to choose these two diagonals, and $2^4=16$ ways to color the rest, so the total for this case is $30 \\cdot 16 = 480$.\nSumming all of the cases, we have $64+384+480=\\boxed{928}$.\n~happypi31415\n\\[\\text{First, we notice that a rectangle is made from two pairs of vertices 1\/2 turn away from each other.}\\]\n\n[Colored dodecagon.png](https:\/\/artofproblemsolving.com\/wiki\/index.php\/File:Colored_dodecagon.png) [](https:\/\/artofproblemsolving.com\/wiki\/index.php\/File:Colored_dodecagon.png)\n\\[\\textit{Note: The image is }\\frac{\\textit{280}}{\\textit{841}}\\approx\\frac{\\textit{1}}{\\textit{3}}\\textit{ size.}\\]\n\\[\\text{For there to be no rectangles, there can be at most one same-colored pair for each color and the rest need to have one red and blue.}\\]\n\\[\\textit{\\underline{Case 1: \\textbf{No pairs}}}\\]\n\\[\\text{Each pair has two ways to color: One red or the other red. Thus, there are }2^6=\\boxed{64}\\text{ ways in this case.}\\]\n\\[\\textit{\\underline{Case 2: \\textbf{One red pair}}}\\]\n\\[\\text{The red pair has }\\binom{6}{1}\\text{ positions. All the rest still have two ways. Therefore, there are }\\binom{6}{1}\\cdot 2^5=\\frac{6}{1}\\dot 2^5=6\\cdot 32=\\boxed{192} \\text{ ways in this case.}\\]\n\\[\\textit{\\underline{Case 3: \\textbf{One blue pair}}}\\]\n\\[\\text{This is the same as the one red pair case so there are still }\\binom{6}{1}\\cdot 2^5=\\frac{6}{1}\\cdot 2^5=6\\cdot 32=\\boxed{192}\\text{ ways.}\\]\n\\[\\textit{\\underline{Case 4: \\textbf{One pair of each color}}}\\]\n\\[\\text{The red pair has }\\binom{6}{1}\\text{ positions. The blue pair has }\\binom{5}{1}\\text{ positions. All the rest still have two ways. Therefore, there are }\\binom{6}{1}\\cdot\\binom{5}{1}\\cdot 2^4=\\frac{6\\cdot 5=30}{1\\cdot 1=1}\\cdot 2^4=30\\cdot 16=\\boxed{480}\\text{ ways in this case.}\\]\n\\[\\textit{\\underline{\\textbf{Solution}}}\\]\n\\[\\text{In total, there are }64+192+192+480=\\boxed{928}\\text{ways.}\\]\n[~~By:afly](https:\/\/artofproblemsolving.comhttps:\/\/artofproblemsolving.com\/wiki\/index.php\/User:Afly)","answer":"928","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_7"} {"id":58,"problem":"Let $\\omega = \\cos\\frac{2\\pi}{7} + i \\cdot \\sin\\frac{2\\pi}{7}$, where $i = \\sqrt{-1}.$ Find the value of the product\\[\\prod_{k=0}^6 \\left(\\omega^{3k} + \\omega^k + 1\\right).\\]","solution":"For any $k\\in Z$, we have,\n\\begin{align*} & \\left( \\omega^{3k} + \\omega^k + 1 \\right) \\left( \\omega^{3\\left( 7 - k \\right)} + \\omega^{\\left( 7 - k \\right)} + 1 \\right) \\\\ & = \\omega^{3 \\cdot 7} + \\omega^{2k + 7} + \\omega^{3k} + \\omega^{-2k + 3 \\cdot 7} + \\omega^7 + \\omega^k + \\omega^{3\\left( 7 - k \\right)} + \\omega^{\\left( 7 - k \\right)} + 1 \\\\ & = 1 + \\omega^{2k} + \\omega^{3k} + \\omega^{-2k} + 1 + \\omega^k + \\omega^{-3k} + \\omega^{-k} + 1 \\\\ & = 2 + \\omega^{-3k} \\sum_{j=0}^6 \\omega^{j k} \\\\ & = 2 + \\omega^{-3k} \\frac{1 - \\omega^{7 k}}{1 - \\omega^k} \\\\ & = 2 . \\end{align*}\nThe second and the fifth equalities follow from the property that $\\omega^7 = 1$.\nTherefore,\n\\begin{align*} \\Pi_{k=0}^6 \\left( \\omega^{3k} + \\omega^k + 1 \\right) & = \\left( \\omega^{3 \\cdot 0} + \\omega^0 + 1 \\right) \\Pi_{k=1}^3 \\left( \\omega^{3k} + \\omega^k + 1 \\right) \\left( \\omega^{3\\left( 7 - k \\right)} + \\omega^{\\left( 7 - k \\right)} + 1 \\right) \\\\ & = 3 \\cdot 2^3 \\\\ & = \\boxed{\\textbf{024}}. \\end{align*}\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\nBecause the answer must be a positive integer, it is just equal to the modulus of the product. Define $z_n = \\left(\\textrm{cis }\\frac{2n\\pi}{7}\\right)^3 + \\textrm{cis }\\frac{2n\\pi}{7} + 1$.\nThen, our product is equal to\n\\[|z_0||z_1||z_2||z_3||z_4||z_5||z_6|.\\]\n$z_0 = 0$, and we may observe that $z_x$ and $z_{7-x}$ are conjugates for any $x$, meaning that their magnitudes are the same. Thus, our product is\n\\[3|z_1|^2|z_2|^2|z_3|^2\\]\n\\[= 3\\left((\\cos \\frac{6\\pi}{7} + \\cos \\frac{2\\pi}{7} + 1)^2 + (\\sin \\frac{6\\pi}{7} + \\sin \\frac{2\\pi}{7})^2\\right) \\left((\\cos \\frac{12\\pi}{7} + \\cos \\frac{4\\pi}{7} + 1)^2 + (\\sin \\frac{12\\pi}{7} + \\sin \\frac{4\\pi}{7})^2\\right) \\left((\\cos \\frac{4\\pi}{7} + \\cos \\frac{6\\pi}{7} + 1)^2 + (\\sin \\frac{4\\pi}{7} + \\sin \\frac{6\\pi}{7})^2\\right)\\]\nLet us simplify the first term. Expanding, we obtain\n\\[\\cos^2 \\frac{6\\pi}{7} + \\cos^2 \\frac{2\\pi}{7} + 1 + 2\\cos \\frac{6\\pi}{7}\\cos \\frac{2\\pi}{7} + 2\\cos \\frac{6\\pi}{7} + 2\\cos \\frac{2\\pi}{7} + \\sin^2 \\frac{6\\pi}{7} + \\sin^2 \\frac{2\\pi}{7} + 2\\sin \\frac{6\\pi}{7}\\sin \\frac{2\\pi}{7}.\\]\nRearranging and cancelling, we obtain\n\\[3 + 2\\cos \\frac{6\\pi}{7} + 2\\cos \\frac{2\\pi}{7} + 2\\cos \\frac{6\\pi}{7}\\cos \\frac{2\\pi}{7} + 2\\sin \\frac{6\\pi}{7}\\sin \\frac{2\\pi}{7}.\\]\nBy the cosine subtraction formula, we have $2\\cos \\frac{6\\pi}{7}\\cos \\frac{2\\pi}{7} + 2\\sin \\frac{6\\pi}{7}\\sin \\frac{2\\pi}{7} = \\cos \\frac{6\\pi - 2\\pi}{7} = \\cos \\frac{4\\pi}{7}$.\nThus, the first term is equivalent to \n\\[3 + 2(\\cos \\frac{2\\pi}{7} + \\cos \\frac{4\\pi}{7} + \\cos \\frac{6\\pi}{7}).\\]\nSimilarly, the second and third terms are, respectively, \n\\[3 + 2(\\cos \\frac{4\\pi}{7} + \\cos \\frac{8\\pi}{7} + \\cos \\frac{12\\pi}{7}),\\textrm{ and}\\]\n\\[3 + 2(\\cos \\frac{6\\pi}{7} + \\cos \\frac{12\\pi}{7} + \\cos \\frac{4\\pi}{7}).\\]\nNext, we have $\\cos \\frac{2\\pi}{7} + \\cos \\frac{4\\pi}{7} + \\cos \\frac{6\\pi}{7} = -\\frac{1}{2}$. This is because\n\\[\\cos \\frac{2\\pi}{7} + \\cos \\frac{4\\pi}{7} + \\cos \\frac{6\\pi}{7} = \\frac{1}{2}(\\textrm{cis }\\frac{2\\pi}{7} + \\textrm{cis }\\frac{4\\pi}{7} + \\textrm{cis }\\frac{6\\pi}{7} + \\textrm{cis }\\frac{8\\pi}{7} + \\textrm{cis }\\frac{10\\pi}{7} + \\textrm{cis }\\frac{12\\pi}{7})\\]\n\\[= \\frac{1}{2}(-1)\\]\n\\[= -\\frac{1}{2}.\\]\nTherefore, the first term is simply $2$. We have $\\cos x = \\cos 2\\pi - x$, so therefore the second and third terms can both also be simplified to $3 + 2(\\cos \\frac{2\\pi}{7} + \\cos \\frac{4\\pi}{7} + \\cos \\frac{6\\pi}{7}) = 2$. Thus, our answer is simply\n\\[3 \\cdot 2 \\cdot 2 \\cdot 2\\]\n\\[= \\boxed{\\mathbf{024}}.\\]\n~mathboy100\nWe write out the product in terms of $\\omega$:\n\\[\\prod_{k=0}^6 \\left(\\omega^{3k} + \\omega^k + 1\\right)=3(\\omega^3+\\omega+1)(\\omega^6+\\omega^2+1)(\\omega^9+\\omega^3+1)(\\omega^{12}+\\omega^4+1)(\\omega^{15}+\\omega^5+1)(\\omega^{18}+\\omega^6+1).\\]\nGrouping the terms in the following way exploits the fact that $\\omega^{7k}=1$ for an integer $k$, when multiplying out two adjacent products from left to right:\n\\[\\frac{1}{3} \\prod_{k=0}^6 \\left(\\omega^{3k} + \\omega^k + 1\\right)=(\\omega^3+\\omega+1)(\\omega^{18}+\\omega^6+1)(\\omega^6+\\omega^2+1)(\\omega^{15}+\\omega^5+1)(\\omega^9+\\omega^3+1)(\\omega^{12}+\\omega^4+1).\\]\n\nWhen multiplying two numbers with like bases, we add the exponents. We can now rewrite the exponents of each product (two at a time, where $1$ is treated as the identity) as a series of arrays: \n\\[\\textbf{(A)}\\begin{bmatrix} 3&1 &0 \\\\ 18&6&0\\\\ \\end{bmatrix}\\]\n\\[\\textbf{(B)}\\begin{bmatrix} 6&2 &0 \\\\ 15&5&0\\\\ \\end{bmatrix}\\]\n\\[\\textbf{(C)}\\begin{bmatrix} 9&3 &0 \\\\ 12&4&0\\\\ \\end{bmatrix}.\\]\n\nNote that $\\omega=e^{\\frac{2\\pi i}{7}}$. When raising $\\omega$ to a power, the numerator of the fraction is $2$ times whatever power $\\omega$ is raised to, multiplied by $\\pi i$. Since the period of $\\omega$ is $2\\pi,$ we multiply each array by $2$ then reduce each entry $\\mod{14},$ as each entry in an array represents an exponent which $\\omega$ is raised to.\n\n\\[\\textbf{(A)}\\begin{bmatrix} 6&2 &0 \\\\ 8&12&0\\\\ \\end{bmatrix}\\]\n\\[\\textbf{(B)}\\begin{bmatrix} 12&4 &0 \\\\ 2&10&0\\\\ \\end{bmatrix}\\]\n\\[\\textbf{(C)}\\begin{bmatrix} 4&6 &0 \\\\ 10&8&0\\\\ \\end{bmatrix}.\\]\nTo obtain the correct exponents, we seperately add each element of the lower row to one element of the top row. \nTherefore (after reducing $\\mod 14$ again), we get the following sets: \n\\[\\textbf{(A)}\\ \\{0, 4, 6, 10, 0, 2, 8, 12, 0\\}\\]\n\\[\\textbf{(B)}\\ \\{0, 8, 12, 6, 0, 4, 2, 10, 0\\}\\]\n\\[\\textbf{(C)}\\ \\{0, 12, 4, 2, 0, 8, 10, 8, 0\\}.\\]\nRaising $\\omega$ to the power of each element in every set then multiplying over $\\textbf{(A)}, \\textbf{(B)},$ and $\\textbf{(C)}$ yields \n\\[\\frac{1}{3} \\prod_{k=0}^6 \\left(\\omega^{3k} + \\omega^k + 1\\right)=\\left(\\sum_{a\\in \\textbf{(A)}} \\omega^a\\right)\\left(\\sum_{b\\in \\textbf{(B)}} \\omega^b\\right)\\left(\\sum_{c\\in \\textbf{(C)}} \\omega^c\\right)\\]\n\\[=\\left(\\sum_{a\\in \\textbf{(A)}} \\omega^a\\right)^3\\]\n\\[=\\left(\\omega^0+\\omega^4+\\omega^6+\\omega^{10}+\\omega^0+\\omega^2+\\omega^8+\\omega^{12}+\\omega^0\\right)^3\\]\n\\[=\\left(3+\\omega^2+\\omega^4+\\omega^6+\\omega^8+\\omega^{10}+\\omega^{12}\\right)^3,\\]\nas these sets are all identical. \nSumming as a geometric series, \n\\[\\frac{1}{3} \\prod_{k=0}^6 \\left(\\omega^{3k} + \\omega^k + 1\\right)=\\left(3+\\frac{\\omega^2(\\omega^{12}-1)}{\\omega^2-1}\\right)^3\\]\n\\[=\\left(3+\\frac{\\omega^{14}-\\omega^2}{\\omega^2-1}\\right)^3\\]\n\\[=\\left(3+\\frac{1-\\omega^2}{\\omega^2-1}\\right)^3\\]\n\\[=(3-1)^3=8.\\]\nTherefore, \n\\[\\frac{1}{3} \\prod_{k=0}^6 \\left(\\omega^{3k} + \\omega^k + 1\\right)=8,\\]\nand \n\\[\\prod_{k=0}^6 \\left(\\omega^{3k} + \\omega^k + 1\\right)=3\\cdot8=\\boxed{\\textbf{(024)}}.\\]\n-Benedict T (countmath1)\nThe product can be factored into $-(r-1)(s-1)(t-1)(r-w)(s-w)(t-w)(r-w^2)(s-w^2)(t-w^2)....(r-w^6)(s-w^6)(t-w^6)$,\n\nwhere $r,s,t$ are the roots of the polynomial $x^3+x+1=0$. \n\nThis is then $-(r^7-1)(s^7-1)(t^7-1)$ because $(r^7-1)$ and $(r-1)(r-w)(r-w^2)...(r-w^6)$ share the same roots. \n\nTo find $-(r^7-1)(s^7-1)(t^7-1)$,\n\nNotice that $(r^7-1)=(r-1)(r^6+r^5+r^4+r^3+r^2+r+1)$. Since r satisfies $x^3+x+1=0$, $r^6+r^4+r^3=0$\n\nSubstituting, you are left with $r^5+r^2+r+1$. This is $r^2(r^3+1)+r+1$, and after repeatedly substituting $r^3+x+1=0$ you are left with $-2r^3$. \n\nSo now the problem is reduced to finding $-(r-1)(s-1)(t-1)(-2r^3)(-2s^3)(-2t^3)=8(rst)^3(r-1)(s-1)(t-1)$, and vietas gives you the result of $\\boxed{24}$ -resources","answer":"024","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_8"} -{"id":59,"problem":"Circles $\\omega_1$ and $\\omega_2$ intersect at two points $P$ and $Q$, and their common tangent line closer to $P$ intersects $\\omega_1$ and $\\omega_2$ at points $A$ and $B$, respectively. The line parallel to $AB$ that passes through $P$ intersects $\\omega_1$ and $\\omega_2$ for the second time at points $X$ and $Y$, respectively. Suppose $PX=10,$ $PY=14,$ and $PQ=5.$ Then the area of trapezoid $XABY$ is $m\\sqrt{n},$ where $m$ and $n$ are positive integers and $n$ is not divisible by the square of any prime. Find $m+n.$","solution":"Denote by $O_1$ and $O_2$ the centers of $\\omega_1$ and $\\omega_2$, respectively.\nLet $XY$ and $AO_1$ intersect at point $C$.\nLet $XY$ and $BO_2$ intersect at point $D$.\nBecause $AB$ is tangent to circle $\\omega_1$, $O_1 A \\perp AB$.\nBecause $XY \\parallel AB$, $O_1 A \\perp XY$.\nBecause $X$ and $P$ are on $\\omega_1$, $O_1A$ is the perpendicular bisector of $XY$.\nThus, $PC = \\frac{PX}{2} = 5$.\nAnalogously, we can show that $PD = \\frac{PY}{2} = 7$.\nThus, $CD = CP + PD = 12$.\nBecause $O_1 A \\perp CD$, $O_1 A \\perp AB$, $O_2 B \\perp CD$, $O_2 B \\perp AB$, $ABDC$ is a rectangle. Hence, $AB = CD = 12$.\nLet $QP$ and $AB$ meet at point $M$.\nThus, $M$ is the midpoint of $AB$.\nThus, $AM = \\frac{AB}{2} = 6$. This is the case because $PQ$ is the radical axis of the two circles, and the powers with respect to each circle must be equal.\nIn $\\omega_1$, for the tangent $MA$ and the secant $MPQ$, following from the power of a point, we have $MA^2 = MP \\cdot MQ$.\nBy solving this equation, we get $MP = 4$.\nWe notice that $AMPC$ is a right trapezoid. \nHence,\n\\begin{align*} AC & = \\sqrt{MP^2 - \\left( AM - CP \\right)^2} \\\\ & = \\sqrt{15} . \\end{align*}\nTherefore,\n\\begin{align*} [XABY] & = \\frac{1}{2} \\left( AB + XY \\right) AC \\\\ & = \\frac{1}{2} \\left( 12 + 24 \\right) \\sqrt{15} \\\\ & = 18 \\sqrt{15}. \\end{align*}\nTherefore, the answer is $18 + 15 = \\boxed{\\textbf{(033)}}$.\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\n~Mathkiddie\nNotice that line $\\overline{PQ}$ is the [radical axis](https:\/\/artofproblemsolving.com\/wiki\/index.php\/Radical_axis) of circles $\\omega_1$ and $\\omega_2$. By the radical axis theorem, we know that the tangents of any point on line $\\overline{PQ}$ to circles $\\omega_1$ and $\\omega_2$ are equal. Therefore, line $\\overline{PQ}$ must pass through the midpoint of $\\overline{AB}$, call this point M. In addition, we know that $AM=MB=6$ by circle properties and midpoint definition.\nThen, by Power of Point,\n\\begin{align*} AM^2&=MP*MQ \\\\ 36&=MP(MP+5) \\\\ MP&=4 \\\\ \\end{align*}\nCall the intersection point of line $\\overline{A\\omega_1}$ and $\\overline{XY}$ be C, and the intersection point of line $\\overline{B\\omega_2}$ and $\\overline{XY}$ be D. $ABCD$ is a rectangle with segment $MP=4$ drawn through it so that $AM=MB=6$, $CP=5$, and $PD=7$. Dropping the altitude from $M$ to $\\overline{XY}$, we get that the height of trapezoid $XABY$ is $\\sqrt{15}$. Therefore the area of trapezoid $XABY$ is\n\\begin{align*} \\frac{1}{2}\\cdot(12+24)\\cdot(\\sqrt{15})=18\\sqrt{15} \\end{align*}\nGiving us an answer of $\\boxed{033}$.\n~[Danielzh](https:\/\/artofproblemsolving.com\/wiki\/index.php\/Daniel_Zhou%27s_Profile)","answer":"033","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_9"} +{"id":59,"problem":"Circles $\\omega_1$ and $\\omega_2$ intersect at two points $P$ and $Q$, and their common tangent line closer to $P$ intersects $\\omega_1$ and $\\omega_2$ at points $A$ and $B$, respectively. The line parallel to $AB$ that passes through $P$ intersects $\\omega_1$ and $\\omega_2$ for the second time at points $X$ and $Y$, respectively. Suppose $PX=10,$ $PY=14,$ and $PQ=5.$ Then the area of trapezoid $XABY$ is $m\\sqrt{n},$ where $m$ and $n$ are positive integers and $n$ is not divisible by the square of any prime. Find $m+n$.","solution":"Denote by $O_1$ and $O_2$ the centers of $\\omega_1$ and $\\omega_2$, respectively.\nLet $XY$ and $AO_1$ intersect at point $C$.\nLet $XY$ and $BO_2$ intersect at point $D$.\nBecause $AB$ is tangent to circle $\\omega_1$, $O_1 A \\perp AB$.\nBecause $XY \\parallel AB$, $O_1 A \\perp XY$.\nBecause $X$ and $P$ are on $\\omega_1$, $O_1A$ is the perpendicular bisector of $XY$.\nThus, $PC = \\frac{PX}{2} = 5$.\nAnalogously, we can show that $PD = \\frac{PY}{2} = 7$.\nThus, $CD = CP + PD = 12$.\nBecause $O_1 A \\perp CD$, $O_1 A \\perp AB$, $O_2 B \\perp CD$, $O_2 B \\perp AB$, $ABDC$ is a rectangle. Hence, $AB = CD = 12$.\nLet $QP$ and $AB$ meet at point $M$.\nThus, $M$ is the midpoint of $AB$.\nThus, $AM = \\frac{AB}{2} = 6$. This is the case because $PQ$ is the radical axis of the two circles, and the powers with respect to each circle must be equal.\nIn $\\omega_1$, for the tangent $MA$ and the secant $MPQ$, following from the power of a point, we have $MA^2 = MP \\cdot MQ$.\nBy solving this equation, we get $MP = 4$.\nWe notice that $AMPC$ is a right trapezoid. \nHence,\n\\begin{align*} AC & = \\sqrt{MP^2 - \\left( AM - CP \\right)^2} \\\\ & = \\sqrt{15} . \\end{align*}\nTherefore,\n\\begin{align*} [XABY] & = \\frac{1}{2} \\left( AB + XY \\right) AC \\\\ & = \\frac{1}{2} \\left( 12 + 24 \\right) \\sqrt{15} \\\\ & = 18 \\sqrt{15}. \\end{align*}\nTherefore, the answer is $18 + 15 = \\boxed{\\textbf{(033)}}$.\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)\n~Mathkiddie\nNotice that line $\\overline{PQ}$ is the [radical axis](https:\/\/artofproblemsolving.com\/wiki\/index.php\/Radical_axis) of circles $\\omega_1$ and $\\omega_2$. By the radical axis theorem, we know that the tangents of any point on line $\\overline{PQ}$ to circles $\\omega_1$ and $\\omega_2$ are equal. Therefore, line $\\overline{PQ}$ must pass through the midpoint of $\\overline{AB}$, call this point M. In addition, we know that $AM=MB=6$ by circle properties and midpoint definition.\nThen, by Power of Point,\n\\begin{align*} AM^2&=MP*MQ \\\\ 36&=MP(MP+5) \\\\ MP&=4 \\\\ \\end{align*}\nCall the intersection point of line $\\overline{A\\omega_1}$ and $\\overline{XY}$ be C, and the intersection point of line $\\overline{B\\omega_2}$ and $\\overline{XY}$ be D. $ABCD$ is a rectangle with segment $MP=4$ drawn through it so that $AM=MB=6$, $CP=5$, and $PD=7$. Dropping the altitude from $M$ to $\\overline{XY}$, we get that the height of trapezoid $XABY$ is $\\sqrt{15}$. Therefore the area of trapezoid $XABY$ is\n\\begin{align*} \\frac{1}{2}\\cdot(12+24)\\cdot(\\sqrt{15})=18\\sqrt{15} \\end{align*}\nGiving us an answer of $\\boxed{033}$.\n~[Danielzh](https:\/\/artofproblemsolving.com\/wiki\/index.php\/Daniel_Zhou%27s_Profile)","answer":"033","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2023_AIME_II_Problems\/Problem_9"} {"id":60,"problem":"Every morning Aya goes for a $9$-kilometer-long walk and stops at a coffee shop afterwards. When she walks at a constant speed of $s$ kilometers per hour, the walk takes her 4 hours, including $t$ minutes spent in the coffee shop. When she walks $s+2$ kilometers per hour, the walk takes her 2 hours and 24 minutes, including $t$ minutes spent in the coffee shop. Suppose Aya walks at $s+\\frac{1}{2}$ kilometers per hour. Find the number of minutes the walk takes her, including the $t$ minutes spent in the coffee shop.","solution":"$\\frac{9}{s} + t = 4$ in hours and $\\frac{9}{s+2} + t = 2.4$ in hours.\nSubtracting the second equation from the first, we get, \n$\\frac{9}{s} - \\frac{9}{s+2} = 1.6$\nMultiplying by $(s)(s+2)$, we get \n$9s+18-9s=18=1.6s^{2} + 3.2s$\nMultiplying by 5\/2 on both sides, we get\n$0 = 4s^{2} + 8s - 45$\nFactoring gives us \n$(2s-5)(2s+9) = 0$, of which the solution we want is $s=2.5$.\nSubstituting this back to the first equation, we can find that $t = 0.4$ hours.\nLastly, $s + \\frac{1}{2} = 3$ kilometers per hour, so\n$\\frac{9}{3} + 0.4 = 3.4$ hours, or $\\framebox{204}$ minutes\n-Failure.net\nThe amount of hours spent while walking on the first travel is $\\frac{240-t}{6}$. Thus, we have the equation $(240-t)(s) = 540$, and by the same logic, the second equation yields $(144-t)(s+2) = 540$. We have $240s-st = 540$, and $288+144s-2t-st = 540$. We subtract the two equations to get $96s+2t-288 = 0$, so we have $48s+t = 144$, so $t = 144-48s$, and now we have $(96+48s)(s) = 540$. The numerator of $s$ must evenly divide 540, however, $s$ must be less than 3. We can guess that $s = 2.5$. Now, $2.5+0.5 = 3$. Taking $\\frac{9}{3} = 3$, we find that it will take three hours for the 9 kilometers to be traveled. The t minutes spent at the coffeeshop can be written as $144-48(2.5)$, so t = 24. $180 + 24 = 204$. -sepehr2010","answer":"204","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2024_AIME_I_Problems\/Problem_1"} {"id":61,"problem":"Let $ABC$ be a triangle inscribed in circle $\\omega$. Let the tangents to $\\omega$ at $B$ and $C$ intersect at point $D$, and let $\\overline{AD}$ intersect $\\omega$ at $P$. If $AB=5$, $BC=9$, and $AC=10$, $AP$ can be written as the form $\\frac{m}{n}$, where $m$ and $n$ are relatively prime integers. Find $m + n$.\n[asy] import olympiad; unitsize(15); pair A, B, C, D, E, F, P, O; C = origin; A = (10,0); B = (7.8, 4.4899); draw(A--B--C--cycle); draw(A..B..C..cycle, red+dotted); O = circumcenter(A, B, C); E = rotate(90,B) * (O); F = rotate(90,C) * (O); D = IP(B..E + (B-E)*4, C..F + (C-F)*-3); draw(B--D--C--D--A); P = IP(D..A, A..B..C); dot(A); dot(B); dot(C); dot(D); dot(P); label(\"$A$\", A, dir(335)); label(\"$B$\", B, dir(65)); label(\"$C$\", C, dir(200)); label(\"$D$\", D, dir(135)); label(\"$P$\", P, dir(235)); [\/asy]","solution":"From the tangency condition we have $\\let\\angle BCD = \\let\\angle CBD = \\let\\angle A$. With LoC we have $\\cos(A) = \\frac{25+100-81}{2*5*10} = \\frac{11}{25}$ and $\\cos(B) = \\frac{81+25-100}{2*9*5} = \\frac{1}{15}$. Then, $CD = \\frac{\\frac{9}{2}}{\\cos(A)} = \\frac{225}{22}$. Using LoC we can find $AD$: $AD^2 = AC^2 + CD^2 - 2(AC)(CD)\\cos(A+C) = 10^2+(\\frac{225}{22})^2 + 2(10)\\frac{225}{22}\\cos(B) = 100 + \\frac{225^2}{22^2} + 2(10)\\frac{225}{22}*\\frac{1}{15} = \\frac{5^4*13^2}{484}$. Thus, $AD = \\frac{5^2*13}{22}$. By Power of a Point, $DP*AD = CD^2$ so $DP*\\frac{5^2*13}{22} = (\\frac{225}{22})^2$ which gives $DP = \\frac{5^2*9^2}{13*22}$. Finally, we have $AP = AD - DP = \\frac{5^2*13}{22} - \\frac{5^2*9^2}{13*22} = \\frac{100}{13} \\rightarrow \\boxed{113}$.\n~angie.\nWe know $AP$ is the symmedian, which implies $\\triangle{ABP}\\sim \\triangle{AMC}$ where $M$ is the midpoint of $BC$. By Appolonius theorem, $AM=\\frac{13}{2}$. Thus, we have $\\frac{AP}{AC}=\\frac{AB}{AM}, AP=\\frac{100}{13}\\implies \\boxed{113}$\n~Bluesoul\nExtend sides $\\overline{AB}$ and $\\overline{AC}$ to points $E$ and $F$, respectively, such that $B$ and $C$ are the feet of the altitudes in $\\triangle AEF$. Denote the feet of the altitude from $A$ to $\\overline{EF}$ as $X$, and let $H$ denote the orthocenter of $\\triangle AEF$. Call $M$ the midpoint of segment $\\overline{EF}$. By the Three Tangents Lemma, we have that $MB$ and $MC$ are both tangents to $(ABC)$ $\\implies$ $M = D$, and since $M$ is the midpoint of $\\overline{EF}$, $MF = MB$. Additionally, by angle chasing, we get that: \n\\[\\angle ABC \\cong \\angle AHC \\cong \\angle EHX\\]\nAlso, \n\\[\\angle EHX = 90 ^\\circ - \\angle HEF = 90 ^\\circ - (90 ^\\circ - \\angle AFE) = \\angle AFE\\] \nFurthermore, \n\\[AB = AF \\cdot \\cos(A)\\]\nFrom this, we see that $\\triangle ABC \\sim \\triangle AFE$ with a scale factor of $\\cos(A)$. By the Law of Cosines, \n\\[\\cos(A) = \\frac{10^2 + 5^2 - 9^2}{2 \\cdot 10 \\cdot 5} = \\frac{11}{25}\\] \nThus, we can find that the side lengths of $\\triangle AEF$ are $\\frac{250}{11}, \\frac{125}{11}, \\frac{225}{11}$. Then, by Stewart's theorem, $AM = \\frac{13 \\cdot 25}{22}$. By Power of a Point, \n\\[\\overline{MB} \\cdot \\overline{MB} = \\overline{MA} \\cdot \\overline{MP}\\]\n\\[\\frac{225}{22} \\cdot \\frac{225}{22} = \\overline{MP} \\cdot \\frac{13 \\cdot 25}{22} \\implies \\overline{MP} = \\frac{225 \\cdot 9}{22 \\cdot 13}\\]\nThus, \n\\[AP = AM - MP = \\frac{13 \\cdot 25}{22} - \\frac{225 \\cdot 9}{22 \\cdot 13} = \\frac{100}{13}\\]\nTherefore, the answer is $\\boxed{113}$.\n~mathwiz_1207\nConnect lines $\\overline{PB}$ and $\\overline{PC}$. From the angle by tanget formula, we have $\\angle PBD = \\angle DAB$. Therefore by AA similarity, $\\triangle PBD \\sim \\triangle BAD$. Let $\\overline{BP} = x$. Using ratios, we have \\[\\frac{x}{5}=\\frac{BD}{AD}.\\] Similarly, using angle by tangent, we have $\\angle PCD = \\angle DAC$, and by AA similarity, $\\triangle CPD \\sim \\triangle ACD$. By ratios, we have \\[\\frac{PC}{10}=\\frac{CD}{AD}.\\] However, because $\\overline{BD}=\\overline{CD}$, we have \\[\\frac{x}{5}=\\frac{PC}{10},\\] so $\\overline{PC}=2x.$ Now using Law of Cosines on $\\angle BAC$ in triangle $\\triangle ABC$, we have \\[9^2=5^2+10^2-100\\cos(\\angle BAC).\\] Solving, we find $\\cos(\\angle BAC)=\\frac{11}{25}$. Now we can solve for $x$. Using Law of Cosines on $\\triangle BPC,$ we have \n\\begin{align*}\n81&=x^2+4x^2-4x^2\\cos(180-\\angle BAC) \\\\ \n&= 5x^2+4x^2\\cos(BAC). \\\\\n\\end{align*}\nSolving, we get $x=\\frac{45}{13}.$ Now we have a system of equations using Law of Cosines on $\\triangle BPA$ and $\\triangle CPA$, \\[AP^2=5^2+\\left(\\frac{45}{13}\\right)^2 -(10) \\left(\\frac{45}{13} \\right)\\cos(ABP)\\]\n\\[AP^2=10^2+4 \\left(\\frac{45}{13} \\right)^2 + (40) \\left(\\frac{45}{13} \\right)\\cos(ABP).\\]\nSolving, we find $\\overline{AP}=\\frac{100}{13}$, so our desired answer is $100+13=\\boxed{113}$.\n~evanhliu2009\nFollowing from the law of cosines, we can easily get $\\cos A = \\frac{11}{25}$, $\\cos B = \\frac{1}{15}$, $\\cos C = \\frac{13}{15}$.\nHence, $\\sin A = \\frac{6 \\sqrt{14}}{25}$, $\\cos 2C = \\frac{113}{225}$, $\\sin 2C = \\frac{52 \\sqrt{14}}{225}$.\nThus, $\\cos \\left( A + 2C \\right) = - \\frac{5}{9}$.\nDenote by $R$ the circumradius of $\\triangle ABC$.\nIn $\\triangle ABC$, following from the law of sines, we have $R = \\frac{BC}{2 \\sin A} = \\frac{75}{4 \\sqrt{14}}$.\nBecause $BD$ and $CD$ are tangents to the circumcircle $ABC$, $\\triangle OBD \\cong \\triangle OCD$ and $\\angle OBD = 90^\\circ$.\nThus, $OD = \\frac{OB}{\\cos \\angle BOD} = \\frac{R}{\\cos A}$.\nIn $\\triangle AOD$, we have $OA = R$ and $\\angle AOD = \\angle BOD + \\angle AOB = A + 2C$.\nThus, following from the law of cosines, we have\n\\begin{align*}\nAD & = \\sqrt{OA^2 + OD^2 - 2 OA \\cdot OD \\cos \\angle AOD} \\\\\n& = \\frac{26 \\sqrt{14}}{33} R.\n\\end{align*}\n\nFollowing from the law of cosines,\n\\begin{align*}\n\\cos \\angle OAD & = \\frac{AD^2 + OA^2 - OD^2}{2 AD \\cdot OA} \\\\\n& = \\frac{8 \\sqrt{14}}{39} .\n\\end{align*}\n\nTherefore,\n\\begin{align*}\nAP & = 2 OA \\cos \\angle OAD \\\\\n& = \\frac{100}{13} .\n\\end{align*}\n\nTherefore, the answer is $100 + 13 = \\boxed{\\textbf{(113) }}$.\n~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)","answer":"113","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2024_AIME_I_Problems\/Problem_10"} {"id":62,"problem":"Each vertex of a regular octagon is independently colored either red or blue with equal probability. The probability that the octagon can then be rotated so that all of the blue vertices end up at positions where there were originally red vertices is $\\tfrac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. What is $m+n$?","solution":"Notice that the question's condition mandates all blues to go to reds, but reds do not necessarily have to go to blue. Let us do casework on how many blues there are. \nIf there are no blues whatsoever, there is only one case. This case is valid, as all of the (zero) blues have gone to reds. (One could also view it as: the location of all the blues now were not previously red.) Thus, we have $1$. \nIf there is a single blue somewhere, there are $8$ cases - where can the blue be? Each of these is valid. \nIf there are two blues, again, every case is valid, and there are $\\dbinom82=28$ cases. \nIf there are three blues, every case is again valid; there are $\\dbinom83=56$ such cases. \nThe case with four blues is trickier. Let us look at all possible subcases. \nIf all four are adjacent (as in the diagram below), it is obvious: we can simply reverse the diagram (rotate it by $4$ units) to achieve the problem's condition. There are $8$ possible ways to have $4$ adjacent blues, so this subcase contributes $8$. \n[asy] import graph; void oct11(int[] pts) { pair[] vertices = {(0,0),(1,0),(1.707,0.707),(1.707,1.707),(1,2.414),(0,2.414),(-0.707,1.707),(-0.707,0.707)}; draw((0,0)--(1,0)--(1.707,0.707)--(1.707,1.707)--(1,2.414)--(0,2.414)--(-0.707,1.707)--(-0.707,0.707)--cycle); for (int i = 0; i < 8; i+=1) { if (pts[i] == 0) { dot(vertices[i], blue); } if (pts[i] == 1) { dot(vertices[i], red); } } }; int[] sus = {0,0,0,0,1,1,1,1}; oct11(sus); [\/asy]\nIf three are adjacent and one is one away (as shown in the diagram below), we can not rotate the diagram to satisfy the question. This subcase does not work. \n[asy] import graph; void oct11(int[] pts) { pair[] vertices = {(0,0),(1,0),(1.707,0.707),(1.707,1.707),(1,2.414),(0,2.414),(-0.707,1.707),(-0.707,0.707)}; draw((0,0)--(1,0)--(1.707,0.707)--(1.707,1.707)--(1,2.414)--(0,2.414)--(-0.707,1.707)--(-0.707,0.707)--cycle); for (int i = 0; i < 8; i+=1) { if (pts[i] == 0) { dot(vertices[i], blue); } if (pts[i] == 1) { dot(vertices[i], red); } } }; int[] sus = {0,0,0,1,0,1,1,1}; oct11(sus); [\/asy]\nIf three are adjacent and one is two away, obviously it is not possible as there is nowhere for the three adjacent blues to go. \n[asy] import graph; void oct11(int[] pts) { pair[] vertices = {(0,0),(1,0),(1.707,0.707),(1.707,1.707),(1,2.414),(0,2.414),(-0.707,1.707),(-0.707,0.707)}; draw((0,0)--(1,0)--(1.707,0.707)--(1.707,1.707)--(1,2.414)--(0,2.414)--(-0.707,1.707)--(-0.707,0.707)--cycle); for (int i = 0; i < 8; i+=1) { if (pts[i] == 0) { dot(vertices[i], blue); } if (pts[i] == 1) { dot(vertices[i], red); } } }; int[] sus = {0,0,0,1,1,0,1,1}; oct11(sus); [\/asy]\nIf there are two adjacent pairs that are $1$ apart, it is not possible since we do not have anywhere to put the two pairs. \n[asy] import graph; void oct11(int[] pts) { pair[] vertices = {(0,0),(1,0),(1.707,0.707),(1.707,1.707),(1,2.414),(0,2.414),(-0.707,1.707),(-0.707,0.707)}; draw((0,0)--(1,0)--(1.707,0.707)--(1.707,1.707)--(1,2.414)--(0,2.414)--(-0.707,1.707)--(-0.707,0.707)--cycle); for (int i = 0; i < 8; i+=1) { if (pts[i] == 0) { dot(vertices[i], blue); } if (pts[i] == 1) { dot(vertices[i], red); } } }; int[] sus = {0,0,1,0,0,1,1,1}; oct11(sus); [\/asy]\nIf there are two adjacent pairs that are $2$ apart, all of these cases are possible as we can rotate the diagram by $2$ vertices to work. There are $4$ of these cases. \n[asy] import graph; void oct11(int[] pts) { pair[] vertices = {(0,0),(1,0),(1.707,0.707),(1.707,1.707),(1,2.414),(0,2.414),(-0.707,1.707),(-0.707,0.707)}; draw((0,0)--(1,0)--(1.707,0.707)--(1.707,1.707)--(1,2.414)--(0,2.414)--(-0.707,1.707)--(-0.707,0.707)--cycle); for (int i = 0; i < 8; i+=1) { if (pts[i] == 0) { dot(vertices[i], blue); } if (pts[i] == 1) { dot(vertices[i], red); } } }; int[] sus = {0,0,1,1,0,0,1,1}; oct11(sus); [\/asy]\nIf there is one adjacent pair and there are two separate ones each a distance of $1$ from the other, this case does not work. \n[asy] import graph; void oct11(int[] pts) { pair[] vertices = {(0,0),(1,0),(1.707,0.707),(1.707,1.707),(1,2.414),(0,2.414),(-0.707,1.707),(-0.707,0.707)}; draw((0,0)--(1,0)--(1.707,0.707)--(1.707,1.707)--(1,2.414)--(0,2.414)--(-0.707,1.707)--(-0.707,0.707)--cycle); for (int i = 0; i < 8; i+=1) { if (pts[i] == 0) { dot(vertices[i], blue); } if (pts[i] == 1) { dot(vertices[i], red); } } }; int[] sus = {0,0,1,0,1,0,1,1}; oct11(sus); [\/asy]\nIf we have one adjacent pair and two separate ones that are $2$ away from each other, we can flip the diagram by $4$ vertices. There are $8$ of these cases. \n[asy] import graph; void oct11(int[] pts) { pair[] vertices = {(0,0),(1,0),(1.707,0.707),(1.707,1.707),(1,2.414),(0,2.414),(-0.707,1.707),(-0.707,0.707)}; draw((0,0)--(1,0)--(1.707,0.707)--(1.707,1.707)--(1,2.414)--(0,2.414)--(-0.707,1.707)--(-0.707,0.707)--cycle); for (int i = 0; i < 8; i+=1) { if (pts[i] == 0) { dot(vertices[i], blue); } if (pts[i] == 1) { dot(vertices[i], red); } } }; int[] sus = {0,0,1,0,1,1,0,1}; oct11(sus); [\/asy]\nFinally, if the red and blues alternate, we can simply shift the diagram by a single vertex to satisfy the question. Thus, all of these cases work, and we have $2$ subcases. \nThere can not be more than $4$ blues, so we are done. \nOur total is $1+8+28+56+8+4+8+2=115$. There are $2^8=256$ possible colorings, so we have $\\dfrac{115}{256}$ and our answer is $115+256=\\boxed{371}$.\n~Technodoggo\nLet $r$ be the number of red vertices and $b$ be the number of blue vertices, where $r+b=8$. By the Pigeonhole Principle, $r\\geq{b} \\Longrightarrow b\\leq4$ if a configuration is valid.\nWe claim that if $b\\leq3$, then any configuration is valid. We attempt to prove by the following:\nIf there are \\[b\\in{0,1,2}\\] vertices, then intuitively any configuration is valid. For $b=3$, we do cases:\nIf all the vertices in $b$ are non-adjacent, then simply rotating once in any direction suffices. If there are $2$ adjacent vertices, then WLOG let us create a set $\\{b_1,b_2,r_1\\cdots\\}$ where the third $b_3$ is somewhere later in the set. If we assign the set as $\\{1,2,3,4,5,6,7,8\\}$ and $b_3\\leq4$, then intuitively, rotating it $4$ will suffice. If $b_3=5$, then rotating it by 2 will suffice. Consider any other $b_3>5$ as simply a mirror to a configuration of the cases.\nTherefore, if $b\\leq3$, then there are $\\sum_{i=0}^{3}{\\binom{8}{i}}=93$ ways. We do count the [i]degenerate[\/i] case.\nNow if $b=4$, we do casework on the number of adjacent vertices.\n0 adjacent: $\\{b_1,r_1,b_2,r_2\\cdots{r_4}\\}$. There are 4 axes of symmetry so there are only $\\frac{8}{4}=2$ rotations of this configuration.\n1 adjacent: WLOG $\\{b_1,b_2\\cdots{b_3}\\cdots{b_4}\\}$ where $b_4\\neq{8}$. Listing out the cases and trying, we get that $b_3=4$ and $b_4=7$ is the only configuration. There are $8$ ways to choose $b_1$ and $b_2$ and the rest is set, so there are $8$ ways.\n2 adjacent: We can have WLOG $\\{b_1,b_2\\cdots{b_3},b_4\\}$ or $\\{b_1,b_2,b_3\\cdots\\}$ where $b_4\\neq{8}$. The former yields the case $b_3=5$ and $b_4=6$ by simply rotating it 2 times. The latter yields none. There are 2 axes of symmetry so there are $\\frac{8}{2}=4$ configurations.\n3 adjacent: WLOG $\\{b_1,b_2,b_3,b_4\\cdots\\}$ which intuitively works. There are $8$ configurations here as $b_1$ can is unique.\nIn total, $b=4$ yields $2+8+4+8=22$ configurations.\nThere are $22+93=115$ configurations in total. There are $2^8=256$ total cases, so the probability is $\\frac{115}{256}$. Adding them up, we get $115+256=\\boxed{371}$.","answer":"371","url":"https:\/\/artofproblemsolving.com\/wiki\/index.php\/2024_AIME_I_Problems\/Problem_11"}