id
int32
title
string
problem
string
question_latex
string
question_html
string
numerical_answer
string
pub_date
string
solved_by
string
diff_rate
string
difficulty
string
879
Touch-screen Password
A touch-screen device can be unlocked with a "password" consisting of a sequence of two or more distinct spots that the user selects from a rectangular grid of spots on the screen. The user enters their sequence by touching the first spot, then tracing a straight line segment to the next spot, and so on until the end of the sequence. The user's finger remains in contact with the screen throughout, and may only move in straight line segments from spot to spot. If the finger traces a straight line that passes over an intermediate spot, then that is treated as two line segments with the intermediate spot included in the password sequence. For example, on a $3\times 3$ grid labelled with digits $1$ to $9$ (shown below), tracing $1-9$ is interpreted as $1-5-9$. Once a spot has been selected it disappears from the screen. Thereafter, the spot may not be used as an endpoint of future line segments, and it is ignored by any future line segments which happen to pass through it. For example, tracing $1-9-3-7$ (which crosses the $5$ spot twice) will give the password $1-5-9-6-3-7$. There are $389488$ different passwords that can be formed on a $3 \times 3$ grid. Find the number of different passwords that can be formed on a $4 \times 4$ grid.
A touch-screen device can be unlocked with a "password" consisting of a sequence of two or more distinct spots that the user selects from a rectangular grid of spots on the screen. The user enters their sequence by touching the first spot, then tracing a straight line segment to the next spot, and so on until the end of the sequence. The user's finger remains in contact with the screen throughout, and may only move in straight line segments from spot to spot. If the finger traces a straight line that passes over an intermediate spot, then that is treated as two line segments with the intermediate spot included in the password sequence. For example, on a $3\times 3$ grid labelled with digits $1$ to $9$ (shown below), tracing $1-9$ is interpreted as $1-5-9$. Once a spot has been selected it disappears from the screen. Thereafter, the spot may not be used as an endpoint of future line segments, and it is ignored by any future line segments which happen to pass through it. For example, tracing $1-9-3-7$ (which crosses the $5$ spot twice) will give the password $1-5-9-6-3-7$. There are $389488$ different passwords that can be formed on a $3 \times 3$ grid. Find the number of different passwords that can be formed on a $4 \times 4$ grid.
<p>A touch-screen device can be unlocked with a "password" consisting of a sequence of two or more distinct spots that the user selects from a rectangular grid of spots on the screen. The user enters their sequence by touching the first spot, then tracing a straight line segment to the next spot, and so on until the end of the sequence. The user's finger remains in contact with the screen throughout, and may only move in straight line segments from spot to spot.</p> <p>If the finger traces a straight line that passes over an intermediate spot, then that is treated as two line segments with the intermediate spot included in the password sequence. For example, on a $3\times 3$ grid labelled with digits $1$ to $9$ (shown below), tracing $1-9$ is interpreted as $1-5-9$.</p> <p>Once a spot has been selected it disappears from the screen. Thereafter, the spot may not be used as an endpoint of future line segments, and it is ignored by any future line segments which happen to pass through it. For example, tracing $1-9-3-7$ (which crosses the $5$ spot twice) will give the password $1-5-9-6-3-7$.</p> <img alt="1-5-9-6-3-7 example" src="resources/images/0879_touchscreen_159637.png?1707555645"/> <p>There are $389488$ different passwords that can be formed on a $3 \times 3$ grid.</p> <p>Find the number of different passwords that can be formed on a $4 \times 4$ grid.</p>
4350069824940
Saturday, 24th February 2024, 04:00 pm
439
25%
easy
547
Distance of Random Points Within Hollow Square Laminae
Assuming that two points are chosen randomly (with uniform distribution) within a rectangle, it is possible to determine the expected value of the distance between these two points. For example, the expected distance between two random points in a unit square is about $0.521405$, while the expected distance between two random points in a rectangle with side lengths $2$ and $3$ is about $1.317067$. Now we define a hollow square lamina of size $n$ to be an integer sized square with side length $n \ge 3$ consisting of $n^2$ unit squares from which a rectangle consisting of $x \times y$ unit squares ($1 \le x,y \le n - 2$) within the original square has been removed. For $n = 3$ there exists only one hollow square lamina: For $n = 4$ you can find $9$ distinct hollow square laminae, allowing shapes to reappear in rotated or mirrored form: Let $S(n)$ be the sum of the expected distance between two points chosen randomly within each of the possible hollow square laminae of size $n$. The two points have to lie within the area left after removing the inner rectangle, i.e. the gray-colored areas in the illustrations above. For example, $S(3) = 1.6514$ and $S(4) = 19.6564$, rounded to four digits after the decimal point. Find $S(40)$ rounded to four digits after the decimal point.
Assuming that two points are chosen randomly (with uniform distribution) within a rectangle, it is possible to determine the expected value of the distance between these two points. For example, the expected distance between two random points in a unit square is about $0.521405$, while the expected distance between two random points in a rectangle with side lengths $2$ and $3$ is about $1.317067$. Now we define a hollow square lamina of size $n$ to be an integer sized square with side length $n \ge 3$ consisting of $n^2$ unit squares from which a rectangle consisting of $x \times y$ unit squares ($1 \le x,y \le n - 2$) within the original square has been removed. For $n = 3$ there exists only one hollow square lamina: For $n = 4$ you can find $9$ distinct hollow square laminae, allowing shapes to reappear in rotated or mirrored form: Let $S(n)$ be the sum of the expected distance between two points chosen randomly within each of the possible hollow square laminae of size $n$. The two points have to lie within the area left after removing the inner rectangle, i.e. the gray-colored areas in the illustrations above. For example, $S(3) = 1.6514$ and $S(4) = 19.6564$, rounded to four digits after the decimal point. Find $S(40)$ rounded to four digits after the decimal point.
<p>Assuming that two points are chosen randomly (with <strong>uniform distribution</strong>) within a rectangle, it is possible to determine the <strong>expected value</strong> of the distance between these two points.</p> <p>For example, the expected distance between two random points in a unit square is about $0.521405$, while the expected distance between two random points in a rectangle with side lengths $2$ and $3$ is about $1.317067$.</p> <p>Now we define a <dfn>hollow square lamina</dfn> of size $n$ to be an integer sized square with side length $n \ge 3$ consisting of $n^2$ unit squares from which a rectangle consisting of $x \times y$ unit squares ($1 \le x,y \le n - 2$) within the original square has been removed.</p> <p>For $n = 3$ there exists only one hollow square lamina:</p> <p align="center"><img alt="0547-holes-1.png" src="resources/images/0547-holes-1.png?1678992053"/></p> <p>For $n = 4$ you can find $9$ distinct hollow square laminae, allowing shapes to reappear in rotated or mirrored form:</p> <p align="center"><img alt="0547-holes-2.png" src="resources/images/0547-holes-2.png?1678992053"/></p> <p>Let $S(n)$ be the sum of the expected distance between two points chosen randomly within each of the possible hollow square laminae of size $n$. The two points have to lie within the area left after removing the inner rectangle, i.e. the gray-colored areas in the illustrations above.</p> <p>For example, $S(3) = 1.6514$ and $S(4) = 19.6564$, rounded to four digits after the decimal point.</p> <p>Find $S(40)$ rounded to four digits after the decimal point.</p>
11730879.0023
Sunday, 14th February 2016, 04:00 am
250
70%
hard
352
Blood Tests
Each one of the $25$ sheep in a flock must be tested for a rare virus, known to affect $2\%$ of the sheep population. An accurate and extremely sensitive PCR test exists for blood samples, producing a clear positive / negative result, but it is very time-consuming and expensive. Because of the high cost, the vet-in-charge suggests that instead of performing $25$ separate tests, the following procedure can be used instead: The sheep are split into $5$ groups of $5$ sheep in each group. For each group, the $5$ samples are mixed together and a single test is performed. Then, If the result is negative, all the sheep in that group are deemed to be virus-free. If the result is positive, $5$ additional tests will be performed (a separate test for each animal) to determine the affected individual(s). Since the probability of infection for any specific animal is only $0.02$, the first test (on the pooled samples) for each group will be: Negative (and no more tests needed) with probability $0.98^5 = 0.9039207968$. Positive ($5$ additional tests needed) with probability $1 - 0.9039207968 = 0.0960792032$. Thus, the expected number of tests for each group is $1 + 0.0960792032 \times 5 = 1.480396016$. Consequently, all $5$ groups can be screened using an average of only $1.480396016 \times 5 = \mathbf{7.40198008}$ tests, which represents a huge saving of more than $70\%$! Although the scheme we have just described seems to be very efficient, it can still be improved considerably (always assuming that the test is sufficiently sensitive and that there are no adverse effects caused by mixing different samples). E.g.: We may start by running a test on a mixture of all the $25$ samples. It can be verified that in about $60.35\%$ of the cases this test will be negative, thus no more tests will be needed. Further testing will only be required for the remaining $39.65\%$ of the cases. If we know that at least one animal in a group of $5$ is infected and the first $4$ individual tests come out negative, there is no need to run a test on the fifth animal (we know that it must be infected). We can try a different number of groups / different number of animals in each group, adjusting those numbers at each level so that the total expected number of tests will be minimised. To simplify the very wide range of possibilities, there is one restriction we place when devising the most cost-efficient testing scheme: whenever we start with a mixed sample, all the sheep contributing to that sample must be fully screened (i.e. a verdict of infected / virus-free must be reached for all of them) before we start examining any other animals. For the current example, it turns out that the most cost-efficient testing scheme (we'll call it the optimal strategy) requires an average of just $\mathbf{4.155452}$ tests! Using the optimal strategy, let $T(s,p)$ represent the average number of tests needed to screen a flock of $s$ sheep for a virus having probability $p$ to be present in any individual. Thus, rounded to six decimal places, $T(25, 0.02) = 4.155452$ and $T(25, 0.10) = 12.702124$. Find $\sum T(10000, p)$ for $p=0.01, 0.02, 0.03, \dots 0.50$. Give your answer rounded to six decimal places.
Each one of the $25$ sheep in a flock must be tested for a rare virus, known to affect $2\%$ of the sheep population. An accurate and extremely sensitive PCR test exists for blood samples, producing a clear positive / negative result, but it is very time-consuming and expensive. Because of the high cost, the vet-in-charge suggests that instead of performing $25$ separate tests, the following procedure can be used instead: The sheep are split into $5$ groups of $5$ sheep in each group. For each group, the $5$ samples are mixed together and a single test is performed. Then, If the result is negative, all the sheep in that group are deemed to be virus-free. If the result is positive, $5$ additional tests will be performed (a separate test for each animal) to determine the affected individual(s). Since the probability of infection for any specific animal is only $0.02$, the first test (on the pooled samples) for each group will be: Negative (and no more tests needed) with probability $0.98^5 = 0.9039207968$. Positive ($5$ additional tests needed) with probability $1 - 0.9039207968 = 0.0960792032$. Thus, the expected number of tests for each group is $1 + 0.0960792032 \times 5 = 1.480396016$. Consequently, all $5$ groups can be screened using an average of only $1.480396016 \times 5 = \mathbf{7.40198008}$ tests, which represents a huge saving of more than $70\%$! Although the scheme we have just described seems to be very efficient, it can still be improved considerably (always assuming that the test is sufficiently sensitive and that there are no adverse effects caused by mixing different samples). E.g.: We may start by running a test on a mixture of all the $25$ samples. It can be verified that in about $60.35\%$ of the cases this test will be negative, thus no more tests will be needed. Further testing will only be required for the remaining $39.65\%$ of the cases. If we know that at least one animal in a group of $5$ is infected and the first $4$ individual tests come out negative, there is no need to run a test on the fifth animal (we know that it must be infected). We can try a different number of groups / different number of animals in each group, adjusting those numbers at each level so that the total expected number of tests will be minimised. To simplify the very wide range of possibilities, there is one restriction we place when devising the most cost-efficient testing scheme: whenever we start with a mixed sample, all the sheep contributing to that sample must be fully screened (i.e. a verdict of infected / virus-free must be reached for all of them) before we start examining any other animals. For the current example, it turns out that the most cost-efficient testing scheme (we'll call it the optimal strategy) requires an average of just $\mathbf{4.155452}$ tests! Using the optimal strategy, let $T(s,p)$ represent the average number of tests needed to screen a flock of $s$ sheep for a virus having probability $p$ to be present in any individual. Thus, rounded to six decimal places, $T(25, 0.02) = 4.155452$ and $T(25, 0.10) = 12.702124$. Find $\sum T(10000, p)$ for $p=0.01, 0.02, 0.03, \dots 0.50$. Give your answer rounded to six decimal places.
<p> Each one of the $25$ sheep in a flock must be tested for a rare virus, known to affect $2\%$ of the sheep population. An accurate and extremely sensitive PCR test exists for blood samples, producing a clear positive / negative result, but it is very time-consuming and expensive. </p> <p> Because of the high cost, the vet-in-charge suggests that instead of performing $25$ separate tests, the following procedure can be used instead:<br/><br/> The sheep are split into $5$ groups of $5$ sheep in each group. For each group, the $5$ samples are mixed together and a single test is performed. Then, </p><ul><li>If the result is negative, all the sheep in that group are deemed to be virus-free.</li> <li>If the result is positive, $5$ additional tests will be performed (a separate test for each animal) to determine the affected individual(s).</li> </ul><p> Since the probability of infection for any specific animal is only $0.02$, the first test (on the pooled samples) for each group will be: </p><ul><li>Negative (and no more tests needed) with probability $0.98^5 = 0.9039207968$.</li> <li>Positive ($5$ additional tests needed) with probability $1 - 0.9039207968 = 0.0960792032$.</li> </ul><p> Thus, the expected number of tests for each group is $1 + 0.0960792032 \times 5 = 1.480396016$.<br/> Consequently, all $5$ groups can be screened using an average of only $1.480396016 \times 5 = \mathbf{7.40198008}$ tests, which represents a huge saving of more than $70\%$! </p> <p> Although the scheme we have just described seems to be very efficient, it can still be improved considerably (always assuming that the test is sufficiently sensitive and that there are no adverse effects caused by mixing different samples). E.g.: </p><ul><li>We may start by running a test on a mixture of all the $25$ samples. It can be verified that in about $60.35\%$ of the cases this test will be negative, thus no more tests will be needed. Further testing will only be required for the remaining $39.65\%$ of the cases.</li> <li>If we know that at least one animal in a group of $5$ is infected and the first $4$ individual tests come out negative, there is no need to run a test on the fifth animal (we know that it must be infected).</li> <li>We can try a different number of groups / different number of animals in each group, adjusting those numbers at each level so that the total expected number of tests will be minimised.</li> </ul><p> To simplify the very wide range of possibilities, there is one restriction we place when devising the most cost-efficient testing scheme: whenever we start with a mixed sample, all the sheep contributing to that sample must be fully screened (i.e. a verdict of infected / virus-free must be reached for all of them) before we start examining any other animals. </p> For the current example, it turns out that the most cost-efficient testing scheme (we'll call it the <dfn>optimal strategy</dfn>) requires an average of just $\mathbf{4.155452}$ tests! <p> Using the optimal strategy, let $T(s,p)$ represent the average number of tests needed to screen a flock of $s$ sheep for a virus having probability $p$ to be present in any individual.<br/> Thus, rounded to six decimal places, $T(25, 0.02) = 4.155452$ and $T(25, 0.10) = 12.702124$. </p> <p> Find $\sum T(10000, p)$ for $p=0.01, 0.02, 0.03, \dots 0.50$.<br/> Give your answer rounded to six decimal places. </p>
378563.260589
Sunday, 2nd October 2011, 01:00 am
679
55%
medium
175
Fractions and Sum of Powers of Two
Define $f(0)=1$ and $f(n)$ to be the number of ways to write $n$ as a sum of powers of $2$ where no power occurs more than twice. For example, $f(10)=5$ since there are five different ways to express $10$:$10 = 8+2 = 8+1+1 = 4+4+2 = 4+2+2+1+1 = 4+4+1+1.$ It can be shown that for every fraction $p / q$ ($p \gt 0$, $q \gt 0$) there exists at least one integer $n$ such that $f(n)/f(n-1)=p/q$. For instance, the smallest $n$ for which $f(n)/f(n-1)=13/17$ is $241$. The binary expansion of $241$ is $11110001$. Reading this binary number from the most significant bit to the least significant bit there are $4$ one's, $3$ zeroes and $1$ one. We shall call the string $4,3,1$ the Shortened Binary Expansion of $241$. Find the Shortened Binary Expansion of the smallest $n$ for which $f(n)/f(n-1)=123456789/987654321$. Give your answer as comma separated integers, without any whitespaces.
Define $f(0)=1$ and $f(n)$ to be the number of ways to write $n$ as a sum of powers of $2$ where no power occurs more than twice. For example, $f(10)=5$ since there are five different ways to express $10$:$10 = 8+2 = 8+1+1 = 4+4+2 = 4+2+2+1+1 = 4+4+1+1.$ It can be shown that for every fraction $p / q$ ($p \gt 0$, $q \gt 0$) there exists at least one integer $n$ such that $f(n)/f(n-1)=p/q$. For instance, the smallest $n$ for which $f(n)/f(n-1)=13/17$ is $241$. The binary expansion of $241$ is $11110001$. Reading this binary number from the most significant bit to the least significant bit there are $4$ one's, $3$ zeroes and $1$ one. We shall call the string $4,3,1$ the Shortened Binary Expansion of $241$. Find the Shortened Binary Expansion of the smallest $n$ for which $f(n)/f(n-1)=123456789/987654321$. Give your answer as comma separated integers, without any whitespaces.
<p>Define $f(0)=1$ and $f(n)$ to be the number of ways to write $n$ as a sum of powers of $2$ where no power occurs more than twice.</p> <p> For example, $f(10)=5$ since there are five different ways to express $10$:<br/>$10 = 8+2 = 8+1+1 = 4+4+2 = 4+2+2+1+1 = 4+4+1+1.$</p> <p> It can be shown that for every fraction $p / q$ ($p \gt 0$, $q \gt 0$) there exists at least one integer $n$ such that $f(n)/f(n-1)=p/q$.</p> <p> For instance, the smallest $n$ for which $f(n)/f(n-1)=13/17$ is $241$.<br/> The binary expansion of $241$ is $11110001$.<br/> Reading this binary number from the most significant bit to the least significant bit there are $4$ one's, $3$ zeroes and $1$ one. We shall call the string $4,3,1$ the <dfn>Shortened Binary Expansion</dfn> of $241$.</p> <p> Find the Shortened Binary Expansion of the smallest $n$ for which $f(n)/f(n-1)=123456789/987654321$.</p> <p> Give your answer as comma separated integers, without any whitespaces.</p>
1,13717420,8
Friday, 28th December 2007, 01:00 pm
2033
70%
hard
715
Sextuplet Norms
Let $f(n)$ be the number of $6$-tuples $(x_1,x_2,x_3,x_4,x_5,x_6)$ such that: All $x_i$ are integers with $0 \leq x_i < n$ $\gcd(x_1^2+x_2^2+x_3^2+x_4^2+x_5^2+x_6^2,\ n^2)=1$ Let $\displaystyle G(n)=\displaystyle\sum_{k=1}^n \frac{f(k)}{k^2\varphi(k)}$ where $\varphi(n)$ is Euler's totient function. For example, $G(10)=3053$ and $G(10^5) \equiv 157612967 \pmod{1\,000\,000\,007}$. Find $G(10^{12})\bmod 1\,000\,000\,007$.
Let $f(n)$ be the number of $6$-tuples $(x_1,x_2,x_3,x_4,x_5,x_6)$ such that: All $x_i$ are integers with $0 \leq x_i < n$ $\gcd(x_1^2+x_2^2+x_3^2+x_4^2+x_5^2+x_6^2,\ n^2)=1$ Let $\displaystyle G(n)=\displaystyle\sum_{k=1}^n \frac{f(k)}{k^2\varphi(k)}$ where $\varphi(n)$ is Euler's totient function. For example, $G(10)=3053$ and $G(10^5) \equiv 157612967 \pmod{1\,000\,000\,007}$. Find $G(10^{12})\bmod 1\,000\,000\,007$.
<p>Let $f(n)$ be the number of $6$-tuples $(x_1,x_2,x_3,x_4,x_5,x_6)$ such that:</p> <ul><li>All $x_i$ are integers with $0 \leq x_i &lt; n$</li> <li>$\gcd(x_1^2+x_2^2+x_3^2+x_4^2+x_5^2+x_6^2,\ n^2)=1$</li> </ul><p>Let $\displaystyle G(n)=\displaystyle\sum_{k=1}^n \frac{f(k)}{k^2\varphi(k)}$<br> where $\varphi(n)$ is Euler's totient function.</br></p> <p>For example, $G(10)=3053$ and $G(10^5) \equiv 157612967 \pmod{1\,000\,000\,007}$.</p> <p>Find $G(10^{12})\bmod 1\,000\,000\,007$.</p>
883188017
Sunday, 10th May 2020, 08:00 am
215
65%
hard
745
Sum of Squares II
For a positive integer, $n$, define $g(n)$ to be the maximum perfect square that divides $n$. For example, $g(18) = 9$, $g(19) = 1$. Also define $$\displaystyle S(N) = \sum_{n=1}^N g(n)$$ For example, $S(10) = 24$ and $S(100) = 767$. Find $S(10^{14})$. Give your answer modulo $1\,000\,000\,007$.
For a positive integer, $n$, define $g(n)$ to be the maximum perfect square that divides $n$. For example, $g(18) = 9$, $g(19) = 1$. Also define $$\displaystyle S(N) = \sum_{n=1}^N g(n)$$ For example, $S(10) = 24$ and $S(100) = 767$. Find $S(10^{14})$. Give your answer modulo $1\,000\,000\,007$.
<p> For a positive integer, $n$, define $g(n)$ to be the maximum perfect square that divides $n$.<br> For example, $g(18) = 9$, $g(19) = 1$. </br></p> <p> Also define $$\displaystyle S(N) = \sum_{n=1}^N g(n)$$ </p> <p> For example, $S(10) = 24$ and $S(100) = 767$. </p> <p> Find $S(10^{14})$. Give your answer modulo $1\,000\,000\,007$. </p>
94586478
Sunday, 31st January 2021, 04:00 am
1361
10%
easy
669
The King's Banquet
The Knights of the Order of Fibonacci are preparing a grand feast for their king. There are $n$ knights, and each knight is assigned a distinct number from $1$ to $n$. When the knights sit down at the roundtable for their feast, they follow a peculiar seating rule: two knights can only sit next to each other if their respective numbers sum to a Fibonacci number. When the $n$ knights all try to sit down around a circular table with $n$ chairs, they are unable to find a suitable seating arrangement for any $n>2$ despite their best efforts. Just when they are about to give up, they remember that the king will sit on his throne at the table as well. Suppose there are $n=7$ knights and $7$ chairs at the roundtable, in addition to the king’s throne. After some trial and error, they come up with the following seating arrangement ($K$ represents the king): Notice that the sums $4+1$, $1+7$, $7+6$, $6+2$, $2+3$, and $3+5$ are all Fibonacci numbers, as required. It should also be mentioned that the king always prefers an arrangement where the knight to the his left has a smaller number than the knight to his right. With this additional rule, the above arrangement is unique for $n=7$, and the knight sitting in the 3rd chair from the king’s left is knight number $7$. Later, several new knights are appointed to the Order, giving $34$ knights and chairs in addition to the king's throne. The knights eventually determine that there is a unique seating arrangement for $n=34$ satisfying the above rules, and this time knight number $30$ is sitting in the 3rd chair from the king's left. Now suppose there are $n=99\,194\,853\,094\,755\,497$ knights and the same number of chairs at the roundtable (not including the king’s throne). After great trials and tribulations, they are finally able to find the unique seating arrangement for this value of $n$ that satisfies the above rules. Find the number of the knight sitting in the $10\,000\,000\,000\,000\,000$th chair from the king’s left.
The Knights of the Order of Fibonacci are preparing a grand feast for their king. There are $n$ knights, and each knight is assigned a distinct number from $1$ to $n$. When the knights sit down at the roundtable for their feast, they follow a peculiar seating rule: two knights can only sit next to each other if their respective numbers sum to a Fibonacci number. When the $n$ knights all try to sit down around a circular table with $n$ chairs, they are unable to find a suitable seating arrangement for any $n>2$ despite their best efforts. Just when they are about to give up, they remember that the king will sit on his throne at the table as well. Suppose there are $n=7$ knights and $7$ chairs at the roundtable, in addition to the king’s throne. After some trial and error, they come up with the following seating arrangement ($K$ represents the king): Notice that the sums $4+1$, $1+7$, $7+6$, $6+2$, $2+3$, and $3+5$ are all Fibonacci numbers, as required. It should also be mentioned that the king always prefers an arrangement where the knight to the his left has a smaller number than the knight to his right. With this additional rule, the above arrangement is unique for $n=7$, and the knight sitting in the 3rd chair from the king’s left is knight number $7$. Later, several new knights are appointed to the Order, giving $34$ knights and chairs in addition to the king's throne. The knights eventually determine that there is a unique seating arrangement for $n=34$ satisfying the above rules, and this time knight number $30$ is sitting in the 3rd chair from the king's left. Now suppose there are $n=99\,194\,853\,094\,755\,497$ knights and the same number of chairs at the roundtable (not including the king’s throne). After great trials and tribulations, they are finally able to find the unique seating arrangement for this value of $n$ that satisfies the above rules. Find the number of the knight sitting in the $10\,000\,000\,000\,000\,000$th chair from the king’s left.
<p>The Knights of the Order of Fibonacci are preparing a grand feast for their king. There are $n$ knights, and each knight is assigned a distinct number from $1$ to $n$.</p> <p>When the knights sit down at the roundtable for their feast, they follow a peculiar seating rule: two knights can only sit next to each other if their respective numbers sum to a Fibonacci number.</p> <p>When the $n$ knights all try to sit down around a circular table with $n$ chairs, they are unable to find a suitable seating arrangement for any $n&gt;2$ despite their best efforts. Just when they are about to give up, they remember that the king will sit on his throne at the table as well.</p> <p>Suppose there are $n=7$ knights and $7$ chairs at the roundtable, in addition to the king’s throne. After some trial and error, they come up with the following seating arrangement ($K$ represents the king):</p> <div class="center"> <img alt="Roundtable" src="resources/images/0669_roundtable.png?1678992054"/> </div> <p>Notice that the sums $4+1$, $1+7$, $7+6$, $6+2$, $2+3$, and $3+5$ are all Fibonacci numbers, as required. It should also be mentioned that the king always prefers an arrangement where the knight to the his left has a smaller number than the knight to his right. With this additional rule, the above arrangement is unique for $n=7$, and the knight sitting in the 3rd chair from the king’s left is knight number $7$.</p> <p>Later, several new knights are appointed to the Order, giving $34$ knights and chairs in addition to the king's throne. The knights eventually determine that there is a unique seating arrangement for $n=34$ satisfying the above rules, and this time knight number $30$ is sitting in the 3rd chair from the king's left.</p> <p>Now suppose there are $n=99\,194\,853\,094\,755\,497$ knights and the same number of chairs at the roundtable (not including the king’s throne). After great trials and tribulations, they are finally able to find the unique seating arrangement for this value of $n$ that satisfies the above rules.</p> <p>Find the number of the knight sitting in the $10\,000\,000\,000\,000\,000$th chair from the king’s left.</p>
56342087360542122
Saturday, 11th May 2019, 10:00 pm
338
45%
medium
767
Window into a Matrix II
A window into a matrix is a contiguous sub matrix. Consider a $16\times n$ matrix where every entry is either 0 or 1. Let $B(k,n)$ be the total number of these matrices such that the sum of the entries in every $2\times k$ window is $k$. You are given that $B(2,4) = 65550$ and $B(3,9) \equiv 87273560 \pmod{1\,000\,000\,007}$. Find $B(10^5,10^{16})$. Give your answer modulo $1\,000\,000\,007$.
A window into a matrix is a contiguous sub matrix. Consider a $16\times n$ matrix where every entry is either 0 or 1. Let $B(k,n)$ be the total number of these matrices such that the sum of the entries in every $2\times k$ window is $k$. You are given that $B(2,4) = 65550$ and $B(3,9) \equiv 87273560 \pmod{1\,000\,000\,007}$. Find $B(10^5,10^{16})$. Give your answer modulo $1\,000\,000\,007$.
<p>A window into a matrix is a contiguous sub matrix.</p> <p>Consider a $16\times n$ matrix where every entry is either 0 or 1. Let $B(k,n)$ be the total number of these matrices such that the sum of the entries in every $2\times k$ window is $k$.</p> <p>You are given that $B(2,4) = 65550$ and $B(3,9) \equiv 87273560 \pmod{1\,000\,000\,007}$.</p> <p>Find $B(10^5,10^{16})$. Give your answer modulo $1\,000\,000\,007$.</p>
783976175
Sunday, 10th October 2021, 02:00 am
188
60%
hard
563
Robot Welders
A company specialises in producing large rectangular metal sheets, starting from unit square metal plates. The welding is performed by a range of robots of increasing size. Unfortunately, the programming options of these robots are rather limited. Each one can only process up to $25$ identical rectangles of metal, which they can weld along either edge to produce a larger rectangle. The only programmable variables are the number of rectangles to be processed (up to and including $25$), and whether to weld the long or short edge. For example, the first robot could be programmed to weld together $11$ raw unit square plates to make a $11 \times 1$ strip. The next could take $10$ of these $11 \times 1$ strips, and weld them either to make a longer $110 \times 1$ strip, or a $11 \times 10$ rectangle. Many, but not all, possible dimensions of metal sheets can be constructed in this way. One regular customer has a particularly unusual order: The finished product should have an exact area, and the long side must not be more than $10\%$ larger than the short side. If these requirements can be met in more than one way, in terms of the exact dimensions of the two sides, then the customer will demand that all variants be produced. For example, if the order calls for a metal sheet of area $889200$, then there are three final dimensions that can be produced: $900 \times 988$, $912 \times 975$ and $936 \times 950$. The target area of $889200$ is the smallest area which can be manufactured in three different variants, within the limitations of the robot welders. Let $M(n)$ be the minimal area that can be manufactured in exactly $n$ variants with the longer edge not greater than $10\%$ bigger than the shorter edge. Hence $M(3) = 889200$. Find $\sum_{n=2}^{100} M(n)$.
A company specialises in producing large rectangular metal sheets, starting from unit square metal plates. The welding is performed by a range of robots of increasing size. Unfortunately, the programming options of these robots are rather limited. Each one can only process up to $25$ identical rectangles of metal, which they can weld along either edge to produce a larger rectangle. The only programmable variables are the number of rectangles to be processed (up to and including $25$), and whether to weld the long or short edge. For example, the first robot could be programmed to weld together $11$ raw unit square plates to make a $11 \times 1$ strip. The next could take $10$ of these $11 \times 1$ strips, and weld them either to make a longer $110 \times 1$ strip, or a $11 \times 10$ rectangle. Many, but not all, possible dimensions of metal sheets can be constructed in this way. One regular customer has a particularly unusual order: The finished product should have an exact area, and the long side must not be more than $10\%$ larger than the short side. If these requirements can be met in more than one way, in terms of the exact dimensions of the two sides, then the customer will demand that all variants be produced. For example, if the order calls for a metal sheet of area $889200$, then there are three final dimensions that can be produced: $900 \times 988$, $912 \times 975$ and $936 \times 950$. The target area of $889200$ is the smallest area which can be manufactured in three different variants, within the limitations of the robot welders. Let $M(n)$ be the minimal area that can be manufactured in exactly $n$ variants with the longer edge not greater than $10\%$ bigger than the shorter edge. Hence $M(3) = 889200$. Find $\sum_{n=2}^{100} M(n)$.
<p>A company specialises in producing large rectangular metal sheets, starting from unit square metal plates. The welding is performed by a range of robots of increasing size. Unfortunately, the programming options of these robots are rather limited. Each one can only process up to $25$ identical rectangles of metal, which they can weld along either edge to produce a larger rectangle. The only programmable variables are the number of rectangles to be processed (up to and including $25$), and whether to weld the long or short edge.</p> <p>For example, the first robot could be programmed to weld together $11$ raw unit square plates to make a $11 \times 1$ strip. The next could take $10$ of these $11 \times 1$ strips, and weld them either to make a longer $110 \times 1$ strip, or a $11 \times 10$ rectangle. Many, but not all, possible dimensions of metal sheets can be constructed in this way.</p> <p>One regular customer has a particularly unusual order: The finished product should have an exact area, and the long side must not be more than $10\%$ larger than the short side. If these requirements can be met in more than one way, in terms of the exact dimensions of the two sides, then the customer will demand that all variants be produced. For example, if the order calls for a metal sheet of area $889200$, then there are three final dimensions that can be produced: $900 \times 988$, $912 \times 975$ and $936 \times 950$. The target area of $889200$ is the smallest area which can be manufactured in three different variants, within the limitations of the robot welders.</p> <p>Let $M(n)$ be the minimal area that can be manufactured in <u>exactly</u> $n$ variants with the longer edge not greater than $10\%$ bigger than the shorter edge. Hence $M(3) = 889200$.</p> <p>Find $\sum_{n=2}^{100} M(n)$.</p>
27186308211734760
Sunday, 5th June 2016, 04:00 am
378
45%
medium
882
Removing Bits
Dr. One and Dr. Zero are playing the following partisan game. The game begins with one $1$, two $2$'s, three $3$'s, ..., $n$ $n$'s. Starting with Dr. One, they make moves in turn. Dr. One chooses a number and changes it by removing a $1$ from its binary expansion. Dr. Zero chooses a number and changes it by removing a $0$ from its binary expansion. The player that is unable to move loses. Note that leading zeros are not allowed in any binary expansion; in particular nobody can make a move on the number $0$. They soon realize that Dr. Zero can never win the game. In order to make it more interesting, Dr. Zero is allowed to "skip the turn" several times, i.e. passing the turn back to Dr. One without making a move. For example, when $n = 2$, Dr. Zero can win the game if allowed to skip $2$ turns. A sample game: $$ [1, 2, 2]\xrightarrow{\textrm{Dr. One}}[1, 0, 2]\xrightarrow{\textrm{Dr. Zero}}[1, 0, 1]\xrightarrow{\textrm{Dr. One}}[1, 0, 0]\xrightarrow[\textrm{skip}]{\textrm{Dr. Zero}} [1, 0, 0]\xrightarrow{\textrm{Dr. One}}[0, 0, 0]\xrightarrow[\textrm{skip}]{\textrm{Dr. Zero}}[0, 0, 0]. $$ Let $S(n)$ be the minimal number of skips needed so that Dr. Zero has a winning strategy. For example, $S(2) = 2$, $S(5) = 17$, $S(10) = 64$. Find $S(10^5)$.
Dr. One and Dr. Zero are playing the following partisan game. The game begins with one $1$, two $2$'s, three $3$'s, ..., $n$ $n$'s. Starting with Dr. One, they make moves in turn. Dr. One chooses a number and changes it by removing a $1$ from its binary expansion. Dr. Zero chooses a number and changes it by removing a $0$ from its binary expansion. The player that is unable to move loses. Note that leading zeros are not allowed in any binary expansion; in particular nobody can make a move on the number $0$. They soon realize that Dr. Zero can never win the game. In order to make it more interesting, Dr. Zero is allowed to "skip the turn" several times, i.e. passing the turn back to Dr. One without making a move. For example, when $n = 2$, Dr. Zero can win the game if allowed to skip $2$ turns. A sample game: $$ [1, 2, 2]\xrightarrow{\textrm{Dr. One}}[1, 0, 2]\xrightarrow{\textrm{Dr. Zero}}[1, 0, 1]\xrightarrow{\textrm{Dr. One}}[1, 0, 0]\xrightarrow[\textrm{skip}]{\textrm{Dr. Zero}} [1, 0, 0]\xrightarrow{\textrm{Dr. One}}[0, 0, 0]\xrightarrow[\textrm{skip}]{\textrm{Dr. Zero}}[0, 0, 0]. $$ Let $S(n)$ be the minimal number of skips needed so that Dr. Zero has a winning strategy. For example, $S(2) = 2$, $S(5) = 17$, $S(10) = 64$. Find $S(10^5)$.
<p>Dr. One and Dr. Zero are playing the following partisan game.<br/> The game begins with one $1$, two $2$'s, three $3$'s, ..., $n$ $n$'s. Starting with Dr. One, they make moves in turn.<br/> Dr. One chooses a number and changes it by removing a $1$ from its binary expansion.<br/> Dr. Zero chooses a number and changes it by removing a $0$ from its binary expansion.<br/> The player that is unable to move loses.<br/> Note that leading zeros are not allowed in any binary expansion; in particular nobody can make a move on the number $0$.</p> <p>They soon realize that Dr. Zero can never win the game. In order to make it more interesting, Dr. Zero is allowed to "skip the turn" several times, i.e. passing the turn back to Dr. One without making a move.</p> <p>For example, when $n = 2$, Dr. Zero can win the game if allowed to skip $2$ turns. A sample game: $$ [1, 2, 2]\xrightarrow{\textrm{Dr. One}}[1, 0, 2]\xrightarrow{\textrm{Dr. Zero}}[1, 0, 1]\xrightarrow{\textrm{Dr. One}}[1, 0, 0]\xrightarrow[\textrm{skip}]{\textrm{Dr. Zero}} [1, 0, 0]\xrightarrow{\textrm{Dr. One}}[0, 0, 0]\xrightarrow[\textrm{skip}]{\textrm{Dr. Zero}}[0, 0, 0]. $$ Let $S(n)$ be the minimal number of skips needed so that Dr. Zero has a winning strategy.<br/> For example, $S(2) = 2$, $S(5) = 17$, $S(10) = 64$.</p> <p>Find $S(10^5)$.</p>
15800662276
Sunday, 17th March 2024, 01:00 am
144
75%
hard
606
Gozinta Chains II
A gozinta chain for $n$ is a sequence $\{1,a,b,\dots,n\}$ where each element properly divides the next. For example, there are eight distinct gozinta chains for $12$: $\{1,12\}$, $\{1,2,12\}$, $\{1,2,4,12\}$, $\{1,2,6,12\}$, $\{1,3,12\}$, $\{1,3,6,12\}$, $\{1,4,12\}$ and $\{1,6,12\}$. Let $S(n)$ be the sum of all numbers, $k$, not exceeding $n$, which have $252$ distinct gozinta chains. You are given $S(10^6)=8462952$ and $S(10^{12})=623291998881978$. Find $S(10^{36})$, giving the last nine digits of your answer.
A gozinta chain for $n$ is a sequence $\{1,a,b,\dots,n\}$ where each element properly divides the next. For example, there are eight distinct gozinta chains for $12$: $\{1,12\}$, $\{1,2,12\}$, $\{1,2,4,12\}$, $\{1,2,6,12\}$, $\{1,3,12\}$, $\{1,3,6,12\}$, $\{1,4,12\}$ and $\{1,6,12\}$. Let $S(n)$ be the sum of all numbers, $k$, not exceeding $n$, which have $252$ distinct gozinta chains. You are given $S(10^6)=8462952$ and $S(10^{12})=623291998881978$. Find $S(10^{36})$, giving the last nine digits of your answer.
<p> A <strong>gozinta chain</strong> for $n$ is a sequence $\{1,a,b,\dots,n\}$ where each element properly divides the next. <br/> For example, there are eight distinct gozinta chains for $12$:<br/> $\{1,12\}$, $\{1,2,12\}$, $\{1,2,4,12\}$, $\{1,2,6,12\}$, $\{1,3,12\}$, $\{1,3,6,12\}$, $\{1,4,12\}$ and $\{1,6,12\}$. </p> <p> Let $S(n)$ be the sum of all numbers, $k$, not exceeding $n$, which have $252$ distinct gozinta chains. <br/> You are given $S(10^6)=8462952$ and $S(10^{12})=623291998881978$. </p> <p> Find $S(10^{36})$, giving the last nine digits of your answer. </p>
158452775
Sunday, 4th June 2017, 10:00 am
417
50%
medium
98
Anagramic Squares
By replacing each of the letters in the word CARE with $1$, $2$, $9$, and $6$ respectively, we form a square number: $1296 = 36^2$. What is remarkable is that, by using the same digital substitutions, the anagram, RACE, also forms a square number: $9216 = 96^2$. We shall call CARE (and RACE) a square anagram word pair and specify further that leading zeroes are not permitted, neither may a different letter have the same digital value as another letter. Using words.txt (right click and 'Save Link/Target As...'), a 16K text file containing nearly two-thousand common English words, find all the square anagram word pairs (a palindromic word is NOT considered to be an anagram of itself). What is the largest square number formed by any member of such a pair? NOTE: All anagrams formed must be contained in the given text file.
By replacing each of the letters in the word CARE with $1$, $2$, $9$, and $6$ respectively, we form a square number: $1296 = 36^2$. What is remarkable is that, by using the same digital substitutions, the anagram, RACE, also forms a square number: $9216 = 96^2$. We shall call CARE (and RACE) a square anagram word pair and specify further that leading zeroes are not permitted, neither may a different letter have the same digital value as another letter. Using words.txt (right click and 'Save Link/Target As...'), a 16K text file containing nearly two-thousand common English words, find all the square anagram word pairs (a palindromic word is NOT considered to be an anagram of itself). What is the largest square number formed by any member of such a pair? NOTE: All anagrams formed must be contained in the given text file.
<p>By replacing each of the letters in the word CARE with $1$, $2$, $9$, and $6$ respectively, we form a square number: $1296 = 36^2$. What is remarkable is that, by using the same digital substitutions, the anagram, RACE, also forms a square number: $9216 = 96^2$. We shall call CARE (and RACE) a square anagram word pair and specify further that leading zeroes are not permitted, neither may a different letter have the same digital value as another letter.</p> <p>Using <a href="resources/documents/0098_words.txt">words.txt</a> (right click and 'Save Link/Target As...'), a 16K text file containing nearly two-thousand common English words, find all the square anagram word pairs (a palindromic word is NOT considered to be an anagram of itself).</p> <p>What is the largest square number formed by any member of such a pair?</p> <p class="smaller">NOTE: All anagrams formed must be contained in the given text file.</p>
18769
Friday, 17th June 2005, 06:00 pm
12939
35%
medium
434
Rigid Graphs
Recall that a graph is a collection of vertices and edges connecting the vertices, and that two vertices connected by an edge are called adjacent. Graphs can be embedded in Euclidean space by associating each vertex with a point in the Euclidean space. A flexible graph is an embedding of a graph where it is possible to move one or more vertices continuously so that the distance between at least two nonadjacent vertices is altered while the distances between each pair of adjacent vertices is kept constant. A rigid graph is an embedding of a graph which is not flexible. Informally, a graph is rigid if by replacing the vertices with fully rotating hinges and the edges with rods that are unbending and inelastic, no parts of the graph can be moved independently from the rest of the graph. The grid graphs embedded in the Euclidean plane are not rigid, as the following animation demonstrates: However, one can make them rigid by adding diagonal edges to the cells. For example, for the $2\times 3$ grid graph, there are $19$ ways to make the graph rigid: Note that for the purposes of this problem, we do not consider changing the orientation of a diagonal edge or adding both diagonal edges to a cell as a different way of making a grid graph rigid. Let $R(m,n)$ be the number of ways to make the $m \times n$ grid graph rigid. E.g. $R(2,3) = 19$ and $R(5,5) = 23679901$. Define $S(N)$ as $\sum R(i,j)$ for $1 \leq i, j \leq N$. E.g. $S(5) = 25021721$. Find $S(100)$, give your answer modulo $1000000033$.
Recall that a graph is a collection of vertices and edges connecting the vertices, and that two vertices connected by an edge are called adjacent. Graphs can be embedded in Euclidean space by associating each vertex with a point in the Euclidean space. A flexible graph is an embedding of a graph where it is possible to move one or more vertices continuously so that the distance between at least two nonadjacent vertices is altered while the distances between each pair of adjacent vertices is kept constant. A rigid graph is an embedding of a graph which is not flexible. Informally, a graph is rigid if by replacing the vertices with fully rotating hinges and the edges with rods that are unbending and inelastic, no parts of the graph can be moved independently from the rest of the graph. The grid graphs embedded in the Euclidean plane are not rigid, as the following animation demonstrates: However, one can make them rigid by adding diagonal edges to the cells. For example, for the $2\times 3$ grid graph, there are $19$ ways to make the graph rigid: Note that for the purposes of this problem, we do not consider changing the orientation of a diagonal edge or adding both diagonal edges to a cell as a different way of making a grid graph rigid. Let $R(m,n)$ be the number of ways to make the $m \times n$ grid graph rigid. E.g. $R(2,3) = 19$ and $R(5,5) = 23679901$. Define $S(N)$ as $\sum R(i,j)$ for $1 \leq i, j \leq N$. E.g. $S(5) = 25021721$. Find $S(100)$, give your answer modulo $1000000033$.
<p>Recall that a graph is a collection of vertices and edges connecting the vertices, and that two vertices connected by an edge are called adjacent.<br/> Graphs can be embedded in Euclidean space by associating each vertex with a point in the Euclidean space.<br/> A <strong>flexible</strong> graph is an embedding of a graph where it is possible to move one or more vertices continuously so that the distance between at least two nonadjacent vertices is altered while the distances between each pair of adjacent vertices is kept constant.<br/> A <strong>rigid</strong> graph is an embedding of a graph which is not flexible.<br/> Informally, a graph is rigid if by replacing the vertices with fully rotating hinges and the edges with rods that are unbending and inelastic, no parts of the graph can be moved independently from the rest of the graph. </p> <p>The <strong>grid graphs</strong> embedded in the Euclidean plane are not rigid, as the following animation demonstrates:</p> <div class="center"><img alt="0434_rigid.gif" class="dark_img" src="resources/images/0434_rigid.gif?1678992057"/></div> <p>However, one can make them rigid by adding diagonal edges to the cells. For example, for the $2\times 3$ grid graph, there are $19$ ways to make the graph rigid:</p> <div class="center"><img alt="0434_rigid23.png" class="dark_img" src="resources/images/0434_rigid23.png?1678992053"/></div> <p>Note that for the purposes of this problem, we do not consider changing the orientation of a diagonal edge or adding both diagonal edges to a cell as a different way of making a grid graph rigid. </p> <p>Let $R(m,n)$ be the number of ways to make the $m \times n$ grid graph rigid. <br/> E.g. $R(2,3) = 19$ and $R(5,5) = 23679901$. </p> <p>Define $S(N)$ as $\sum R(i,j)$ for $1 \leq i, j \leq N$.<br/> E.g. $S(5) = 25021721$.<br/> Find $S(100)$, give your answer modulo $1000000033$. </p>
863253606
Saturday, 29th June 2013, 07:00 pm
365
75%
hard
709
Even Stevens
Every day for the past $n$ days Even Stevens brings home his groceries in a plastic bag. He stores these plastic bags in a cupboard. He either puts the plastic bag into the cupboard with the rest, or else he takes an even number of the existing bags (which may either be empty or previously filled with other bags themselves) and places these into the current bag. After 4 days there are 5 possible packings and if the bags are numbered 1 (oldest), 2, 3, 4, they are: Four empty bags, 1 and 2 inside 3, 4 empty, 1 and 3 inside 4, 2 empty, 1 and 2 inside 4, 3 empty, 2 and 3 inside 4, 1 empty. Note that 1, 2, 3 inside 4 is invalid because every bag must contain an even number of bags. Define $f(n)$ to be the number of possible packings of $n$ bags. Hence $f(4)=5$. You are also given $f(8)=1\,385$. Find $f(24\,680)$ giving your answer modulo $1\,020\,202\,009$.
Every day for the past $n$ days Even Stevens brings home his groceries in a plastic bag. He stores these plastic bags in a cupboard. He either puts the plastic bag into the cupboard with the rest, or else he takes an even number of the existing bags (which may either be empty or previously filled with other bags themselves) and places these into the current bag. After 4 days there are 5 possible packings and if the bags are numbered 1 (oldest), 2, 3, 4, they are: Four empty bags, 1 and 2 inside 3, 4 empty, 1 and 3 inside 4, 2 empty, 1 and 2 inside 4, 3 empty, 2 and 3 inside 4, 1 empty. Note that 1, 2, 3 inside 4 is invalid because every bag must contain an even number of bags. Define $f(n)$ to be the number of possible packings of $n$ bags. Hence $f(4)=5$. You are also given $f(8)=1\,385$. Find $f(24\,680)$ giving your answer modulo $1\,020\,202\,009$.
<p>Every day for the past $n$ days Even Stevens brings home his groceries in a plastic bag. He stores these plastic bags in a cupboard. He either puts the plastic bag into the cupboard with the rest, or else he takes an <b>even</b> number of the existing bags (which may either be empty or previously filled with other bags themselves) and places these into the current bag.</p> <p>After 4 days there are 5 possible packings and if the bags are numbered 1 (oldest), 2, 3, 4, they are:</p> <ul><li>Four empty bags,</li> <li>1 and 2 inside 3, 4 empty,</li> <li>1 and 3 inside 4, 2 empty,</li> <li>1 and 2 inside 4, 3 empty,</li> <li>2 and 3 inside 4, 1 empty.</li> </ul><p>Note that 1, 2, 3 inside 4 is invalid because every bag must contain an even number of bags.</p> <p>Define $f(n)$ to be the number of possible packings of $n$ bags. Hence $f(4)=5$. You are also given $f(8)=1\,385$.</p> <p>Find $f(24\,680)$ giving your answer modulo $1\,020\,202\,009$.</p>
773479144
Saturday, 4th April 2020, 05:00 pm
989
15%
easy
212
Combined Volume of Cuboids
An axis-aligned cuboid, specified by parameters $\{(x_0, y_0, z_0), (dx, dy, dz)\}$, consists of all points $(X,Y,Z)$ such that $x_0 \le X \le x_0 + dx$, $y_0 \le Y \le y_0 + dy$ and $z_0 \le Z \le z_0 + dz$. The volume of the cuboid is the product, $dx \times dy \times dz$. The combined volume of a collection of cuboids is the volume of their union and will be less than the sum of the individual volumes if any cuboids overlap. Let $C_1, \dots, C_{50000}$ be a collection of $50000$ axis-aligned cuboids such that $C_n$ has parameters \begin{align} x_0 &= S_{6n - 5} \bmod 10000\\ y_0 &= S_{6n - 4} \bmod 10000\\ z_0 &= S_{6n - 3} \bmod 10000\\ dx &= 1 + (S_{6n - 2} \bmod 399)\\ dy &= 1 + (S_{6n - 1} \bmod 399)\\ dz &= 1 + (S_{6n} \bmod 399) \end{align} where $S_1,\dots,S_{300000}$ come from the "Lagged Fibonacci Generator": For $1 \le k \le 55$, $S_k = [100003 - 200003k + 300007k^3] \pmod{1000000}$.For $56 \le k$, $S_k = [S_{k -24} + S_{k - 55}] \pmod{1000000}$. Thus, $C_1$ has parameters $\{(7,53,183),(94,369,56)\}$, $C_2$ has parameters $\{(2383,3563,5079),(42,212,344)\}$, and so on. The combined volume of the first $100$ cuboids, $C_1, \dots, C_{100}$, is $723581599$. What is the combined volume of all $50000$ cuboids, $C_1, \dots, C_{50000}$?
An axis-aligned cuboid, specified by parameters $\{(x_0, y_0, z_0), (dx, dy, dz)\}$, consists of all points $(X,Y,Z)$ such that $x_0 \le X \le x_0 + dx$, $y_0 \le Y \le y_0 + dy$ and $z_0 \le Z \le z_0 + dz$. The volume of the cuboid is the product, $dx \times dy \times dz$. The combined volume of a collection of cuboids is the volume of their union and will be less than the sum of the individual volumes if any cuboids overlap. Let $C_1, \dots, C_{50000}$ be a collection of $50000$ axis-aligned cuboids such that $C_n$ has parameters \begin{align} x_0 &= S_{6n - 5} \bmod 10000\\ y_0 &= S_{6n - 4} \bmod 10000\\ z_0 &= S_{6n - 3} \bmod 10000\\ dx &= 1 + (S_{6n - 2} \bmod 399)\\ dy &= 1 + (S_{6n - 1} \bmod 399)\\ dz &= 1 + (S_{6n} \bmod 399) \end{align} where $S_1,\dots,S_{300000}$ come from the "Lagged Fibonacci Generator": For $1 \le k \le 55$, $S_k = [100003 - 200003k + 300007k^3] \pmod{1000000}$.For $56 \le k$, $S_k = [S_{k -24} + S_{k - 55}] \pmod{1000000}$. Thus, $C_1$ has parameters $\{(7,53,183),(94,369,56)\}$, $C_2$ has parameters $\{(2383,3563,5079),(42,212,344)\}$, and so on. The combined volume of the first $100$ cuboids, $C_1, \dots, C_{100}$, is $723581599$. What is the combined volume of all $50000$ cuboids, $C_1, \dots, C_{50000}$?
<p>An <dfn>axis-aligned cuboid</dfn>, specified by parameters $\{(x_0, y_0, z_0), (dx, dy, dz)\}$, consists of all points $(X,Y,Z)$ such that $x_0 \le X \le x_0 + dx$, $y_0 \le Y \le y_0 + dy$ and $z_0 \le Z \le z_0 + dz$. The volume of the cuboid is the product, $dx \times dy \times dz$. The <dfn>combined volume</dfn> of a collection of cuboids is the volume of their union and will be less than the sum of the individual volumes if any cuboids overlap.</p> <p>Let $C_1, \dots, C_{50000}$ be a collection of $50000$ axis-aligned cuboids such that $C_n$ has parameters</p> \begin{align} x_0 &= S_{6n - 5} \bmod 10000\\ y_0 &= S_{6n - 4} \bmod 10000\\ z_0 &= S_{6n - 3} \bmod 10000\\ dx &= 1 + (S_{6n - 2} \bmod 399)\\ dy &= 1 + (S_{6n - 1} \bmod 399)\\ dz &= 1 + (S_{6n} \bmod 399) \end{align} <p>where $S_1,\dots,S_{300000}$ come from the "Lagged Fibonacci Generator":</p> <ul style="list-style-type:none;"><li>For $1 \le k \le 55$, $S_k = [100003 - 200003k + 300007k^3] \pmod{1000000}$.</li><li>For $56 \le k$, $S_k = [S_{k -24} + S_{k - 55}] \pmod{1000000}$.</li></ul> <p>Thus, $C_1$ has parameters $\{(7,53,183),(94,369,56)\}$, $C_2$ has parameters $\{(2383,3563,5079),(42,212,344)\}$, and so on.</p> <p>The combined volume of the first $100$ cuboids, $C_1, \dots, C_{100}$, is $723581599$.</p> <p>What is the combined volume of all $50000$ cuboids, $C_1, \dots, C_{50000}$?</p>
328968937309
Saturday, 11th October 2008, 06:00 am
1561
70%
hard
310
Nim Square
Alice and Bob play the game Nim Square. Nim Square is just like ordinary three-heap normal play Nim, but the players may only remove a square number of stones from a heap. The number of stones in the three heaps is represented by the ordered triple $(a,b,c)$. If $0 \le a \le b \le c \le 29$ then the number of losing positions for the next player is $1160$. Find the number of losing positions for the next player if $0 \le a \le b \le c \le 100\,000$.
Alice and Bob play the game Nim Square. Nim Square is just like ordinary three-heap normal play Nim, but the players may only remove a square number of stones from a heap. The number of stones in the three heaps is represented by the ordered triple $(a,b,c)$. If $0 \le a \le b \le c \le 29$ then the number of losing positions for the next player is $1160$. Find the number of losing positions for the next player if $0 \le a \le b \le c \le 100\,000$.
<p> Alice and Bob play the game Nim Square.<br/> Nim Square is just like ordinary three-heap normal play Nim, but the players may only remove a square number of stones from a heap.<br/> The number of stones in the three heaps is represented by the ordered triple $(a,b,c)$.<br/> If $0 \le a \le b \le c \le 29$ then the number of losing positions for the next player is $1160$. </p> <p> Find the number of losing positions for the next player if $0 \le a \le b \le c \le 100\,000$. </p>
2586528661783
Saturday, 13th November 2010, 07:00 pm
1308
40%
medium
458
Permutations of Project
Consider the alphabet $A$ made out of the letters of the word "$\text{project}$": $A=\{\text c,\text e,\text j,\text o,\text p,\text r,\text t\}$. Let $T(n)$ be the number of strings of length $n$ consisting of letters from $A$ that do not have a substring that is one of the $5040$ permutations of "$\text{project}$". $T(7)=7^7-7!=818503$. Find $T(10^{12})$. Give the last $9$ digits of your answer.
Consider the alphabet $A$ made out of the letters of the word "$\text{project}$": $A=\{\text c,\text e,\text j,\text o,\text p,\text r,\text t\}$. Let $T(n)$ be the number of strings of length $n$ consisting of letters from $A$ that do not have a substring that is one of the $5040$ permutations of "$\text{project}$". $T(7)=7^7-7!=818503$. Find $T(10^{12})$. Give the last $9$ digits of your answer.
<p> Consider the alphabet $A$ made out of the letters of the word "$\text{project}$": $A=\{\text c,\text e,\text j,\text o,\text p,\text r,\text t\}$.<br/> Let $T(n)$ be the number of strings of length $n$ consisting of letters from $A$ that do not have a substring that is one of the $5040$ permutations of "$\text{project}$". </p> $T(7)=7^7-7!=818503$. <p> Find $T(10^{12})$. Give the last $9$ digits of your answer. </p>
423341841
Sunday, 9th February 2014, 07:00 am
1049
30%
easy
4
Largest Palindrome Product
A palindromic number reads the same both ways. The largest palindrome made from the product of two $2$-digit numbers is $9009 = 91 \times 99$. Find the largest palindrome made from the product of two $3$-digit numbers.
A palindromic number reads the same both ways. The largest palindrome made from the product of two $2$-digit numbers is $9009 = 91 \times 99$. Find the largest palindrome made from the product of two $3$-digit numbers.
<p>A palindromic number reads the same both ways. The largest palindrome made from the product of two $2$-digit numbers is $9009 = 91 \times 99$.</p> <p>Find the largest palindrome made from the product of two $3$-digit numbers.</p>
906609
Friday, 16th November 2001, 06:00 pm
519815
5%
easy
475
Music Festival
$12n$ musicians participate at a music festival. On the first day, they form $3n$ quartets and practice all day. It is a disaster. At the end of the day, all musicians decide they will never again agree to play with any member of their quartet. On the second day, they form $4n$ trios, with every musician avoiding any previous quartet partners. Let $f(12n)$ be the number of ways to organize the trios amongst the $12n$ musicians. You are given $f(12) = 576$ and $f(24) \bmod 1\,000\,000\,007 = 509089824$. Find $f(600) \bmod 1\,000\,000\,007$.
$12n$ musicians participate at a music festival. On the first day, they form $3n$ quartets and practice all day. It is a disaster. At the end of the day, all musicians decide they will never again agree to play with any member of their quartet. On the second day, they form $4n$ trios, with every musician avoiding any previous quartet partners. Let $f(12n)$ be the number of ways to organize the trios amongst the $12n$ musicians. You are given $f(12) = 576$ and $f(24) \bmod 1\,000\,000\,007 = 509089824$. Find $f(600) \bmod 1\,000\,000\,007$.
<p>$12n$ musicians participate at a music festival. On the first day, they form $3n$ quartets and practice all day.</p> <p>It is a disaster. At the end of the day, all musicians decide they will never again agree to play with any member of their quartet.</p> <p>On the second day, they form $4n$ trios, with every musician avoiding any previous quartet partners.</p> <p>Let $f(12n)$ be the number of ways to organize the trios amongst the $12n$ musicians.</p> <p>You are given $f(12) = 576$ and $f(24) \bmod 1\,000\,000\,007 = 509089824$.</p> <p>Find $f(600) \bmod 1\,000\,000\,007$.</p>
75780067
Sunday, 8th June 2014, 10:00 am
495
50%
medium
621
Expressing an Integer as the Sum of Triangular Numbers
Gauss famously proved that every positive integer can be expressed as the sum of three triangular numbers (including $0$ as the lowest triangular number). In fact most numbers can be expressed as a sum of three triangular numbers in several ways. Let $G(n)$ be the number of ways of expressing $n$ as the sum of three triangular numbers, regarding different arrangements of the terms of the sum as distinct. For example, $G(9) = 7$, as $9$ can be expressed as: $3+3+3$, $0+3+6$, $0+6+3$, $3+0+6$, $3+6+0$, $6+0+3$, $6+3+0$. You are given $G(1000) = 78$ and $G(10^6) = 2106$. Find $G(17526 \times 10^9)$.
Gauss famously proved that every positive integer can be expressed as the sum of three triangular numbers (including $0$ as the lowest triangular number). In fact most numbers can be expressed as a sum of three triangular numbers in several ways. Let $G(n)$ be the number of ways of expressing $n$ as the sum of three triangular numbers, regarding different arrangements of the terms of the sum as distinct. For example, $G(9) = 7$, as $9$ can be expressed as: $3+3+3$, $0+3+6$, $0+6+3$, $3+0+6$, $3+6+0$, $6+0+3$, $6+3+0$. You are given $G(1000) = 78$ and $G(10^6) = 2106$. Find $G(17526 \times 10^9)$.
<p>Gauss famously proved that every positive integer can be expressed as the sum of three <strong>triangular numbers</strong> (including $0$ as the lowest triangular number). In fact most numbers can be expressed as a sum of three triangular numbers in several ways.</p> <p> Let $G(n)$ be the number of ways of expressing $n$ as the sum of three triangular numbers, regarding different arrangements of the terms of the sum as distinct.</p> <p> For example, $G(9) = 7$, as $9$ can be expressed as: $3+3+3$, $0+3+6$, $0+6+3$, $3+0+6$, $3+6+0$, $6+0+3$, $6+3+0$.<br/> You are given $G(1000) = 78$ and $G(10^6) = 2106$.</p> <p> Find $G(17526 \times 10^9)$.</p>
11429712
Sunday, 25th February 2018, 04:00 am
613
35%
medium
193
Squarefree Numbers
A positive integer $n$ is called squarefree, if no square of a prime divides $n$, thus $1, 2, 3, 5, 6, 7, 10, 11$ are squarefree, but not $4, 8, 9, 12$. How many squarefree numbers are there below $2^{50}$?
A positive integer $n$ is called squarefree, if no square of a prime divides $n$, thus $1, 2, 3, 5, 6, 7, 10, 11$ are squarefree, but not $4, 8, 9, 12$. How many squarefree numbers are there below $2^{50}$?
<p>A positive integer $n$ is called squarefree, if no square of a prime divides $n$, thus $1, 2, 3, 5, 6, 7, 10, 11$ are squarefree, but not $4, 8, 9, 12$.</p> <p>How many squarefree numbers are there below $2^{50}$?</p>
684465067343069
Saturday, 10th May 2008, 01:00 pm
3801
55%
medium
671
Colouring a Loop
A certain type of flexible tile comes in three different sizes - $1 \times 1$, $1 \times 2$, and $1 \times 3$ - and in $k$ different colours. There is an unlimited number of tiles available in each combination of size and colour. These are used to tile a closed loop of width $2$ and length (circumference) $n$, where $n$ is a positive integer, subject to the following conditions: The loop must be fully covered by non-overlapping tiles. It is not permitted for four tiles to have their corners meeting at a single point. Adjacent tiles must be of different colours. For example, the following is an acceptable tiling of a $2\times 23$ loop with $k=4$ (blue, green, red and yellow): but the following is not an acceptable tiling, because it violates the "no four corners meeting at a point" rule: Let $F_k(n)$ be the number of ways the $2\times n$ loop can be tiled subject to these rules when $k$ colours are available. (Not all $k$ colours have to be used.) Where reflecting horizontally or vertically would give a different tiling, these tilings are to be counted separately. For example, $F_4(3) = 104$, $F_5(7) = 3327300$, and $F_6(101)\equiv 75309980 \pmod{1\,000\,004\,321}$. Find $F_{10}(10\,004\,003\,002\,001) \bmod 1\,000\,004\,321$.
A certain type of flexible tile comes in three different sizes - $1 \times 1$, $1 \times 2$, and $1 \times 3$ - and in $k$ different colours. There is an unlimited number of tiles available in each combination of size and colour. These are used to tile a closed loop of width $2$ and length (circumference) $n$, where $n$ is a positive integer, subject to the following conditions: The loop must be fully covered by non-overlapping tiles. It is not permitted for four tiles to have their corners meeting at a single point. Adjacent tiles must be of different colours. For example, the following is an acceptable tiling of a $2\times 23$ loop with $k=4$ (blue, green, red and yellow): but the following is not an acceptable tiling, because it violates the "no four corners meeting at a point" rule: Let $F_k(n)$ be the number of ways the $2\times n$ loop can be tiled subject to these rules when $k$ colours are available. (Not all $k$ colours have to be used.) Where reflecting horizontally or vertically would give a different tiling, these tilings are to be counted separately. For example, $F_4(3) = 104$, $F_5(7) = 3327300$, and $F_6(101)\equiv 75309980 \pmod{1\,000\,004\,321}$. Find $F_{10}(10\,004\,003\,002\,001) \bmod 1\,000\,004\,321$.
<p>A certain type of flexible tile comes in three different sizes - $1 \times 1$, $1 \times 2$, and $1 \times 3$ - and in $k$ different colours. There is an unlimited number of tiles available in each combination of size and colour.</p> <p>These are used to tile a closed loop of width $2$ and length (circumference) $n$, where $n$ is a positive integer, subject to the following conditions:</p> <ul> <li>The loop must be fully covered by non-overlapping tiles.</li> <li>It is <i>not</i> permitted for four tiles to have their corners meeting at a single point.</li> <li>Adjacent tiles must be of different colours.</li> </ul> <p>For example, the following is an acceptable tiling of a $2\times 23$ loop with $k=4$ (blue, green, red and yellow):</p> <div class="center"> <img alt="Acceptable colouring" src="resources/images/0671_loop_acceptable.png?1678992054"/> </div> <p>but the following is not an acceptable tiling, because it violates the "no four corners meeting at a point" rule:</p> <div class="center"> <img alt="Unacceptable colouring" src="resources/images/0671_loop_unacceptable.png?1678992054"/> </div> <p>Let $F_k(n)$ be the number of ways the $2\times n$ loop can be tiled subject to these rules when $k$ colours are available. (Not all $k$ colours have to be used.) Where reflecting horizontally or vertically would give a different tiling, these tilings are to be counted separately.</p> <p>For example, $F_4(3) = 104$, $F_5(7) = 3327300$, and $F_6(101)\equiv 75309980 \pmod{1\,000\,004\,321}$.</p> <p>Find $F_{10}(10\,004\,003\,002\,001) \bmod 1\,000\,004\,321$.</p>
946106780
Sunday, 19th May 2019, 01:00 am
195
80%
hard
81
Path Sum: Two Ways
In the $5$ by $5$ matrix below, the minimal path sum from the top left to the bottom right, by only moving to the right and down, is indicated in bold red and is equal to $2427$. $$ \begin{pmatrix} \color{red}{131} & 673 & 234 & 103 & 18\\ \color{red}{201} & \color{red}{96} & \color{red}{342} & 965 & 150\\ 630 & 803 & \color{red}{746} & \color{red}{422} & 111\\ 537 & 699 & 497 & \color{red}{121} & 956\\ 805 & 732 & 524 & \color{red}{37} & \color{red}{331} \end{pmatrix} $$ Find the minimal path sum from the top left to the bottom right by only moving right and down in matrix.txt (right click and "Save Link/Target As..."), a 31K text file containing an $80$ by $80$ matrix.
In the $5$ by $5$ matrix below, the minimal path sum from the top left to the bottom right, by only moving to the right and down, is indicated in bold red and is equal to $2427$. $$ \begin{pmatrix} \color{red}{131} & 673 & 234 & 103 & 18\\ \color{red}{201} & \color{red}{96} & \color{red}{342} & 965 & 150\\ 630 & 803 & \color{red}{746} & \color{red}{422} & 111\\ 537 & 699 & 497 & \color{red}{121} & 956\\ 805 & 732 & 524 & \color{red}{37} & \color{red}{331} \end{pmatrix} $$ Find the minimal path sum from the top left to the bottom right by only moving right and down in matrix.txt (right click and "Save Link/Target As..."), a 31K text file containing an $80$ by $80$ matrix.
<p>In the $5$ by $5$ matrix below, the minimal path sum from the top left to the bottom right, by <b>only moving to the right and down</b>, is indicated in bold red and is equal to $2427$.</p> <div class="center"> $$ \begin{pmatrix} \color{red}{131} &amp; 673 &amp; 234 &amp; 103 &amp; 18\\ \color{red}{201} &amp; \color{red}{96} &amp; \color{red}{342} &amp; 965 &amp; 150\\ 630 &amp; 803 &amp; \color{red}{746} &amp; \color{red}{422} &amp; 111\\ 537 &amp; 699 &amp; 497 &amp; \color{red}{121} &amp; 956\\ 805 &amp; 732 &amp; 524 &amp; \color{red}{37} &amp; \color{red}{331} \end{pmatrix} $$ </div> <p>Find the minimal path sum from the top left to the bottom right by only moving right and down in <a href="resources/documents/0081_matrix.txt">matrix.txt</a> (right click and "Save Link/Target As..."), a 31K text file containing an $80$ by $80$ matrix.</p>
427337
Friday, 22nd October 2004, 06:00 pm
37695
10%
easy
914
Triangles inside Circles
For a given integer $R$ consider all primitive Pythagorean triangles that can fit inside, without touching, a circle with radius $R$. Define $F(R)$ to be the largest inradius of those triangles. You are given $F(100) = 36$. Find $F(10^{18})$.
For a given integer $R$ consider all primitive Pythagorean triangles that can fit inside, without touching, a circle with radius $R$. Define $F(R)$ to be the largest inradius of those triangles. You are given $F(100) = 36$. Find $F(10^{18})$.
<p> For a given integer $R$ consider all primitive Pythagorean triangles that can fit inside, without touching, a circle with radius $R$. Define $F(R)$ to be the largest inradius of those triangles. You are given $F(100) = 36$.</p> <p> Find $F(10^{18})$.</p>
414213562371805310
Saturday, 26th October 2024, 05:00 pm
474
20%
easy
483
Repeated Permutation
We define a permutation as an operation that rearranges the order of the elements $\{1, 2, 3, ..., n\}$. There are $n!$ such permutations, one of which leaves the elements in their initial order. For $n = 3$ we have $3! = 6$ permutations: $P_1 =$ keep the initial order $P_2 =$ exchange the 1st and 2nd elements $P_3 =$ exchange the 1st and 3rd elements $P_4 =$ exchange the 2nd and 3rd elements $P_5 =$ rotate the elements to the right $P_6 =$ rotate the elements to the left If we select one of these permutations, and we re-apply the same permutation repeatedly, we eventually restore the initial order.For a permutation $P_i$, let $f(P_i)$ be the number of steps required to restore the initial order by applying the permutation $P_i$ repeatedly.For $n = 3$, we obtain: $f(P_1) = 1$ : $(1,2,3) \to (1,2,3)$ $f(P_2) = 2$ : $(1,2,3) \to (2,1,3) \to (1,2,3)$ $f(P_3) = 2$ : $(1,2,3) \to (3,2,1) \to (1,2,3)$ $f(P_4) = 2$ : $(1,2,3) \to (1,3,2) \to (1,2,3)$ $f(P_5) = 3$ : $(1,2,3) \to (3,1,2) \to (2,3,1) \to (1,2,3)$ $f(P_6) = 3$ : $(1,2,3) \to (2,3,1) \to (3,1,2) \to (1,2,3)$ Let $g(n)$ be the average value of $f^2(P_i)$ over all permutations $P_i$ of length $n$.$g(3) = (1^2 + 2^2 + 2^2 + 2^2 + 3^2 + 3^2)/3! = 31/6 \approx 5.166666667\mathrm e0$$g(5) = 2081/120 \approx 1.734166667\mathrm e1$$g(20) = 12422728886023769167301/2432902008176640000 \approx 5.106136147\mathrm e3$ Find $g(350)$ and write the answer in scientific notation rounded to $10$ significant digits, using a lowercase e to separate mantissa and exponent, as in the examples above.
We define a permutation as an operation that rearranges the order of the elements $\{1, 2, 3, ..., n\}$. There are $n!$ such permutations, one of which leaves the elements in their initial order. For $n = 3$ we have $3! = 6$ permutations: $P_1 =$ keep the initial order $P_2 =$ exchange the 1st and 2nd elements $P_3 =$ exchange the 1st and 3rd elements $P_4 =$ exchange the 2nd and 3rd elements $P_5 =$ rotate the elements to the right $P_6 =$ rotate the elements to the left If we select one of these permutations, and we re-apply the same permutation repeatedly, we eventually restore the initial order.For a permutation $P_i$, let $f(P_i)$ be the number of steps required to restore the initial order by applying the permutation $P_i$ repeatedly.For $n = 3$, we obtain: $f(P_1) = 1$ : $(1,2,3) \to (1,2,3)$ $f(P_2) = 2$ : $(1,2,3) \to (2,1,3) \to (1,2,3)$ $f(P_3) = 2$ : $(1,2,3) \to (3,2,1) \to (1,2,3)$ $f(P_4) = 2$ : $(1,2,3) \to (1,3,2) \to (1,2,3)$ $f(P_5) = 3$ : $(1,2,3) \to (3,1,2) \to (2,3,1) \to (1,2,3)$ $f(P_6) = 3$ : $(1,2,3) \to (2,3,1) \to (3,1,2) \to (1,2,3)$ Let $g(n)$ be the average value of $f^2(P_i)$ over all permutations $P_i$ of length $n$.$g(3) = (1^2 + 2^2 + 2^2 + 2^2 + 3^2 + 3^2)/3! = 31/6 \approx 5.166666667\mathrm e0$$g(5) = 2081/120 \approx 1.734166667\mathrm e1$$g(20) = 12422728886023769167301/2432902008176640000 \approx 5.106136147\mathrm e3$ Find $g(350)$ and write the answer in scientific notation rounded to $10$ significant digits, using a lowercase e to separate mantissa and exponent, as in the examples above.
<p> We define a <dfn>permutation</dfn> as an operation that rearranges the order of the elements $\{1, 2, 3, ..., n\}$. There are $n!$ such permutations, one of which leaves the elements in their initial order. For $n = 3$ we have $3! = 6$ permutations: </p><ul> <li>$P_1 =$ keep the initial order</li> <li>$P_2 =$ exchange the 1<sup>st</sup> and 2<sup>nd</sup> elements</li> <li>$P_3 =$ exchange the 1<sup>st</sup> and 3<sup>rd</sup> elements</li> <li>$P_4 =$ exchange the 2<sup>nd</sup> and 3<sup>rd</sup> elements</li> <li>$P_5 =$ rotate the elements to the right</li> <li>$P_6 =$ rotate the elements to the left</li></ul> <p> If we select one of these permutations, and we re-apply the <u>same</u> permutation repeatedly, we eventually restore the initial order.<br/>For a permutation $P_i$, let $f(P_i)$ be the number of steps required to restore the initial order by applying the permutation $P_i$ repeatedly.<br/>For $n = 3$, we obtain:</p> <ul> <li>$f(P_1) = 1$ : $(1,2,3) \to (1,2,3)$</li> <li>$f(P_2) = 2$ : $(1,2,3) \to (2,1,3) \to (1,2,3)$</li> <li>$f(P_3) = 2$ : $(1,2,3) \to (3,2,1) \to (1,2,3)$</li> <li>$f(P_4) = 2$ : $(1,2,3) \to (1,3,2) \to (1,2,3)$</li> <li>$f(P_5) = 3$ : $(1,2,3) \to (3,1,2) \to (2,3,1) \to (1,2,3)$</li> <li>$f(P_6) = 3$ : $(1,2,3) \to (2,3,1) \to (3,1,2) \to (1,2,3)$</li></ul> <p> Let $g(n)$ be the average value of $f^2(P_i)$ over all permutations $P_i$ of length $n$.<br/>$g(3) = (1^2 + 2^2 + 2^2 + 2^2 + 3^2 + 3^2)/3! = 31/6 \approx 5.166666667\mathrm e0$<br/>$g(5) = 2081/120 \approx 1.734166667\mathrm e1$<br/>$g(20) = 12422728886023769167301/2432902008176640000 \approx 5.106136147\mathrm e3$ </p> <p> Find $g(350)$ and write the answer in scientific notation rounded to $10$ significant digits, using a lowercase e to separate mantissa and exponent, as in the examples above. </p>
4.993401567e22
Sunday, 5th October 2014, 10:00 am
291
100%
hard
604
Convex Path in Square
Let $F(N)$ be the maximum number of lattice points in an axis-aligned $N\times N$ square that the graph of a single strictly convex increasing function can pass through. You are given that $F(1) = 2$, $F(3) = 3$, $F(9) = 6$, $F(11) = 7$, $F(100) = 30$ and $F(50000) = 1898$. Below is the graph of a function reaching the maximum $3$ for $N=3$: Find $F(10^{18})$.
Let $F(N)$ be the maximum number of lattice points in an axis-aligned $N\times N$ square that the graph of a single strictly convex increasing function can pass through. You are given that $F(1) = 2$, $F(3) = 3$, $F(9) = 6$, $F(11) = 7$, $F(100) = 30$ and $F(50000) = 1898$. Below is the graph of a function reaching the maximum $3$ for $N=3$: Find $F(10^{18})$.
<p> Let $F(N)$ be the maximum number of lattice points in an axis-aligned $N\times N$ square that the graph of a single <strong>strictly convex</strong> increasing function can pass through. </p> <p> You are given that $F(1) = 2$, $F(3) = 3$, $F(9) = 6$, $F(11) = 7$, $F(100) = 30$ and $F(50000) = 1898$.<br/> Below is the graph of a function reaching the maximum $3$ for $N=3$: </p> <div class="center"> <img alt="0604_convex3.png" src="resources/images/0604_convex3.png?1678992054"/></div> <p> Find $F(10^{18})$. </p>
1398582231101
Sunday, 21st May 2017, 04:00 am
556
40%
medium
856
Waiting for a Pair
A standard 52-card deck comprises 13 ranks in four suits. A pair is a set of two cards of the same rank. Cards are drawn, without replacement, from a well shuffled 52-card deck waiting for consecutive cards that form a pair. For example, the probability of finding a pair in the first two draws is $\frac{1}{17}$. Cards are drawn until either such a pair is found or the pack is exhausted waiting for one. In the latter case we say that all 52 cards were drawn. Find the expected number of cards that were drawn. Give your answer rounded to eight places after the decimal point.
A standard 52-card deck comprises 13 ranks in four suits. A pair is a set of two cards of the same rank. Cards are drawn, without replacement, from a well shuffled 52-card deck waiting for consecutive cards that form a pair. For example, the probability of finding a pair in the first two draws is $\frac{1}{17}$. Cards are drawn until either such a pair is found or the pack is exhausted waiting for one. In the latter case we say that all 52 cards were drawn. Find the expected number of cards that were drawn. Give your answer rounded to eight places after the decimal point.
<p>A standard 52-card deck comprises 13 ranks in four suits. A <i>pair</i> is a set of two cards of the same rank.</p> <p>Cards are drawn, without replacement, from a well shuffled 52-card deck waiting for consecutive cards that form a pair. For example, the probability of finding a pair in the first two draws is $\frac{1}{17}$.</p> <p>Cards are drawn until either such a pair is found or the pack is exhausted waiting for one. In the latter case we say that all 52 cards were drawn.</p> <p>Find the expected number of cards that were drawn. Give your answer rounded to eight places after the decimal point.</p>
17.09661501
Saturday, 23rd September 2023, 11:00 pm
630
20%
easy
546
The Floor's Revenge
Define $f_k(n) = \sum_{i=0}^n f_k(\lfloor\frac i k \rfloor)$ where $f_k(0) = 1$ and $\lfloor x \rfloor$ denotes the floor function. For example, $f_5(10) = 18$, $f_7(100) = 1003$, and $f_2(10^3) = 264830889564$. Find $(\sum_{k=2}^{10} f_k(10^{14})) \bmod (10^9+7)$.
Define $f_k(n) = \sum_{i=0}^n f_k(\lfloor\frac i k \rfloor)$ where $f_k(0) = 1$ and $\lfloor x \rfloor$ denotes the floor function. For example, $f_5(10) = 18$, $f_7(100) = 1003$, and $f_2(10^3) = 264830889564$. Find $(\sum_{k=2}^{10} f_k(10^{14})) \bmod (10^9+7)$.
<p>Define $f_k(n) = \sum_{i=0}^n f_k(\lfloor\frac i k \rfloor)$ where $f_k(0) = 1$ and $\lfloor x \rfloor$ denotes the floor function.</p> <p>For example, $f_5(10) = 18$, $f_7(100) = 1003$, and $f_2(10^3) = 264830889564$.</p> <p>Find $(\sum_{k=2}^{10} f_k(10^{14})) \bmod (10^9+7)$.</p>
215656873
Sunday, 7th February 2016, 01:00 am
269
85%
hard
209
Circular Logic
A $k$-input binary truth table is a map from $k$ input bits (binary digits, $0$ [false] or $1$ [true]) to $1$ output bit. For example, the $2$-input binary truth tables for the logical $\mathbin{\text{AND}}$ and $\mathbin{\text{XOR}}$ functions are: $x$ $y$ $x \mathbin{\text{AND}} y$ $0$$0$$0$$0$$1$$0$$1$$0$$0$$1$$1$$1$ $x$ $y$ $x\mathbin{\text{XOR}}y$ $0$$0$$0$$0$$1$$1$$1$$0$$1$$1$$1$$0$ How many $6$-input binary truth tables, $\tau$, satisfy the formula $$\tau(a, b, c, d, e, f) \mathbin{\text{AND}} \tau(b, c, d, e, f, a \mathbin{\text{XOR}} (b \mathbin{\text{AND}} c)) = 0$$ for all $6$-bit inputs $(a, b, c, d, e, f)$?
A $k$-input binary truth table is a map from $k$ input bits (binary digits, $0$ [false] or $1$ [true]) to $1$ output bit. For example, the $2$-input binary truth tables for the logical $\mathbin{\text{AND}}$ and $\mathbin{\text{XOR}}$ functions are: $x$ $y$ $x \mathbin{\text{AND}} y$ $0$$0$$0$$0$$1$$0$$1$$0$$0$$1$$1$$1$ $x$ $y$ $x\mathbin{\text{XOR}}y$ $0$$0$$0$$0$$1$$1$$1$$0$$1$$1$$1$$0$ How many $6$-input binary truth tables, $\tau$, satisfy the formula $$\tau(a, b, c, d, e, f) \mathbin{\text{AND}} \tau(b, c, d, e, f, a \mathbin{\text{XOR}} (b \mathbin{\text{AND}} c)) = 0$$ for all $6$-bit inputs $(a, b, c, d, e, f)$?
<p>A $k$-input <strong>binary truth table</strong> is a map from $k$ input bits (binary digits, $0$ [false] or $1$ [true]) to $1$ output bit. For example, the $2$-input binary truth tables for the logical $\mathbin{\text{AND}}$ and $\mathbin{\text{XOR}}$ functions are:</p> <div style="float:left;margin:10px 50px;text-align:center;"> <table class="grid"><tr><th style="width:50px;">$x$</th> <th style="width:50px;">$y$</th> <th>$x \mathbin{\text{AND}} y$</th></tr> <tr><td align="center">$0$</td><td align="center">$0$</td><td align="center">$0$</td></tr><tr><td align="center">$0$</td><td align="center">$1$</td><td align="center">$0$</td></tr><tr><td align="center">$1$</td><td align="center">$0$</td><td align="center">$0$</td></tr><tr><td align="center">$1$</td><td align="center">$1$</td><td align="center">$1$</td></tr></table> </div> <div style="float:left;margin:10px 50px;text-align:center;"> <table class="grid"><tr><th style="width:50px;">$x$</th> <th style="width:50px;">$y$</th> <th>$x\mathbin{\text{XOR}}y$</th></tr> <tr><td align="center">$0$</td><td align="center">$0$</td><td align="center">$0$</td></tr><tr><td align="center">$0$</td><td align="center">$1$</td><td align="center">$1$</td></tr><tr><td align="center">$1$</td><td align="center">$0$</td><td align="center">$1$</td></tr><tr><td align="center">$1$</td><td align="center">$1$</td><td align="center">$0$</td></tr></table> </div> <br clear="all"/> <p>How many $6$-input binary truth tables, $\tau$, satisfy the formula $$\tau(a, b, c, d, e, f) \mathbin{\text{AND}} \tau(b, c, d, e, f, a \mathbin{\text{XOR}} (b \mathbin{\text{AND}} c)) = 0$$ for all $6$-bit inputs $(a, b, c, d, e, f)$? </p>
15964587728784
Friday, 19th September 2008, 06:00 pm
2772
60%
hard
346
Strong Repunits
The number $7$ is special, because $7$ is $111$ written in base $2$, and $11$ written in base $6$ (i.e. $7_{10} = 11_6 = 111_2$). In other words, $7$ is a repunit in at least two bases $b \gt 1$. We shall call a positive integer with this property a strong repunit. It can be verified that there are $8$ strong repunits below $50$: $\{1,7,13,15,21,31,40,43\}$. Furthermore, the sum of all strong repunits below $1000$ equals $15864$. Find the sum of all strong repunits below $10^{12}$.
The number $7$ is special, because $7$ is $111$ written in base $2$, and $11$ written in base $6$ (i.e. $7_{10} = 11_6 = 111_2$). In other words, $7$ is a repunit in at least two bases $b \gt 1$. We shall call a positive integer with this property a strong repunit. It can be verified that there are $8$ strong repunits below $50$: $\{1,7,13,15,21,31,40,43\}$. Furthermore, the sum of all strong repunits below $1000$ equals $15864$. Find the sum of all strong repunits below $10^{12}$.
<p> The number $7$ is special, because $7$ is $111$ written in base $2$, and $11$ written in base $6$ (i.e. $7_{10} = 11_6 = 111_2$). In other words, $7$ is a repunit in at least two bases $b \gt 1$. </p> <p> We shall call a positive integer with this property a strong repunit. It can be verified that there are $8$ strong repunits below $50$: $\{1,7,13,15,21,31,40,43\}$.<br/> Furthermore, the sum of all strong repunits below $1000$ equals $15864$. </p> Find the sum of all strong repunits below $10^{12}$.
336108797689259276
Saturday, 3rd September 2011, 04:00 pm
4816
15%
easy
257
Angular Bisectors
Given is an integer sided triangle $ABC$ with sides $a \le b \le c$. ($AB = c$, $BC = a$ and $AC = b$.) The angular bisectors of the triangle intersect the sides at points $E$, $F$ and $G$ (see picture below). The segments $EF$, $EG$ and $FG$ partition the triangle $ABC$ into four smaller triangles: $AEG$, $BFE$, $CGF$ and $EFG$. It can be proven that for each of these four triangles the ratio area($ABC$)/area(subtriangle) is rational. However, there exist triangles for which some or all of these ratios are integral. How many triangles $ABC$ with perimeter $\le 100\,000\,000$ exist so that the ratio area($ABC$)/area($AEG$) is integral?
Given is an integer sided triangle $ABC$ with sides $a \le b \le c$. ($AB = c$, $BC = a$ and $AC = b$.) The angular bisectors of the triangle intersect the sides at points $E$, $F$ and $G$ (see picture below). The segments $EF$, $EG$ and $FG$ partition the triangle $ABC$ into four smaller triangles: $AEG$, $BFE$, $CGF$ and $EFG$. It can be proven that for each of these four triangles the ratio area($ABC$)/area(subtriangle) is rational. However, there exist triangles for which some or all of these ratios are integral. How many triangles $ABC$ with perimeter $\le 100\,000\,000$ exist so that the ratio area($ABC$)/area($AEG$) is integral?
<p>Given is an integer sided triangle $ABC$ with sides $a \le b \le c$. ($AB = c$, $BC = a$ and $AC = b$.)<br/> The angular bisectors of the triangle intersect the sides at points $E$, $F$ and $G$ (see picture below). </p> <div align="center"> <img alt="0257_bisector.gif" class="dark_img" src="resources/images/0257_bisector.gif?1678992056"/><br/></div> <p> The segments $EF$, $EG$ and $FG$ partition the triangle $ABC$ into four smaller triangles: $AEG$, $BFE$, $CGF$ and $EFG$.<br/> It can be proven that for each of these four triangles the ratio area($ABC$)/area(subtriangle) is rational.<br/> However, there exist triangles for which some or all of these ratios are integral. </p> <p> How many triangles $ABC$ with perimeter $\le 100\,000\,000$ exist so that the ratio area($ABC$)/area($AEG$) is integral? </p>
139012411
Saturday, 26th September 2009, 05:00 am
787
85%
hard
566
Cake Icing Puzzle
Adam plays the following game with his birthday cake. He cuts a piece forming a circular sector of $60$ degrees and flips the piece upside down, with the icing on the bottom. He then rotates the cake by $60$ degrees counterclockwise, cuts an adjacent $60$ degree piece and flips it upside down. He keeps repeating this, until after a total of twelve steps, all the icing is back on top. Amazingly, this works for any piece size, even if the cutting angle is an irrational number: all the icing will be back on top after a finite number of steps. Now, Adam tries something different: he alternates cutting pieces of size $x=\frac{360}{9}$ degrees, $y=\frac{360}{10}$ degrees and $z=\frac{360 }{\sqrt{11}}$ degrees. The first piece he cuts has size $x$ and he flips it. The second has size $y$ and he flips it. The third has size $z$ and he flips it. He repeats this with pieces of size $x$, $y$ and $z$ in that order until all the icing is back on top, and discovers he needs $60$ flips altogether. Let $F(a, b, c)$ be the minimum number of piece flips needed to get all the icing back on top for pieces of size $x=\frac{360}{a}$ degrees, $y=\frac{360}{b}$ degrees and $z=\frac{360}{\sqrt{c}}$ degrees. Let $G(n) = \sum_{9 \le a \lt b \lt c \le n} F(a,b,c)$, for integers $a$, $b$ and $c$. You are given that $F(9, 10, 11) = 60$, $F(10, 14, 16) = 506$, $F(15, 16, 17) = 785232$. You are also given $G(11) = 60$, $G(14) = 58020$ and $G(17) = 1269260$. Find $G(53)$.
Adam plays the following game with his birthday cake. He cuts a piece forming a circular sector of $60$ degrees and flips the piece upside down, with the icing on the bottom. He then rotates the cake by $60$ degrees counterclockwise, cuts an adjacent $60$ degree piece and flips it upside down. He keeps repeating this, until after a total of twelve steps, all the icing is back on top. Amazingly, this works for any piece size, even if the cutting angle is an irrational number: all the icing will be back on top after a finite number of steps. Now, Adam tries something different: he alternates cutting pieces of size $x=\frac{360}{9}$ degrees, $y=\frac{360}{10}$ degrees and $z=\frac{360 }{\sqrt{11}}$ degrees. The first piece he cuts has size $x$ and he flips it. The second has size $y$ and he flips it. The third has size $z$ and he flips it. He repeats this with pieces of size $x$, $y$ and $z$ in that order until all the icing is back on top, and discovers he needs $60$ flips altogether. Let $F(a, b, c)$ be the minimum number of piece flips needed to get all the icing back on top for pieces of size $x=\frac{360}{a}$ degrees, $y=\frac{360}{b}$ degrees and $z=\frac{360}{\sqrt{c}}$ degrees. Let $G(n) = \sum_{9 \le a \lt b \lt c \le n} F(a,b,c)$, for integers $a$, $b$ and $c$. You are given that $F(9, 10, 11) = 60$, $F(10, 14, 16) = 506$, $F(15, 16, 17) = 785232$. You are also given $G(11) = 60$, $G(14) = 58020$ and $G(17) = 1269260$. Find $G(53)$.
<p>Adam plays the following game with his birthday cake.</p> <p>He cuts a piece forming a circular sector of $60$ degrees and flips the piece upside down, with the icing on the bottom.<br/> He then rotates the cake by $60$ degrees counterclockwise, cuts an adjacent $60$ degree piece and flips it upside down.<br/> He keeps repeating this, until after a total of twelve steps, all the icing is back on top.</p> <p>Amazingly, this works for any piece size, even if the cutting angle is an irrational number: all the icing will be back on top after a finite number of steps.</p> <p>Now, Adam tries something different: he alternates cutting pieces of size $x=\frac{360}{9}$ degrees, $y=\frac{360}{10}$ degrees and $z=\frac{360 }{\sqrt{11}}$ degrees. The first piece he cuts has size $x$ and he flips it. The second has size $y$ and he flips it. The third has size $z$ and he flips it. He repeats this with pieces of size $x$, $y$ and $z$ in that order until all the icing is back on top, and discovers he needs $60$ flips altogether.</p> <div align="center"><img alt="0566-cakeicingpuzzle.gif" src="resources/images/0566-cakeicingpuzzle.gif?1678992057"/></div> <p>Let $F(a, b, c)$ be the minimum number of piece flips needed to get all the icing back on top for pieces of size $x=\frac{360}{a}$ degrees, $y=\frac{360}{b}$ degrees and $z=\frac{360}{\sqrt{c}}$ degrees.<br/> Let $G(n) = \sum_{9 \le a \lt b \lt c \le n} F(a,b,c)$, for integers $a$, $b$ and $c$.</p> <p>You are given that $F(9, 10, 11) = 60$, $F(10, 14, 16) = 506$, $F(15, 16, 17) = 785232$.<br/> You are also given $G(11) = 60$, $G(14) = 58020$ and $G(17) = 1269260$.</p> <p>Find $G(53)$.</p>
329569369413585
Saturday, 25th June 2016, 01:00 pm
213
100%
hard
134
Prime Pair Connection
Consider the consecutive primes $p_1 = 19$ and $p_2 = 23$. It can be verified that $1219$ is the smallest number such that the last digits are formed by $p_1$ whilst also being divisible by $p_2$. In fact, with the exception of $p_1 = 3$ and $p_2 = 5$, for every pair of consecutive primes, $p_2 \gt p_1$, there exist values of $n$ for which the last digits are formed by $p_1$ and $n$ is divisible by $p_2$. Let $S$ be the smallest of these values of $n$. Find $\sum S$ for every pair of consecutive primes with $5 \le p_1 \le 1000000$.
Consider the consecutive primes $p_1 = 19$ and $p_2 = 23$. It can be verified that $1219$ is the smallest number such that the last digits are formed by $p_1$ whilst also being divisible by $p_2$. In fact, with the exception of $p_1 = 3$ and $p_2 = 5$, for every pair of consecutive primes, $p_2 \gt p_1$, there exist values of $n$ for which the last digits are formed by $p_1$ and $n$ is divisible by $p_2$. Let $S$ be the smallest of these values of $n$. Find $\sum S$ for every pair of consecutive primes with $5 \le p_1 \le 1000000$.
<p>Consider the consecutive primes $p_1 = 19$ and $p_2 = 23$. It can be verified that $1219$ is the smallest number such that the last digits are formed by $p_1$ whilst also being divisible by $p_2$.</p> <p>In fact, with the exception of $p_1 = 3$ and $p_2 = 5$, for every pair of consecutive primes, $p_2 \gt p_1$, there exist values of $n$ for which the last digits are formed by $p_1$ and $n$ is divisible by $p_2$. Let $S$ be the smallest of these values of $n$.</p> <p>Find $\sum S$ for every pair of consecutive primes with $5 \le p_1 \le 1000000$.</p>
18613426663617118
Friday, 15th December 2006, 06:00 pm
7860
45%
medium
913
Row-major vs Column-major
The numbers from $1$ to $12$ can be arranged into a $3 \times 4$ matrix in either row-major or column-major order: $$R=\begin{pmatrix} 1 & 2 & 3 & 4\\ 5 & 6 & 7 & 8\\ 9 & 10 & 11 & 12\end{pmatrix}, C=\begin{pmatrix} 1 & 4 & 7 & 10\\ 2 & 5 & 8 & 11\\ 3 & 6 & 9 & 12\end{pmatrix}$$ By swapping two entries at a time, at least $8$ swaps are needed to transform $R$ to $C$. Let $S(n, m)$ be the minimal number of swaps needed to transform an $n\times m$ matrix of $1$ to $nm$ from row-major order to column-major order. Thus $S(3, 4) = 8$. You are given that the sum of $S(n, m)$ for $2 \leq n \leq m \leq 100$ is $12578833$. Find the sum of $S(n^4, m^4)$ for $2 \leq n \leq m \leq 100$.
The numbers from $1$ to $12$ can be arranged into a $3 \times 4$ matrix in either row-major or column-major order: $$R=\begin{pmatrix} 1 & 2 & 3 & 4\\ 5 & 6 & 7 & 8\\ 9 & 10 & 11 & 12\end{pmatrix}, C=\begin{pmatrix} 1 & 4 & 7 & 10\\ 2 & 5 & 8 & 11\\ 3 & 6 & 9 & 12\end{pmatrix}$$ By swapping two entries at a time, at least $8$ swaps are needed to transform $R$ to $C$. Let $S(n, m)$ be the minimal number of swaps needed to transform an $n\times m$ matrix of $1$ to $nm$ from row-major order to column-major order. Thus $S(3, 4) = 8$. You are given that the sum of $S(n, m)$ for $2 \leq n \leq m \leq 100$ is $12578833$. Find the sum of $S(n^4, m^4)$ for $2 \leq n \leq m \leq 100$.
<p> The numbers from $1$ to $12$ can be arranged into a $3 \times 4$ matrix in either <strong>row-major</strong> or <strong>column-major</strong> order: $$R=\begin{pmatrix} 1 &amp; 2 &amp; 3 &amp; 4\\ 5 &amp; 6 &amp; 7 &amp; 8\\ 9 &amp; 10 &amp; 11 &amp; 12\end{pmatrix}, C=\begin{pmatrix} 1 &amp; 4 &amp; 7 &amp; 10\\ 2 &amp; 5 &amp; 8 &amp; 11\\ 3 &amp; 6 &amp; 9 &amp; 12\end{pmatrix}$$ By swapping two entries at a time, at least $8$ swaps are needed to transform $R$ to $C$.</p> <p> Let $S(n, m)$ be the minimal number of swaps needed to transform an $n\times m$ matrix of $1$ to $nm$ from row-major order to column-major order. Thus $S(3, 4) = 8$.</p> <p> You are given that the sum of $S(n, m)$ for $2 \leq n \leq m \leq 100$ is $12578833$.</p> <p> Find the sum of $S(n^4, m^4)$ for $2 \leq n \leq m \leq 100$.</p>
2101925115560555020
Saturday, 19th October 2024, 02:00 pm
140
60%
hard
146
Investigating a Prime Pattern
The smallest positive integer $n$ for which the numbers $n^2 + 1$, $n^2 + 3$, $n^2 + 7$, $n^2 + 9$, $n^2 + 13$, and $n^2 + 27$ are consecutive primes is $10$. The sum of all such integers $n$ below one-million is $1242490$. What is the sum of all such integers $n$ below $150$ million?
The smallest positive integer $n$ for which the numbers $n^2 + 1$, $n^2 + 3$, $n^2 + 7$, $n^2 + 9$, $n^2 + 13$, and $n^2 + 27$ are consecutive primes is $10$. The sum of all such integers $n$ below one-million is $1242490$. What is the sum of all such integers $n$ below $150$ million?
<p>The smallest positive integer $n$ for which the numbers $n^2 + 1$, $n^2 + 3$, $n^2 + 7$, $n^2 + 9$, $n^2 + 13$, and $n^2 + 27$ are consecutive primes is $10$. The sum of all such integers $n$ below one-million is $1242490$.</p> <p>What is the sum of all such integers $n$ below $150$ million?</p>
676333270
Saturday, 24th March 2007, 09:00 am
5740
50%
medium
754
Product of Gauss Factorials
The Gauss Factorial of a number $n$ is defined as the product of all positive numbers $\leq n$ that are relatively prime to $n$. For example $g(10)=1\times 3\times 7\times 9 = 189$. Also we define $$\displaystyle G(n) = \prod_{i=1}^{n}g(i)$$ You are given $G(10) = 23044331520000$. Find $G(10^8)$. Give your answer modulo $1\,000\,000\,007$.
The Gauss Factorial of a number $n$ is defined as the product of all positive numbers $\leq n$ that are relatively prime to $n$. For example $g(10)=1\times 3\times 7\times 9 = 189$. Also we define $$\displaystyle G(n) = \prod_{i=1}^{n}g(i)$$ You are given $G(10) = 23044331520000$. Find $G(10^8)$. Give your answer modulo $1\,000\,000\,007$.
<p>The <strong>Gauss Factorial</strong> of a number $n$ is defined as the product of all positive numbers $\leq n$ that are relatively prime to $n$. For example $g(10)=1\times 3\times 7\times 9 = 189$. </p> <p>Also we define $$\displaystyle G(n) = \prod_{i=1}^{n}g(i)$$</p> <p>You are given $G(10) = 23044331520000$.</p> <p>Find $G(10^8)$. Give your answer modulo $1\,000\,000\,007$.</p>
785845900
Sunday, 4th April 2021, 08:00 am
784
20%
easy
63
Powerful Digit Counts
The $5$-digit number, $16807=7^5$, is also a fifth power. Similarly, the $9$-digit number, $134217728=8^9$, is a ninth power. How many $n$-digit positive integers exist which are also an $n$th power?
The $5$-digit number, $16807=7^5$, is also a fifth power. Similarly, the $9$-digit number, $134217728=8^9$, is a ninth power. How many $n$-digit positive integers exist which are also an $n$th power?
<p>The $5$-digit number, $16807=7^5$, is also a fifth power. Similarly, the $9$-digit number, $134217728=8^9$, is a ninth power.</p> <p>How many $n$-digit positive integers exist which are also an $n$th power?</p>
49
Friday, 13th February 2004, 06:00 pm
47358
5%
easy
872
Recursive Tree
A sequence of rooted trees $T_n$ is constructed such that $T_n$ has $n$ nodes numbered $1$ to $n$. The sequence starts at $T_1$, a tree with a single node as a root with the number $1$. For $n > 1$, $T_n$ is constructed from $T_{n-1}$ using the following procedure: Trace a path from the root of $T_{n-1}$ to a leaf by following the largest-numbered child at each node. Remove all edges along the traced path, disconnecting all nodes along it from their parents. Connect all orphaned nodes directly to a new node numbered $n$, which becomes the root of $T_n$. For example, the following figure shows $T_6$ and $T_7$. The path traced through $T_6$ during the construction of $T_7$ is coloured red. Let $f(n, k)$ be the sum of the node numbers along the path connecting the root of $T_n$ to the node $k$, including the root and the node $k$. For example, $f(6, 1) = 6 + 5 + 1 = 12$ and $f(10, 3) = 29$. Find $f(10^{17}, 9^{17})$.
A sequence of rooted trees $T_n$ is constructed such that $T_n$ has $n$ nodes numbered $1$ to $n$. The sequence starts at $T_1$, a tree with a single node as a root with the number $1$. For $n > 1$, $T_n$ is constructed from $T_{n-1}$ using the following procedure: Trace a path from the root of $T_{n-1}$ to a leaf by following the largest-numbered child at each node. Remove all edges along the traced path, disconnecting all nodes along it from their parents. Connect all orphaned nodes directly to a new node numbered $n$, which becomes the root of $T_n$. For example, the following figure shows $T_6$ and $T_7$. The path traced through $T_6$ during the construction of $T_7$ is coloured red. Let $f(n, k)$ be the sum of the node numbers along the path connecting the root of $T_n$ to the node $k$, including the root and the node $k$. For example, $f(6, 1) = 6 + 5 + 1 = 12$ and $f(10, 3) = 29$. Find $f(10^{17}, 9^{17})$.
<p>A sequence of rooted trees $T_n$ is constructed such that $T_n$ has $n$ nodes numbered $1$ to $n$.</p> <p>The sequence starts at $T_1$, a tree with a single node as a root with the number $1$.</p> <p>For $n &gt; 1$, $T_n$ is constructed from $T_{n-1}$ using the following procedure: </p><ol> <li>Trace a path from the root of $T_{n-1}$ to a leaf by following the largest-numbered child at each node.</li> <li>Remove all edges along the traced path, disconnecting all nodes along it from their parents.</li> <li>Connect all orphaned nodes directly to a new node numbered $n$, which becomes the root of $T_n$.</li> </ol> <p>For example, the following figure shows $T_6$ and $T_7$. The path traced through $T_6$ during the construction of $T_7$ is coloured red.</p> <div class="center"> <img alt="0872_tree.png" src="resources/images/0872_tree.png?1703839264"/></div> <p>Let $f(n, k)$ be the sum of the node numbers along the path connecting the root of $T_n$ to the node $k$, including the root and the node $k$. For example, $f(6, 1) = 6 + 5 + 1 = 12$ and $f(10, 3) = 29$.</p> <p>Find $f(10^{17}, 9^{17})$.</p>
2903144925319290239
Saturday, 13th January 2024, 10:00 pm
1028
5%
easy
51
Prime Digit Replacements
By replacing the 1st digit of the 2-digit number *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime. By replacing the 3rd and 4th digits of 56**3 with the same digit, this 5-digit number is the first example having seven primes among the ten generated numbers, yielding the family: 56003, 56113, 56333, 56443, 56663, 56773, and 56993. Consequently 56003, being the first member of this family, is the smallest prime with this property. Find the smallest prime which, by replacing part of the number (not necessarily adjacent digits) with the same digit, is part of an eight prime value family.
By replacing the 1st digit of the 2-digit number *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime. By replacing the 3rd and 4th digits of 56**3 with the same digit, this 5-digit number is the first example having seven primes among the ten generated numbers, yielding the family: 56003, 56113, 56333, 56443, 56663, 56773, and 56993. Consequently 56003, being the first member of this family, is the smallest prime with this property. Find the smallest prime which, by replacing part of the number (not necessarily adjacent digits) with the same digit, is part of an eight prime value family.
<p>By replacing the 1<sup>st</sup> digit of the 2-digit number *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime.</p> <p>By replacing the 3<sup>rd</sup> and 4<sup>th</sup> digits of 56**3 with the same digit, this 5-digit number is the first example having seven primes among the ten generated numbers, yielding the family: 56003, 56113, 56333, 56443, 56663, 56773, and 56993. Consequently 56003, being the first member of this family, is the smallest prime with this property.</p> <p>Find the smallest prime which, by replacing part of the number (not necessarily adjacent digits) with the same digit, is part of an eight prime value family.</p>
121313
Friday, 29th August 2003, 06:00 pm
38149
15%
easy
648
Skipping Squares
For some fixed $\rho \in [0, 1]$, we begin a sum $s$ at $0$ and repeatedly apply a process: With probability $\rho$, we add $1$ to $s$, otherwise we add $2$ to $s$. The process ends when either $s$ is a perfect square or $s$ exceeds $10^{18}$, whichever occurs first. For example, if $s$ goes through $0, 2, 3, 5, 7, 9$, the process ends at $s=9$, and two squares $1$ and $4$ were skipped over. Let $f(\rho)$ be the expected number of perfect squares skipped over when the process finishes. It can be shown that the power series for $f(\rho)$ is $\sum_{k=0}^\infty a_k \rho^k$ for a suitable (unique) choice of coefficients $a_k$. Some of the first few coefficients are $a_0=1$, $a_1=0$, $a_5=-18$, $a_{10}=45176$. Let $F(n) = \sum_{k=0}^n a_k$. You are given that $F(10) = 53964$ and $F(50) \equiv 842418857 \pmod{10^9}$. Find $F(1000)$, and give your answer modulo $10^9$.
For some fixed $\rho \in [0, 1]$, we begin a sum $s$ at $0$ and repeatedly apply a process: With probability $\rho$, we add $1$ to $s$, otherwise we add $2$ to $s$. The process ends when either $s$ is a perfect square or $s$ exceeds $10^{18}$, whichever occurs first. For example, if $s$ goes through $0, 2, 3, 5, 7, 9$, the process ends at $s=9$, and two squares $1$ and $4$ were skipped over. Let $f(\rho)$ be the expected number of perfect squares skipped over when the process finishes. It can be shown that the power series for $f(\rho)$ is $\sum_{k=0}^\infty a_k \rho^k$ for a suitable (unique) choice of coefficients $a_k$. Some of the first few coefficients are $a_0=1$, $a_1=0$, $a_5=-18$, $a_{10}=45176$. Let $F(n) = \sum_{k=0}^n a_k$. You are given that $F(10) = 53964$ and $F(50) \equiv 842418857 \pmod{10^9}$. Find $F(1000)$, and give your answer modulo $10^9$.
<p>For some fixed $\rho \in [0, 1]$, we begin a sum $s$ at $0$ and repeatedly apply a process: With probability $\rho$, we add $1$ to $s$, otherwise we add $2$ to $s$.</p> <p>The process ends when either $s$ is a perfect square or $s$ exceeds $10^{18}$, whichever occurs first. For example, if $s$ goes through $0, 2, 3, 5, 7, 9$, the process ends at $s=9$, and two squares $1$ and $4$ were skipped over.</p> <p>Let $f(\rho)$ be the expected number of perfect squares skipped over when the process finishes.</p> <p>It can be shown that the power series for $f(\rho)$ is $\sum_{k=0}^\infty a_k \rho^k$ for a suitable (unique) choice of coefficients $a_k$. Some of the first few coefficients are $a_0=1$, $a_1=0$, $a_5=-18$, $a_{10}=45176$.</p> <p>Let $F(n) = \sum_{k=0}^n a_k$. You are given that $F(10) = 53964$ and $F(50) \equiv 842418857 \pmod{10^9}$.</p> <p>Find $F(1000)$, and give your answer modulo $10^9$.</p>
301483197
Sunday, 23rd December 2018, 10:00 am
319
45%
medium
91
Right Triangles with Integer Coordinates
The points $P(x_1, y_1)$ and $Q(x_2, y_2)$ are plotted at integer co-ordinates and are joined to the origin, $O(0,0)$, to form $\triangle OPQ$. There are exactly fourteen triangles containing a right angle that can be formed when each co-ordinate lies between $0$ and $2$ inclusive; that is, $0 \le x_1, y_1, x_2, y_2 \le 2$. Given that $0 \le x_1, y_1, x_2, y_2 \le 50$, how many right triangles can be formed?
The points $P(x_1, y_1)$ and $Q(x_2, y_2)$ are plotted at integer co-ordinates and are joined to the origin, $O(0,0)$, to form $\triangle OPQ$. There are exactly fourteen triangles containing a right angle that can be formed when each co-ordinate lies between $0$ and $2$ inclusive; that is, $0 \le x_1, y_1, x_2, y_2 \le 2$. Given that $0 \le x_1, y_1, x_2, y_2 \le 50$, how many right triangles can be formed?
<p>The points $P(x_1, y_1)$ and $Q(x_2, y_2)$ are plotted at integer co-ordinates and are joined to the origin, $O(0,0)$, to form $\triangle OPQ$.</p> <div class="center"> <img alt="" class="dark_img" src="resources/images/0091_1.png?1678992052"/><br/></div> <p>There are exactly fourteen triangles containing a right angle that can be formed when each co-ordinate lies between $0$ and $2$ inclusive; that is, $0 \le x_1, y_1, x_2, y_2 \le 2$.</p> <div class="center"> <img alt="" src="resources/images/0091_2.png?1678992052"/><br/></div> <p>Given that $0 \le x_1, y_1, x_2, y_2 \le 50$, how many right triangles can be formed?</p>
14234
Friday, 18th March 2005, 06:00 pm
17353
25%
easy
497
Drunken Tower of Hanoi
Bob is very familiar with the famous mathematical puzzle/game, "Tower of Hanoi," which consists of three upright rods and disks of different sizes that can slide onto any of the rods. The game begins with a stack of $n$ disks placed on the leftmost rod in descending order by size. The objective of the game is to move all of the disks from the leftmost rod to the rightmost rod, given the following restrictions: Only one disk can be moved at a time. A valid move consists of taking the top disk from one stack and placing it onto another stack (or an empty rod). No disk can be placed on top of a smaller disk. Moving on to a variant of this game, consider a long room $k$ units (square tiles) wide, labeled from $1$ to $k$ in ascending order. Three rods are placed at squares $a$, $b$, and $c$, and a stack of $n$ disks is placed on the rod at square $a$. Bob begins the game standing at square $b$. His objective is to play the Tower of Hanoi game by moving all of the disks to the rod at square $c$. However, Bob can only pick up or set down a disk if he is on the same square as the rod/stack in question. Unfortunately, Bob is also drunk. On a given move, Bob will either stumble one square to the left or one square to the right with equal probability, unless Bob is at either end of the room, in which case he can only move in one direction. Despite Bob's inebriated state, he is still capable of following the rules of the game itself, as well as choosing when to pick up or put down a disk. The following animation depicts a side-view of a sample game for $n = 3$, $k = 7$, $a = 2$, $b = 4$, and $c = 6$: Let $E(n, k, a, b, c)$ be the expected number of squares that Bob travels during a single optimally-played game. A game is played optimally if the number of disk-pickups is minimized. Interestingly enough, the result is always an integer. For example, $E(2,5,1,3,5) = 60$ and $E(3,20,4,9,17) = 2358$. Find the last nine digits of $\sum_{1\le n \le 10000} E(n,10^n,3^n,6^n,9^n)$.
Bob is very familiar with the famous mathematical puzzle/game, "Tower of Hanoi," which consists of three upright rods and disks of different sizes that can slide onto any of the rods. The game begins with a stack of $n$ disks placed on the leftmost rod in descending order by size. The objective of the game is to move all of the disks from the leftmost rod to the rightmost rod, given the following restrictions: Only one disk can be moved at a time. A valid move consists of taking the top disk from one stack and placing it onto another stack (or an empty rod). No disk can be placed on top of a smaller disk. Moving on to a variant of this game, consider a long room $k$ units (square tiles) wide, labeled from $1$ to $k$ in ascending order. Three rods are placed at squares $a$, $b$, and $c$, and a stack of $n$ disks is placed on the rod at square $a$. Bob begins the game standing at square $b$. His objective is to play the Tower of Hanoi game by moving all of the disks to the rod at square $c$. However, Bob can only pick up or set down a disk if he is on the same square as the rod/stack in question. Unfortunately, Bob is also drunk. On a given move, Bob will either stumble one square to the left or one square to the right with equal probability, unless Bob is at either end of the room, in which case he can only move in one direction. Despite Bob's inebriated state, he is still capable of following the rules of the game itself, as well as choosing when to pick up or put down a disk. The following animation depicts a side-view of a sample game for $n = 3$, $k = 7$, $a = 2$, $b = 4$, and $c = 6$: Let $E(n, k, a, b, c)$ be the expected number of squares that Bob travels during a single optimally-played game. A game is played optimally if the number of disk-pickups is minimized. Interestingly enough, the result is always an integer. For example, $E(2,5,1,3,5) = 60$ and $E(3,20,4,9,17) = 2358$. Find the last nine digits of $\sum_{1\le n \le 10000} E(n,10^n,3^n,6^n,9^n)$.
<p>Bob is very familiar with the famous mathematical puzzle/game, "Tower of Hanoi," which consists of three upright rods and disks of different sizes that can slide onto any of the rods. The game begins with a stack of $n$ disks placed on the leftmost rod in descending order by size. The objective of the game is to move all of the disks from the leftmost rod to the rightmost rod, given the following restrictions:</p> <ol><li>Only one disk can be moved at a time.</li> <li>A valid move consists of taking the top disk from one stack and placing it onto another stack (or an empty rod).</li> <li>No disk can be placed on top of a smaller disk.</li> </ol><p>Moving on to a variant of this game, consider a long room $k$ units (square tiles) wide, labeled from $1$ to $k$ in ascending order. Three rods are placed at squares $a$, $b$, and $c$, and a stack of $n$ disks is placed on the rod at square $a$.</p> <p>Bob begins the game standing at square $b$. His objective is to play the Tower of Hanoi game by moving all of the disks to the rod at square $c$. However, Bob can only pick up or set down a disk if he is on the same square as the rod/stack in question.</p> <p>Unfortunately, Bob is also drunk. On a given move, Bob will either stumble one square to the left or one square to the right with equal probability, unless Bob is at either end of the room, in which case he can only move in one direction. Despite Bob's inebriated state, he is still capable of following the rules of the game itself, as well as choosing when to pick up or put down a disk.</p> <p>The following animation depicts a side-view of a sample game for $n = 3$, $k = 7$, $a = 2$, $b = 4$, and $c = 6$:</p> <p align="center"><img alt="0497_hanoi.gif" src="resources/images/0497_hanoi.gif?1678992057"/></p> <p>Let $E(n, k, a, b, c)$ be the expected number of squares that Bob travels during a single optimally-played game. A game is played optimally if the number of disk-pickups is minimized.</p> <p>Interestingly enough, the result is always an integer. For example, $E(2,5,1,3,5) = 60$ and $E(3,20,4,9,17) = 2358$.</p> <p>Find the last nine digits of $\sum_{1\le n \le 10000} E(n,10^n,3^n,6^n,9^n)$.</p>
684901360
Sunday, 11th January 2015, 04:00 am
609
40%
medium
860
Gold and Silver Coin Game
Gary and Sally play a game using gold and silver coins arranged into a number of vertical stacks, alternating turns. On Gary's turn he chooses a gold coin and removes it from the game along with any other coins sitting on top. Sally does the same on her turn by removing a silver coin. The first player unable to make a move loses. An arrangement is called fair if the person moving first, whether it be Gary or Sally, will lose the game if both play optimally. Define $F(n)$ to be the number of fair arrangements of $n$ stacks, all of size $2$. Different orderings of the stacks are to be counted separately, so $F(2) = 4$ due to the following four arrangements: You are also given $F(10) = 63594$. Find $F(9898)$. Give your answer modulo $989898989$
Gary and Sally play a game using gold and silver coins arranged into a number of vertical stacks, alternating turns. On Gary's turn he chooses a gold coin and removes it from the game along with any other coins sitting on top. Sally does the same on her turn by removing a silver coin. The first player unable to make a move loses. An arrangement is called fair if the person moving first, whether it be Gary or Sally, will lose the game if both play optimally. Define $F(n)$ to be the number of fair arrangements of $n$ stacks, all of size $2$. Different orderings of the stacks are to be counted separately, so $F(2) = 4$ due to the following four arrangements: You are also given $F(10) = 63594$. Find $F(9898)$. Give your answer modulo $989898989$
<p> Gary and Sally play a game using gold and silver coins arranged into a number of vertical stacks, alternating turns. On Gary's turn he chooses a gold coin and removes it from the game along with any other coins sitting on top. Sally does the same on her turn by removing a silver coin. The first player unable to make a move loses.</p> <p> An arrangement is called <dfn>fair</dfn> if the person moving first, whether it be Gary or Sally, will lose the game if both play optimally.</p> <p> Define $F(n)$ to be the number of fair arrangements of $n$ stacks, all of size $2$. Different orderings of the stacks are to be counted separately, so $F(2) = 4$ due to the following four arrangements:</p> <div class="center"> <img alt="0860_diag3.jpg" src="resources/images/0860_diag3.jpg?1696883006"/> </div> <p> You are also given $F(10) = 63594$.</p> <p> Find $F(9898)$. Give your answer modulo $989898989$</p>
958666903
Sunday, 22nd October 2023, 11:00 am
491
20%
easy
73
Counting Fractions in a Range
Consider the fraction, $\dfrac n d$, where $n$ and $d$ are positive integers. If $n \lt d$ and $\operatorname{HCF}(n, d)=1$, it is called a reduced proper fraction. If we list the set of reduced proper fractions for $d \le 8$ in ascending order of size, we get: $$\frac 1 8, \frac 1 7, \frac 1 6, \frac 1 5, \frac 1 4, \frac 2 7, \frac 1 3, \mathbf{\frac 3 8, \frac 2 5, \frac 3 7}, \frac 1 2, \frac 4 7, \frac 3 5, \frac 5 8, \frac 2 3, \frac 5 7, \frac 3 4, \frac 4 5, \frac 5 6, \frac 6 7, \frac 7 8$$ It can be seen that there are $3$ fractions between $\dfrac 1 3$ and $\dfrac 1 2$. How many fractions lie between $\dfrac 1 3$ and $\dfrac 1 2$ in the sorted set of reduced proper fractions for $d \le 12\,000$?
Consider the fraction, $\dfrac n d$, where $n$ and $d$ are positive integers. If $n \lt d$ and $\operatorname{HCF}(n, d)=1$, it is called a reduced proper fraction. If we list the set of reduced proper fractions for $d \le 8$ in ascending order of size, we get: $$\frac 1 8, \frac 1 7, \frac 1 6, \frac 1 5, \frac 1 4, \frac 2 7, \frac 1 3, \mathbf{\frac 3 8, \frac 2 5, \frac 3 7}, \frac 1 2, \frac 4 7, \frac 3 5, \frac 5 8, \frac 2 3, \frac 5 7, \frac 3 4, \frac 4 5, \frac 5 6, \frac 6 7, \frac 7 8$$ It can be seen that there are $3$ fractions between $\dfrac 1 3$ and $\dfrac 1 2$. How many fractions lie between $\dfrac 1 3$ and $\dfrac 1 2$ in the sorted set of reduced proper fractions for $d \le 12\,000$?
<p>Consider the fraction, $\dfrac n d$, where $n$ and $d$ are positive integers. If $n \lt d$ and $\operatorname{HCF}(n, d)=1$, it is called a reduced proper fraction.</p> <p>If we list the set of reduced proper fractions for $d \le 8$ in ascending order of size, we get: $$\frac 1 8, \frac 1 7, \frac 1 6, \frac 1 5, \frac 1 4, \frac 2 7, \frac 1 3, \mathbf{\frac 3 8, \frac 2 5, \frac 3 7}, \frac 1 2, \frac 4 7, \frac 3 5, \frac 5 8, \frac 2 3, \frac 5 7, \frac 3 4, \frac 4 5, \frac 5 6, \frac 6 7, \frac 7 8$$</p> <p>It can be seen that there are $3$ fractions between $\dfrac 1 3$ and $\dfrac 1 2$.</p> <p>How many fractions lie between $\dfrac 1 3$ and $\dfrac 1 2$ in the sorted set of reduced proper fractions for $d \le 12\,000$?</p>
7295372
Friday, 2nd July 2004, 06:00 pm
27754
15%
easy
109
Darts
In the game of darts a player throws three darts at a target board which is split into twenty equal sized sections numbered one to twenty. The score of a dart is determined by the number of the region that the dart lands in. A dart landing outside the red/green outer ring scores zero. The black and cream regions inside this ring represent single scores. However, the red/green outer ring and middle ring score double and treble scores respectively. At the centre of the board are two concentric circles called the bull region, or bulls-eye. The outer bull is worth 25 points and the inner bull is a double, worth 50 points. There are many variations of rules but in the most popular game the players will begin with a score 301 or 501 and the first player to reduce their running total to zero is a winner. However, it is normal to play a "doubles out" system, which means that the player must land a double (including the double bulls-eye at the centre of the board) on their final dart to win; any other dart that would reduce their running total to one or lower means the score for that set of three darts is "bust". When a player is able to finish on their current score it is called a "checkout" and the highest checkout is 170: T20 T20 D25 (two treble 20s and double bull). There are exactly eleven distinct ways to checkout on a score of 6:                   D3D1D2S2D2D2D1S4D1S1S1D2S1T1D1S1S3D1D1D1D1D1S2D1S2S2D1 Note that D1 D2 is considered different to D2 D1 as they finish on different doubles. However, the combination S1 T1 D1 is considered the same as T1 S1 D1. In addition we shall not include misses in considering combinations; for example, D3 is the same as 0 D3 and 0 0 D3. Incredibly there are 42336 distinct ways of checking out in total. How many distinct ways can a player checkout with a score less than 100?
In the game of darts a player throws three darts at a target board which is split into twenty equal sized sections numbered one to twenty. The score of a dart is determined by the number of the region that the dart lands in. A dart landing outside the red/green outer ring scores zero. The black and cream regions inside this ring represent single scores. However, the red/green outer ring and middle ring score double and treble scores respectively. At the centre of the board are two concentric circles called the bull region, or bulls-eye. The outer bull is worth 25 points and the inner bull is a double, worth 50 points. There are many variations of rules but in the most popular game the players will begin with a score 301 or 501 and the first player to reduce their running total to zero is a winner. However, it is normal to play a "doubles out" system, which means that the player must land a double (including the double bulls-eye at the centre of the board) on their final dart to win; any other dart that would reduce their running total to one or lower means the score for that set of three darts is "bust". When a player is able to finish on their current score it is called a "checkout" and the highest checkout is 170: T20 T20 D25 (two treble 20s and double bull). There are exactly eleven distinct ways to checkout on a score of 6:                   D3D1D2S2D2D2D1S4D1S1S1D2S1T1D1S1S3D1D1D1D1D1S2D1S2S2D1 Note that D1 D2 is considered different to D2 D1 as they finish on different doubles. However, the combination S1 T1 D1 is considered the same as T1 S1 D1. In addition we shall not include misses in considering combinations; for example, D3 is the same as 0 D3 and 0 0 D3. Incredibly there are 42336 distinct ways of checking out in total. How many distinct ways can a player checkout with a score less than 100?
<p>In the game of darts a player throws three darts at a target board which is split into twenty equal sized sections numbered one to twenty.</p> <div class="center"> <img alt="" class="dark_img" src="project/images/p109.png"><br/></img></div> <p>The score of a dart is determined by the number of the region that the dart lands in. A dart landing outside the red/green outer ring scores zero. The black and cream regions inside this ring represent single scores. However, the red/green outer ring and middle ring score double and treble scores respectively.</p> <p>At the centre of the board are two concentric circles called the bull region, or bulls-eye. The outer bull is worth 25 points and the inner bull is a double, worth 50 points.</p> <p>There are many variations of rules but in the most popular game the players will begin with a score 301 or 501 and the first player to reduce their running total to zero is a winner. However, it is normal to play a "doubles out" system, which means that the player must land a double (including the double bulls-eye at the centre of the board) on their final dart to win; any other dart that would reduce their running total to one or lower means the score for that set of three darts is "bust".</p> <p>When a player is able to finish on their current score it is called a "checkout" and the highest checkout is 170: T20 T20 D25 (two treble 20s and double bull).</p> <p>There are exactly eleven distinct ways to checkout on a score of 6:</p> <div class="center monospace"> <table class="center"><tr><td>     </td> <td>     </td> <td>     </td> </tr><tr><td>D3</td><td></td><td></td></tr><tr><td>D1</td><td>D2</td><td></td></tr><tr><td>S2</td><td>D2</td><td></td></tr><tr><td>D2</td><td>D1</td><td></td></tr><tr><td>S4</td><td>D1</td><td></td></tr><tr><td>S1</td><td>S1</td><td>D2</td></tr><tr><td>S1</td><td>T1</td><td>D1</td></tr><tr><td>S1</td><td>S3</td><td>D1</td></tr><tr><td>D1</td><td>D1</td><td>D1</td></tr><tr><td>D1</td><td>S2</td><td>D1</td></tr><tr><td>S2</td><td>S2</td><td>D1</td></tr></table></div> <p>Note that D1 D2 is considered <b>different</b> to D2 D1 as they finish on different doubles. However, the combination S1 T1 D1 is considered the <b>same</b> as T1 S1 D1.</p> <p>In addition we shall not include misses in considering combinations; for example, D3 is the <b>same</b> as 0 D3 and 0 0 D3.</p> <p>Incredibly there are 42336 distinct ways of checking out in total.</p> <p>How many distinct ways can a player checkout with a score less than 100?</p>
38182
Friday, 18th November 2005, 06:00 pm
9162
45%
medium
405
A Rectangular Tiling
We wish to tile a rectangle whose length is twice its width. Let $T(0)$ be the tiling consisting of a single rectangle. For $n \gt 0$, let $T(n)$ be obtained from $T(n-1)$ by replacing all tiles in the following manner: The following animation demonstrates the tilings $T(n)$ for $n$ from $0$ to $5$: Let $f(n)$ be the number of points where four tiles meet in $T(n)$. For example, $f(1) = 0$, $f(4) = 82$ and $f(10^9) \bmod 17^7 = 126897180$. Find $f(10^k)$ for $k = 10^{18}$, give your answer modulo $17^7$.
We wish to tile a rectangle whose length is twice its width. Let $T(0)$ be the tiling consisting of a single rectangle. For $n \gt 0$, let $T(n)$ be obtained from $T(n-1)$ by replacing all tiles in the following manner: The following animation demonstrates the tilings $T(n)$ for $n$ from $0$ to $5$: Let $f(n)$ be the number of points where four tiles meet in $T(n)$. For example, $f(1) = 0$, $f(4) = 82$ and $f(10^9) \bmod 17^7 = 126897180$. Find $f(10^k)$ for $k = 10^{18}$, give your answer modulo $17^7$.
<p> We wish to tile a rectangle whose length is twice its width.<br/> Let $T(0)$ be the tiling consisting of a single rectangle.<br/> For $n \gt 0$, let $T(n)$ be obtained from $T(n-1)$ by replacing all tiles in the following manner: </p> <div align="center"> <img alt="0405_tile1.png" src="resources/images/0405_tile1.png?1678992053"/></div> <p> The following animation demonstrates the tilings $T(n)$ for $n$ from $0$ to $5$: </p> <div align="center"> <img alt="0405_tile2.gif" src="resources/images/0405_tile2.gif?1678992056"/></div> <p> Let $f(n)$ be the number of points where four tiles meet in $T(n)$.<br/> For example, $f(1) = 0$, $f(4) = 82$ and $f(10^9) \bmod 17^7 = 126897180$. </p> <p> Find $f(10^k)$ for $k = 10^{18}$, give your answer modulo $17^7$. </p>
237696125
Sunday, 9th December 2012, 04:00 am
694
40%
medium
339
Peredur Fab Efrawg
"And he came towards a valley, through which ran a river; and the borders of the valley were wooded, and on each side of the river were level meadows. And on one side of the river he saw a flock of white sheep, and on the other a flock of black sheep. And whenever one of the white sheep bleated, one of the black sheep would cross over and become white; and when one of the black sheep bleated, one of the white sheep would cross over and become black."en.wikisource.org Initially each flock consists of $n$ sheep. Each sheep (regardless of colour) is equally likely to be the next sheep to bleat. After a sheep has bleated and a sheep from the other flock has crossed over, Peredur may remove a number of white sheep in order to maximize the expected final number of black sheep. Let $E(n)$ be the expected final number of black sheep if Peredur uses an optimal strategy. You are given that $E(5) = 6.871346$ rounded to $6$ places behind the decimal point. Find $E(10\,000)$ and give your answer rounded to $6$ places behind the decimal point.
"And he came towards a valley, through which ran a river; and the borders of the valley were wooded, and on each side of the river were level meadows. And on one side of the river he saw a flock of white sheep, and on the other a flock of black sheep. And whenever one of the white sheep bleated, one of the black sheep would cross over and become white; and when one of the black sheep bleated, one of the white sheep would cross over and become black."en.wikisource.org Initially each flock consists of $n$ sheep. Each sheep (regardless of colour) is equally likely to be the next sheep to bleat. After a sheep has bleated and a sheep from the other flock has crossed over, Peredur may remove a number of white sheep in order to maximize the expected final number of black sheep. Let $E(n)$ be the expected final number of black sheep if Peredur uses an optimal strategy. You are given that $E(5) = 6.871346$ rounded to $6$ places behind the decimal point. Find $E(10\,000)$ and give your answer rounded to $6$ places behind the decimal point.
<p> <i>"And he came towards a valley, through which ran a river; and the borders of the valley were wooded, and on each side of the river were level meadows. And on one side of the river he saw a flock of white sheep, and on the other a flock of black sheep. And whenever one of the white sheep bleated, one of the black sheep would cross over and become white; and when one of the black sheep bleated, one of the white sheep would cross over and become black."</i><br/><a href="http://en.wikisource.org/wiki/The_Mabinogion/Peredur_the_Son_of_Evrawc">en.wikisource.org</a> </p> <p> Initially each flock consists of $n$ sheep. Each sheep (regardless of colour) is equally likely to be the next sheep to bleat. After a sheep has bleated and a sheep from the other flock has crossed over, Peredur may remove a number of white sheep in order to maximize the expected final number of black sheep. Let $E(n)$ be the expected final number of black sheep if Peredur uses an optimal strategy. </p> <p> You are given that $E(5) = 6.871346$ rounded to $6$ places behind the decimal point.<br/> Find $E(10\,000)$ and give your answer rounded to $6$ places behind the decimal point. </p>
19823.542204
Sunday, 22nd May 2011, 04:00 am
622
70%
hard
69
Totient Maximum
Euler's totient function, $\phi(n)$ [sometimes called the phi function], is defined as the number of positive integers not exceeding $n$ which are relatively prime to $n$. For example, as $1$, $2$, $4$, $5$, $7$, and $8$, are all less than or equal to nine and relatively prime to nine, $\phi(9)=6$. $n$ Relatively Prime $\phi(n)$ $n/\phi(n)$ 2 1 1 2 3 1,2 2 1.5 4 1,3 2 2 5 1,2,3,4 4 1.25 6 1,5 2 3 7 1,2,3,4,5,6 6 1.1666... 8 1,3,5,7 4 2 9 1,2,4,5,7,8 6 1.5 10 1,3,7,9 4 2.5 It can be seen that $n = 6$ produces a maximum $n/\phi(n)$ for $n\leq 10$. Find the value of $n\leq 1\,000\,000$ for which $n/\phi(n)$ is a maximum.
Euler's totient function, $\phi(n)$ [sometimes called the phi function], is defined as the number of positive integers not exceeding $n$ which are relatively prime to $n$. For example, as $1$, $2$, $4$, $5$, $7$, and $8$, are all less than or equal to nine and relatively prime to nine, $\phi(9)=6$. $n$ Relatively Prime $\phi(n)$ $n/\phi(n)$ 2 1 1 2 3 1,2 2 1.5 4 1,3 2 2 5 1,2,3,4 4 1.25 6 1,5 2 3 7 1,2,3,4,5,6 6 1.1666... 8 1,3,5,7 4 2 9 1,2,4,5,7,8 6 1.5 10 1,3,7,9 4 2.5 It can be seen that $n = 6$ produces a maximum $n/\phi(n)$ for $n\leq 10$. Find the value of $n\leq 1\,000\,000$ for which $n/\phi(n)$ is a maximum.
<p>Euler's totient function, $\phi(n)$ [sometimes called the phi function], is defined as the number of positive integers not exceeding $n$ which are relatively prime to $n$. For example, as $1$, $2$, $4$, $5$, $7$, and $8$, are all less than or equal to nine and relatively prime to nine, $\phi(9)=6$.</p> <div class="center"> <table class="grid center"><tr><td><b>$n$</b></td> <td><b>Relatively Prime</b></td> <td><b>$\phi(n)$</b></td> <td><b>$n/\phi(n)$</b></td> </tr><tr><td>2</td> <td>1</td> <td>1</td> <td>2</td> </tr><tr><td>3</td> <td>1,2</td> <td>2</td> <td>1.5</td> </tr><tr><td>4</td> <td>1,3</td> <td>2</td> <td>2</td> </tr><tr><td>5</td> <td>1,2,3,4</td> <td>4</td> <td>1.25</td> </tr><tr><td>6</td> <td>1,5</td> <td>2</td> <td>3</td> </tr><tr><td>7</td> <td>1,2,3,4,5,6</td> <td>6</td> <td>1.1666...</td> </tr><tr><td>8</td> <td>1,3,5,7</td> <td>4</td> <td>2</td> </tr><tr><td>9</td> <td>1,2,4,5,7,8</td> <td>6</td> <td>1.5</td> </tr><tr><td>10</td> <td>1,3,7,9</td> <td>4</td> <td>2.5</td> </tr></table></div> <p>It can be seen that $n = 6$ produces a maximum $n/\phi(n)$ for $n\leq 10$.</p> <p>Find the value of $n\leq 1\,000\,000$ for which $n/\phi(n)$ is a maximum.</p>
510510
Friday, 7th May 2004, 06:00 pm
38706
10%
easy
636
Restricted Factorisations
Consider writing a natural number as product of powers of natural numbers with given exponents, additionally requiring different base numbers for each power. For example, $256$ can be written as a product of a square and a fourth power in three ways such that the base numbers are different. That is, $256=1^2\times 4^4=4^2\times 2^4=16^2\times 1^4$ Though $4^2$ and $2^4$ are both equal, we are concerned only about the base numbers in this problem. Note that permutations are not considered distinct, for example $16^2\times 1^4$ and $1^4 \times 16^2$ are considered to be the same. Similarly, $10!$ can be written as a product of one natural number, two squares and three cubes in two ways ($10!=42\times5^2\times4^2\times3^3\times2^3\times1^3=21\times5^2\times2^2\times4^3\times3^3\times1^3$) whereas $20!$ can be given the same representation in $41680$ ways. Let $F(n)$ denote the number of ways in which $n$ can be written as a product of one natural number, two squares, three cubes and four fourth powers. You are given that $F(25!)=4933$, $F(100!) \bmod 1\,000\,000\,007=693\,952\,493$, and $F(1\,000!) \bmod 1\,000\,000\,007=6\,364\,496$. Find $F(1\,000\,000!) \bmod 1\,000\,000\,007$.
Consider writing a natural number as product of powers of natural numbers with given exponents, additionally requiring different base numbers for each power. For example, $256$ can be written as a product of a square and a fourth power in three ways such that the base numbers are different. That is, $256=1^2\times 4^4=4^2\times 2^4=16^2\times 1^4$ Though $4^2$ and $2^4$ are both equal, we are concerned only about the base numbers in this problem. Note that permutations are not considered distinct, for example $16^2\times 1^4$ and $1^4 \times 16^2$ are considered to be the same. Similarly, $10!$ can be written as a product of one natural number, two squares and three cubes in two ways ($10!=42\times5^2\times4^2\times3^3\times2^3\times1^3=21\times5^2\times2^2\times4^3\times3^3\times1^3$) whereas $20!$ can be given the same representation in $41680$ ways. Let $F(n)$ denote the number of ways in which $n$ can be written as a product of one natural number, two squares, three cubes and four fourth powers. You are given that $F(25!)=4933$, $F(100!) \bmod 1\,000\,000\,007=693\,952\,493$, and $F(1\,000!) \bmod 1\,000\,000\,007=6\,364\,496$. Find $F(1\,000\,000!) \bmod 1\,000\,000\,007$.
<p>Consider writing a natural number as product of powers of natural numbers with given exponents, additionally requiring different base numbers for each power.</p> <p>For example, $256$ can be written as a product of a square and a fourth power in three ways such that the base numbers are different.<br> That is, $256=1^2\times 4^4=4^2\times 2^4=16^2\times 1^4$</br></p> <p>Though $4^2$ and $2^4$ are both equal, we are concerned only about the base numbers in this problem. Note that permutations are not considered distinct, for example $16^2\times 1^4$ and $1^4 \times 16^2$ are considered to be the same.</p> <p>Similarly, $10!$ can be written as a product of one natural number, two squares and three cubes in two ways ($10!=42\times5^2\times4^2\times3^3\times2^3\times1^3=21\times5^2\times2^2\times4^3\times3^3\times1^3$) whereas $20!$ can be given the same representation in $41680$ ways.</p> <p>Let $F(n)$ denote the number of ways in which $n$ can be written as a product of one natural number, two squares, three cubes and four fourth powers.</p> <p>You are given that $F(25!)=4933$, $F(100!) \bmod 1\,000\,000\,007=693\,952\,493$,<br/> and $F(1\,000!) \bmod 1\,000\,000\,007=6\,364\,496$.</p> <p>Find $F(1\,000\,000!) \bmod 1\,000\,000\,007$.</p>
888316
Saturday, 8th September 2018, 10:00 pm
217
90%
hard
455
Powers with Trailing Digits
Let $f(n)$ be the largest positive integer $x$ less than $10^9$ such that the last $9$ digits of $n^x$ form the number $x$ (including leading zeros), or zero if no such integer exists. For example: $f(4) = 411728896$ ($4^{411728896} = \cdots 490\underline{411728896}$) $f(10) = 0$ $f(157) = 743757$ ($157^{743757} = \cdots 567\underline{000743757}$) $\sum_{2 \le n \le 10^3} f(n) = 442530011399$ Find $\sum_{2 \le n \le 10^6}f(n)$.
Let $f(n)$ be the largest positive integer $x$ less than $10^9$ such that the last $9$ digits of $n^x$ form the number $x$ (including leading zeros), or zero if no such integer exists. For example: $f(4) = 411728896$ ($4^{411728896} = \cdots 490\underline{411728896}$) $f(10) = 0$ $f(157) = 743757$ ($157^{743757} = \cdots 567\underline{000743757}$) $\sum_{2 \le n \le 10^3} f(n) = 442530011399$ Find $\sum_{2 \le n \le 10^6}f(n)$.
<p>Let $f(n)$ be the largest positive integer $x$ less than $10^9$ such that the last $9$ digits of $n^x$ form the number $x$ (including leading zeros), or zero if no such integer exists.</p> <p>For example:</p> <ul><li>$f(4) = 411728896$ ($4^{411728896} = \cdots 490\underline{411728896}$) </li> <li>$f(10) = 0$</li> <li>$f(157) = 743757$ ($157^{743757} = \cdots 567\underline{000743757}$)</li> <li>$\sum_{2 \le n \le 10^3} f(n) = 442530011399$</li> </ul><p>Find $\sum_{2 \le n \le 10^6}f(n)$.</p>
450186511399999
Saturday, 18th January 2014, 10:00 pm
802
40%
medium
849
The Tournament
In a tournament there are $n$ teams and each team plays each other team twice. A team gets two points for a win, one point for a draw and no points for a loss. With two teams there are three possible outcomes for the total points. $(4,0)$ where a team wins twice, $(3,1)$ where a team wins and draws, and $(2,2)$ where either there are two draws or a team wins one game and loses the other. Here we do not distinguish the teams and so $(3,1)$ and $(1,3)$ are considered identical. Let $F(n)$ be the total number of possible final outcomes with $n$ teams, so that $F(2) = 3$. You are also given $F(7) = 32923$. Find $F(100)$. Give your answer modulo $10^9+7$.
In a tournament there are $n$ teams and each team plays each other team twice. A team gets two points for a win, one point for a draw and no points for a loss. With two teams there are three possible outcomes for the total points. $(4,0)$ where a team wins twice, $(3,1)$ where a team wins and draws, and $(2,2)$ where either there are two draws or a team wins one game and loses the other. Here we do not distinguish the teams and so $(3,1)$ and $(1,3)$ are considered identical. Let $F(n)$ be the total number of possible final outcomes with $n$ teams, so that $F(2) = 3$. You are also given $F(7) = 32923$. Find $F(100)$. Give your answer modulo $10^9+7$.
<p> In a tournament there are $n$ teams and each team plays each other team twice. A team gets two points for a win, one point for a draw and no points for a loss.</p> <p> With two teams there are three possible outcomes for the total points. $(4,0)$ where a team wins twice, $(3,1)$ where a team wins and draws, and $(2,2)$ where either there are two draws or a team wins one game and loses the other. Here we do not distinguish the teams and so $(3,1)$ and $(1,3)$ are considered identical.</p> <p> Let $F(n)$ be the total number of possible final outcomes with $n$ teams, so that $F(2) = 3$.<br/> You are also given $F(7) = 32923$.</p> <p> Find $F(100)$. Give your answer modulo $10^9+7$.</p>
936203459
Sunday, 25th June 2023, 05:00 am
270
45%
medium
717
Summation of a Modular Formula
For an odd prime $p$, define $f(p) = \left\lfloor\frac{2^{(2^p)}}{p}\right\rfloor\bmod{2^p}$ For example, when $p=3$, $\lfloor 2^8/3\rfloor = 85 \equiv 5 \pmod 8$ and so $f(3) = 5$. Further define $g(p) = f(p)\bmod p$. You are given $g(31) = 17$. Now define $G(N)$ to be the summation of $g(p)$ for all odd primes less than $N$. You are given $G(100) = 474$ and $G(10^4) = 2819236$. Find $G(10^7)$.
For an odd prime $p$, define $f(p) = \left\lfloor\frac{2^{(2^p)}}{p}\right\rfloor\bmod{2^p}$ For example, when $p=3$, $\lfloor 2^8/3\rfloor = 85 \equiv 5 \pmod 8$ and so $f(3) = 5$. Further define $g(p) = f(p)\bmod p$. You are given $g(31) = 17$. Now define $G(N)$ to be the summation of $g(p)$ for all odd primes less than $N$. You are given $G(100) = 474$ and $G(10^4) = 2819236$. Find $G(10^7)$.
<p>For an odd prime $p$, define $f(p) = \left\lfloor\frac{2^{(2^p)}}{p}\right\rfloor\bmod{2^p}$<br/> For example, when $p=3$, $\lfloor 2^8/3\rfloor = 85 \equiv 5 \pmod 8$ and so $f(3) = 5$.</p> <p>Further define $g(p) = f(p)\bmod p$. You are given $g(31) = 17$.</p> <p>Now define $G(N)$ to be the summation of $g(p)$ for all odd primes less than $N$.<br/> You are given $G(100) = 474$ and $G(10^4) = 2819236$.</p> <p>Find $G(10^7)$.</p>
1603036763131
Saturday, 23rd May 2020, 02:00 pm
551
25%
easy
756
Approximating a Sum
Consider a function $f(k)$ defined for all positive integers $k>0$. Let $S$ be the sum of the first $n$ values of $f$. That is, $$S=f(1)+f(2)+f(3)+\cdots+f(n)=\sum_{k=1}^n f(k).$$ In this problem, we employ randomness to approximate this sum. That is, we choose a random, uniformly distributed, $m$-tuple of positive integers $(X_1,X_2,X_3,\cdots,X_m)$ such that $0=X_0 \lt X_1 \lt X_2 \lt \cdots \lt X_m \leq n$ and calculate a modified sum $S^*$ as follows. $$S^* = \sum_{i=1}^m f(X_i)(X_i-X_{i-1})$$ We now define the error of this approximation to be $\Delta=S-S^*$. Let $\mathbb{E}(\Delta|f(k),n,m)$ be the expected value of the error given the function $f(k)$, the number of terms $n$ in the sum and the length of random sample $m$. For example, $\mathbb{E}(\Delta|k,100,50) = 2525/1326 \approx 1.904223$ and $\mathbb{E}(\Delta|\varphi(k),10^4,10^2)\approx 5842.849907$, where $\varphi(k)$ is Euler's totient function. Find $\mathbb{E}(\Delta|\varphi(k),12345678,12345)$ rounded to six places after the decimal point.
Consider a function $f(k)$ defined for all positive integers $k>0$. Let $S$ be the sum of the first $n$ values of $f$. That is, $$S=f(1)+f(2)+f(3)+\cdots+f(n)=\sum_{k=1}^n f(k).$$ In this problem, we employ randomness to approximate this sum. That is, we choose a random, uniformly distributed, $m$-tuple of positive integers $(X_1,X_2,X_3,\cdots,X_m)$ such that $0=X_0 \lt X_1 \lt X_2 \lt \cdots \lt X_m \leq n$ and calculate a modified sum $S^*$ as follows. $$S^* = \sum_{i=1}^m f(X_i)(X_i-X_{i-1})$$ We now define the error of this approximation to be $\Delta=S-S^*$. Let $\mathbb{E}(\Delta|f(k),n,m)$ be the expected value of the error given the function $f(k)$, the number of terms $n$ in the sum and the length of random sample $m$. For example, $\mathbb{E}(\Delta|k,100,50) = 2525/1326 \approx 1.904223$ and $\mathbb{E}(\Delta|\varphi(k),10^4,10^2)\approx 5842.849907$, where $\varphi(k)$ is Euler's totient function. Find $\mathbb{E}(\Delta|\varphi(k),12345678,12345)$ rounded to six places after the decimal point.
<p>Consider a function $f(k)$ defined for all positive integers $k&gt;0$. Let $S$ be the sum of the first $n$ values of $f$. That is, $$S=f(1)+f(2)+f(3)+\cdots+f(n)=\sum_{k=1}^n f(k).$$</p> <p>In this problem, we employ randomness to approximate this sum. That is, we choose a random, uniformly distributed, $m$-tuple of positive integers $(X_1,X_2,X_3,\cdots,X_m)$ such that $0=X_0 \lt X_1 \lt X_2 \lt \cdots \lt X_m \leq n$ and calculate a modified sum $S^*$ as follows. $$S^* = \sum_{i=1}^m f(X_i)(X_i-X_{i-1})$$</p> <p>We now define the error of this approximation to be $\Delta=S-S^*$.</p> <p>Let $\mathbb{E}(\Delta|f(k),n,m)$ be the expected value of the error given the function $f(k)$, the number of terms $n$ in the sum and the length of random sample $m$.</p> <p>For example, $\mathbb{E}(\Delta|k,100,50) = 2525/1326 \approx 1.904223$ and $\mathbb{E}(\Delta|\varphi(k),10^4,10^2)\approx 5842.849907$, where $\varphi(k)$ is Euler's totient function.</p> <p>Find $\mathbb{E}(\Delta|\varphi(k),12345678,12345)$ rounded to six places after the decimal point.</p>
607238.610661
Saturday, 1st May 2021, 02:00 pm
363
30%
easy
570
Snowflakes
A snowflake of order $n$ is formed by overlaying an equilateral triangle (rotated by $180$ degrees) onto each equilateral triangle of the same size in a snowflake of order $n-1$. A snowflake of order $1$ is a single equilateral triangle. Some areas of the snowflake are overlaid repeatedly. In the above picture, blue represents the areas that are one layer thick, red two layers thick, yellow three layers thick, and so on. For an order $n$ snowflake, let $A(n)$ be the number of triangles that are one layer thick, and let $B(n)$ be the number of triangles that are three layers thick. Define $G(n) = \gcd(A(n), B(n))$. E.g. $A(3) = 30$, $B(3) = 6$, $G(3)=6$. $A(11) = 3027630$, $B(11) = 19862070$, $G(11) = 30$. Further, $G(500) = 186$ and $\sum_{n=3}^{500}G(n)=5124$. Find $\displaystyle \sum_{n=3}^{10^7}G(n)$.
A snowflake of order $n$ is formed by overlaying an equilateral triangle (rotated by $180$ degrees) onto each equilateral triangle of the same size in a snowflake of order $n-1$. A snowflake of order $1$ is a single equilateral triangle. Some areas of the snowflake are overlaid repeatedly. In the above picture, blue represents the areas that are one layer thick, red two layers thick, yellow three layers thick, and so on. For an order $n$ snowflake, let $A(n)$ be the number of triangles that are one layer thick, and let $B(n)$ be the number of triangles that are three layers thick. Define $G(n) = \gcd(A(n), B(n))$. E.g. $A(3) = 30$, $B(3) = 6$, $G(3)=6$. $A(11) = 3027630$, $B(11) = 19862070$, $G(11) = 30$. Further, $G(500) = 186$ and $\sum_{n=3}^{500}G(n)=5124$. Find $\displaystyle \sum_{n=3}^{10^7}G(n)$.
<p>A snowflake of order $n$ is formed by overlaying an equilateral triangle (rotated by $180$ degrees) onto each equilateral triangle of the same size in a snowflake of order $n-1$. A snowflake of order $1$ is a single equilateral triangle.</p> <div> <img alt="0570-snowflakes.png" src="resources/images/0570-snowflakes.png?1678992053"/> </div> <p>Some areas of the snowflake are overlaid repeatedly. In the above picture, blue represents the areas that are one layer thick, red two layers thick, yellow three layers thick, and so on.</p> <p>For an order $n$ snowflake, let $A(n)$ be the number of triangles that are one layer thick, and let $B(n)$ be the number of triangles that are three layers thick. Define $G(n) = \gcd(A(n), B(n))$.</p> <p>E.g. $A(3) = 30$, $B(3) = 6$, $G(3)=6$.<br/> $A(11) = 3027630$, $B(11) = 19862070$, $G(11) = 30$.</p> <p>Further, $G(500) = 186$ and $\sum_{n=3}^{500}G(n)=5124$.</p> <p>Find $\displaystyle \sum_{n=3}^{10^7}G(n)$.</p>
271197444
Saturday, 17th September 2016, 10:00 pm
296
55%
medium
198
Ambiguous Numbers
A best approximation to a real number $x$ for the denominator bound $d$ is a rational number $\frac r s$ (in reduced form) with $s \le d$, so that any rational number $\frac p q$ which is closer to $x$ than $\frac r s$ has $q \gt d$. Usually the best approximation to a real number is uniquely determined for all denominator bounds. However, there are some exceptions, e.g. $\frac 9 {40}$ has the two best approximations $\frac 1 4$ and $\frac 1 5$ for the denominator bound $6$. We shall call a real number $x$ ambiguous, if there is at least one denominator bound for which $x$ possesses two best approximations. Clearly, an ambiguous number is necessarily rational. How many ambiguous numbers $x=\frac p q, 0 \lt x \lt \frac 1 {100}$, are there whose denominator $q$ does not exceed $10^8$?
A best approximation to a real number $x$ for the denominator bound $d$ is a rational number $\frac r s$ (in reduced form) with $s \le d$, so that any rational number $\frac p q$ which is closer to $x$ than $\frac r s$ has $q \gt d$. Usually the best approximation to a real number is uniquely determined for all denominator bounds. However, there are some exceptions, e.g. $\frac 9 {40}$ has the two best approximations $\frac 1 4$ and $\frac 1 5$ for the denominator bound $6$. We shall call a real number $x$ ambiguous, if there is at least one denominator bound for which $x$ possesses two best approximations. Clearly, an ambiguous number is necessarily rational. How many ambiguous numbers $x=\frac p q, 0 \lt x \lt \frac 1 {100}$, are there whose denominator $q$ does not exceed $10^8$?
<p>A best approximation to a real number $x$ for the denominator bound $d$ is a rational number $\frac r s$ (in reduced form) with $s \le d$, so that any rational number $\frac p q$ which is closer to $x$ than $\frac r s$ has $q \gt d$.</p> <p>Usually the best approximation to a real number is uniquely determined for all denominator bounds. However, there are some exceptions, e.g. $\frac 9 {40}$ has the two best approximations $\frac 1 4$ and $\frac 1 5$ for the denominator bound $6$. We shall call a real number $x$ <dfn>ambiguous</dfn>, if there is at least one denominator bound for which $x$ possesses two best approximations. Clearly, an ambiguous number is necessarily rational.</p> <p>How many ambiguous numbers $x=\frac p q, 0 \lt x \lt \frac 1 {100}$, are there whose denominator $q$ does not exceed $10^8$?</p>
52374425
Saturday, 14th June 2008, 02:00 am
1295
80%
hard
867
Tiling Dodecagon
There are 5 ways to tile a regular dodecagon of side 1 with regular polygons of side 1. Let $T(n)$ be the number of ways to tile a regular dodecagon of side $n$ with regular polygons of side 1. Then $T(1) = 5$. You are also given $T(2) = 48$. Find $T(10)$. Give your answer modulo $10^9+7$.
There are 5 ways to tile a regular dodecagon of side 1 with regular polygons of side 1. Let $T(n)$ be the number of ways to tile a regular dodecagon of side $n$ with regular polygons of side 1. Then $T(1) = 5$. You are also given $T(2) = 48$. Find $T(10)$. Give your answer modulo $10^9+7$.
<p> There are 5 ways to tile a regular dodecagon of side 1 with regular polygons of side 1.</p> <img alt="0867_DodecaDiagram.jpg" src="resources/images/0867_DodecaDiagram.jpg?1700512497"/> <p> Let $T(n)$ be the number of ways to tile a regular dodecagon of side $n$ with regular polygons of side 1. Then $T(1) = 5$. You are also given $T(2) = 48$.</p> <p> Find $T(10)$. Give your answer modulo $10^9+7$.</p>
870557257
Sunday, 10th December 2023, 07:00 am
177
55%
medium
156
Counting Digits
Starting from zero the natural numbers are written down in base $10$ like this: $0\,1\,2\,3\,4\,5\,6\,7\,8\,9\,10\,11\,12\cdots$ Consider the digit $d=1$. After we write down each number $n$, we will update the number of ones that have occurred and call this number $f(n,1)$. The first values for $f(n,1)$, then, are as follows: \begin{array}{cc} n & f(n, 1)\\ \hline 0 & 0\\ 1 & 1\\ 2 & 1\\ 3 & 1\\ 4 & 1\\ 5 & 1\\ 6 & 1\\ 7 & 1\\ 8 & 1\\ 9 & 1\\ 10 & 2\\ 11 & 4\\ 12 & 5 \end{array} Note that $f(n,1)$ never equals $3$. So the first two solutions of the equation $f(n,1)=n$ are $n=0$ and $n=1$. The next solution is $n=199981$. In the same manner the function $f(n,d)$ gives the total number of digits $d$ that have been written down after the number $n$ has been written. In fact, for every digit $d \ne 0$, $0$ is the first solution of the equation $f(n,d)=n$. Let $s(d)$ be the sum of all the solutions for which $f(n,d)=n$. You are given that $s(1)=22786974071$. Find $\sum s(d)$ for $1 \le d \le 9$. Note: if, for some $n$, $f(n,d)=n$ for more than one value of $d$ this value of $n$ is counted again for every value of $d$ for which $f(n,d)=n$.
Starting from zero the natural numbers are written down in base $10$ like this: $0\,1\,2\,3\,4\,5\,6\,7\,8\,9\,10\,11\,12\cdots$ Consider the digit $d=1$. After we write down each number $n$, we will update the number of ones that have occurred and call this number $f(n,1)$. The first values for $f(n,1)$, then, are as follows: \begin{array}{cc} n & f(n, 1)\\ \hline 0 & 0\\ 1 & 1\\ 2 & 1\\ 3 & 1\\ 4 & 1\\ 5 & 1\\ 6 & 1\\ 7 & 1\\ 8 & 1\\ 9 & 1\\ 10 & 2\\ 11 & 4\\ 12 & 5 \end{array} Note that $f(n,1)$ never equals $3$. So the first two solutions of the equation $f(n,1)=n$ are $n=0$ and $n=1$. The next solution is $n=199981$. In the same manner the function $f(n,d)$ gives the total number of digits $d$ that have been written down after the number $n$ has been written. In fact, for every digit $d \ne 0$, $0$ is the first solution of the equation $f(n,d)=n$. Let $s(d)$ be the sum of all the solutions for which $f(n,d)=n$. You are given that $s(1)=22786974071$. Find $\sum s(d)$ for $1 \le d \le 9$. Note: if, for some $n$, $f(n,d)=n$ for more than one value of $d$ this value of $n$ is counted again for every value of $d$ for which $f(n,d)=n$.
<p>Starting from zero the natural numbers are written down in base $10$ like this: <br/> $0\,1\,2\,3\,4\,5\,6\,7\,8\,9\,10\,11\,12\cdots$ </p> <p>Consider the digit $d=1$. After we write down each number $n$, we will update the number of ones that have occurred and call this number $f(n,1)$. The first values for $f(n,1)$, then, are as follows:</p> \begin{array}{cc} n & f(n, 1)\\ \hline 0 & 0\\ 1 & 1\\ 2 & 1\\ 3 & 1\\ 4 & 1\\ 5 & 1\\ 6 & 1\\ 7 & 1\\ 8 & 1\\ 9 & 1\\ 10 & 2\\ 11 & 4\\ 12 & 5 \end{array} <p>Note that $f(n,1)$ never equals $3$. <br/> So the first two solutions of the equation $f(n,1)=n$ are $n=0$ and $n=1$. The next solution is $n=199981$.</p> <p>In the same manner the function $f(n,d)$ gives the total number of digits $d$ that have been written down after the number $n$ has been written. <br/> In fact, for every digit $d \ne 0$, $0$ is the first solution of the equation $f(n,d)=n$.</p> <p>Let $s(d)$ be the sum of all the solutions for which $f(n,d)=n$. <br/> You are given that $s(1)=22786974071$.</p> <p>Find $\sum s(d)$ for $1 \le d \le 9$.</p> <p>Note: if, for some $n$, $f(n,d)=n$ for more than one value of $d$ this value of $n$ is counted again for every value of $d$ for which $f(n,d)=n$.</p>
21295121502550
Friday, 25th May 2007, 10:00 pm
2771
70%
hard
469
Empty Chairs
In a room $N$ chairs are placed around a round table. Knights enter the room one by one and choose at random an available empty chair. To have enough elbow room the knights always leave at least one empty chair between each other. When there aren't any suitable chairs left, the fraction $C$ of empty chairs is determined. We also define $E(N)$ as the expected value of $C$. We can verify that $E(4) = 1/2$ and $E(6) = 5/9$. Find $E(10^{18})$. Give your answer rounded to fourteen decimal places in the form 0.abcdefghijklmn.
In a room $N$ chairs are placed around a round table. Knights enter the room one by one and choose at random an available empty chair. To have enough elbow room the knights always leave at least one empty chair between each other. When there aren't any suitable chairs left, the fraction $C$ of empty chairs is determined. We also define $E(N)$ as the expected value of $C$. We can verify that $E(4) = 1/2$ and $E(6) = 5/9$. Find $E(10^{18})$. Give your answer rounded to fourteen decimal places in the form 0.abcdefghijklmn.
<p> In a room $N$ chairs are placed around a round table.<br/> Knights enter the room one by one and choose at random an available empty chair.<br/> To have enough elbow room the knights always leave at least one empty chair between each other. </p> <p> When there aren't any suitable chairs left, the fraction $C$ of empty chairs is determined.<br/> We also define $E(N)$ as the expected value of $C$.<br/> We can verify that $E(4) = 1/2$ and $E(6) = 5/9$. </p> <p> Find $E(10^{18})$. Give your answer rounded to fourteen decimal places in the form 0.abcdefghijklmn. </p>
0.56766764161831
Saturday, 26th April 2014, 04:00 pm
828
40%
medium
663
Sums of Subarrays
Let $t_k$ be the tribonacci numbers defined as: $\quad t_0 = t_1 = 0$; $\quad t_2 = 1$; $\quad t_k = t_{k-1} + t_{k-2} + t_{k-3} \quad \text{ for } k \ge 3$. For a given integer $n$, let $A_n$ be an array of length $n$ (indexed from $0$ to $n-1$), that is initially filled with zeros. The array is changed iteratively by replacing $A_n[(t_{2 i-2} \bmod n)]$ with $A_n[(t_{2 i-2} \bmod n)]+2 (t_{2 i-1} \bmod n)-n+1$ in each step $i$. After each step $i$, define $M_n(i)$ to be $\displaystyle \max\{\sum_{j=p}^q A_n[j]: 0\le p\le q \lt n\}$, the maximal sum of any contiguous subarray of $A_n$. The first 6 steps for $n=5$ are illustrated below: Initial state: $\, A_5=\{0,0,0,0,0\}$ Step 1: $\quad \Rightarrow A_5=\{-4,0,0,0,0\}$, $M_5(1)=0$ Step 2: $\quad \Rightarrow A_5=\{-4, -2, 0, 0, 0\}$, $M_5(2)=0$ Step 3: $\quad \Rightarrow A_5=\{-4, -2, 4, 0, 0\}$, $M_5(3)=4$ Step 4: $\quad \Rightarrow A_5=\{-4, -2, 6, 0, 0\}$, $M_5(4)=6$ Step 5: $\quad \Rightarrow A_5=\{-4, -2, 6, 0, 4\}$, $M_5(5)=10$ Step 6: $\quad \Rightarrow A_5=\{-4, 2, 6, 0, 4\}$, $M_5(6)=12$ Let $\displaystyle S(n,l)=\sum_{i=1}^l M_n(i)$. Thus $S(5,6)=32$. You are given $S(5,100)=2416$, $S(14,100)=3881$ and $S(107,1000)=1618572$. Find $S(10\,000\,003,10\,200\,000)-S(10\,000\,003,10\,000\,000)$.
Let $t_k$ be the tribonacci numbers defined as: $\quad t_0 = t_1 = 0$; $\quad t_2 = 1$; $\quad t_k = t_{k-1} + t_{k-2} + t_{k-3} \quad \text{ for } k \ge 3$. For a given integer $n$, let $A_n$ be an array of length $n$ (indexed from $0$ to $n-1$), that is initially filled with zeros. The array is changed iteratively by replacing $A_n[(t_{2 i-2} \bmod n)]$ with $A_n[(t_{2 i-2} \bmod n)]+2 (t_{2 i-1} \bmod n)-n+1$ in each step $i$. After each step $i$, define $M_n(i)$ to be $\displaystyle \max\{\sum_{j=p}^q A_n[j]: 0\le p\le q \lt n\}$, the maximal sum of any contiguous subarray of $A_n$. The first 6 steps for $n=5$ are illustrated below: Initial state: $\, A_5=\{0,0,0,0,0\}$ Step 1: $\quad \Rightarrow A_5=\{-4,0,0,0,0\}$, $M_5(1)=0$ Step 2: $\quad \Rightarrow A_5=\{-4, -2, 0, 0, 0\}$, $M_5(2)=0$ Step 3: $\quad \Rightarrow A_5=\{-4, -2, 4, 0, 0\}$, $M_5(3)=4$ Step 4: $\quad \Rightarrow A_5=\{-4, -2, 6, 0, 0\}$, $M_5(4)=6$ Step 5: $\quad \Rightarrow A_5=\{-4, -2, 6, 0, 4\}$, $M_5(5)=10$ Step 6: $\quad \Rightarrow A_5=\{-4, 2, 6, 0, 4\}$, $M_5(6)=12$ Let $\displaystyle S(n,l)=\sum_{i=1}^l M_n(i)$. Thus $S(5,6)=32$. You are given $S(5,100)=2416$, $S(14,100)=3881$ and $S(107,1000)=1618572$. Find $S(10\,000\,003,10\,200\,000)-S(10\,000\,003,10\,000\,000)$.
<p>Let $t_k$ be the <b>tribonacci numbers</b> defined as: <br/> $\quad t_0 = t_1 = 0$;<br/> $\quad t_2 = 1$; <br/> $\quad t_k = t_{k-1} + t_{k-2} + t_{k-3} \quad \text{ for } k \ge 3$.</p> <p>For a given integer $n$, let $A_n$ be an array of length $n$ (indexed from $0$ to $n-1$), that is initially filled with zeros.<br/> The array is changed iteratively by replacing $A_n[(t_{2 i-2} \bmod n)]$ with $A_n[(t_{2 i-2} \bmod n)]+2 (t_{2 i-1} \bmod n)-n+1$ in each step $i$.<br/> After each step $i$, define $M_n(i)$ to be $\displaystyle \max\{\sum_{j=p}^q A_n[j]: 0\le p\le q \lt n\}$, the maximal sum of any contiguous subarray of $A_n$. </p> <p>The first 6 steps for $n=5$ are illustrated below:<br/> Initial state: $\, A_5=\{0,0,0,0,0\}$<br/> Step 1: $\quad \Rightarrow A_5=\{-4,0,0,0,0\}$, $M_5(1)=0$<br/> Step 2: $\quad \Rightarrow A_5=\{-4, -2, 0, 0, 0\}$, $M_5(2)=0$<br/> Step 3: $\quad \Rightarrow A_5=\{-4, -2, 4, 0, 0\}$, $M_5(3)=4$<br/> Step 4: $\quad \Rightarrow A_5=\{-4, -2, 6, 0, 0\}$, $M_5(4)=6$<br/> Step 5: $\quad \Rightarrow A_5=\{-4, -2, 6, 0, 4\}$, $M_5(5)=10$<br/> Step 6: $\quad \Rightarrow A_5=\{-4, 2, 6, 0, 4\}$, $M_5(6)=12$<br/> </p> <p>Let $\displaystyle S(n,l)=\sum_{i=1}^l M_n(i)$. Thus $S(5,6)=32$.<br/> You are given $S(5,100)=2416$, $S(14,100)=3881$ and $S(107,1000)=1618572$.</p> <p>Find $S(10\,000\,003,10\,200\,000)-S(10\,000\,003,10\,000\,000)$.</p>
1884138010064752
Sunday, 31st March 2019, 04:00 am
404
35%
medium
131
Prime Cube Partnership
There are some prime values, $p$, for which there exists a positive integer, $n$, such that the expression $n^3 + n^2p$ is a perfect cube. For example, when $p = 19$, $8^3 + 8^2 \times 19 = 12^3$. What is perhaps most surprising is that for each prime with this property the value of $n$ is unique, and there are only four such primes below one-hundred. How many primes below one million have this remarkable property?
There are some prime values, $p$, for which there exists a positive integer, $n$, such that the expression $n^3 + n^2p$ is a perfect cube. For example, when $p = 19$, $8^3 + 8^2 \times 19 = 12^3$. What is perhaps most surprising is that for each prime with this property the value of $n$ is unique, and there are only four such primes below one-hundred. How many primes below one million have this remarkable property?
<p>There are some prime values, $p$, for which there exists a positive integer, $n$, such that the expression $n^3 + n^2p$ is a perfect cube.</p> <p>For example, when $p = 19$, $8^3 + 8^2 \times 19 = 12^3$.</p> <p>What is perhaps most surprising is that for each prime with this property the value of $n$ is unique, and there are only four such primes below one-hundred.</p> <p>How many primes below one million have this remarkable property?</p>
173
Friday, 10th November 2006, 06:00 pm
8246
40%
medium
221
Alexandrian Integers
We shall call a positive integer $A$ an "Alexandrian integer", if there exist integers $p, q, r$ such that: $$A = p \cdot q \cdot r$$ and $$\dfrac{1}{A} = \dfrac{1}{p} + \dfrac{1}{q} + \dfrac{1}{r}.$$ For example, $630$ is an Alexandrian integer ($p = 5, q = -7, r = -18$). In fact, $630$ is the $6$th Alexandrian integer, the first $6$ Alexandrian integers being: $6, 42, 120, 156, 420$, and $630$. Find the $150000$th Alexandrian integer.
We shall call a positive integer $A$ an "Alexandrian integer", if there exist integers $p, q, r$ such that: $$A = p \cdot q \cdot r$$ and $$\dfrac{1}{A} = \dfrac{1}{p} + \dfrac{1}{q} + \dfrac{1}{r}.$$ For example, $630$ is an Alexandrian integer ($p = 5, q = -7, r = -18$). In fact, $630$ is the $6$th Alexandrian integer, the first $6$ Alexandrian integers being: $6, 42, 120, 156, 420$, and $630$. Find the $150000$th Alexandrian integer.
<p>We shall call a positive integer $A$ an "Alexandrian integer", if there exist integers $p, q, r$ such that:</p> <p class="center">$$A = p \cdot q \cdot r$$ and $$\dfrac{1}{A} = \dfrac{1}{p} + \dfrac{1}{q} + \dfrac{1}{r}.$$</p> <p>For example, $630$ is an Alexandrian integer ($p = 5, q = -7, r = -18$). In fact, $630$ is the $6$<sup>th</sup> Alexandrian integer, the first $6$ Alexandrian integers being: $6, 42, 120, 156, 420$, and $630$.</p> <p>Find the $150000$<sup>th</sup> Alexandrian integer.</p>
1884161251122450
Saturday, 13th December 2008, 01:00 pm
2340
65%
hard
679
Freefarea
Let $S$ be the set consisting of the four letters $\{\texttt{`A'},\texttt{`E'},\texttt{`F'},\texttt{`R'}\}$. For $n\ge 0$, let $S^*(n)$ denote the set of words of length $n$ consisting of letters belonging to $S$. We designate the words $\texttt{FREE}, \texttt{FARE}, \texttt{AREA}, \texttt{REEF}$ as keywords. Let $f(n)$ be the number of words in $S^*(n)$ that contains all four keywords exactly once. This first happens for $n=9$, and indeed there is a unique 9 lettered word that contain each of the keywords once: $\texttt{FREEFAREA}$ So, $f(9)=1$. You are also given that $f(15)=72863$. Find $f(30)$.
Let $S$ be the set consisting of the four letters $\{\texttt{`A'},\texttt{`E'},\texttt{`F'},\texttt{`R'}\}$. For $n\ge 0$, let $S^*(n)$ denote the set of words of length $n$ consisting of letters belonging to $S$. We designate the words $\texttt{FREE}, \texttt{FARE}, \texttt{AREA}, \texttt{REEF}$ as keywords. Let $f(n)$ be the number of words in $S^*(n)$ that contains all four keywords exactly once. This first happens for $n=9$, and indeed there is a unique 9 lettered word that contain each of the keywords once: $\texttt{FREEFAREA}$ So, $f(9)=1$. You are also given that $f(15)=72863$. Find $f(30)$.
<p>Let $S$ be the set consisting of the four letters $\{\texttt{`A'},\texttt{`E'},\texttt{`F'},\texttt{`R'}\}$.<br> For $n\ge 0$, let $S^*(n)$ denote the set of words of length $n$ consisting of letters belonging to $S$.<br/> We designate the words $\texttt{FREE}, \texttt{FARE}, \texttt{AREA}, \texttt{REEF}$ as <i>keywords</i>.</br></p> <p>Let $f(n)$ be the number of words in $S^*(n)$ that contains all four keywords exactly once.</p> <p>This first happens for $n=9$, and indeed there is a unique 9 lettered word that contain each of the keywords once: $\texttt{FREEFAREA}$<br/> So, $f(9)=1$.</p> <p>You are also given that $f(15)=72863$.</p> <p>Find $f(30)$.</p>
644997092988678
Sunday, 15th September 2019, 01:00 am
993
20%
easy
34
Digit Factorials
$145$ is a curious number, as $1! + 4! + 5! = 1 + 24 + 120 = 145$. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: As $1! = 1$ and $2! = 2$ are not sums they are not included.
$145$ is a curious number, as $1! + 4! + 5! = 1 + 24 + 120 = 145$. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: As $1! = 1$ and $2! = 2$ are not sums they are not included.
<p>$145$ is a curious number, as $1! + 4! + 5! = 1 + 24 + 120 = 145$.</p> <p>Find the sum of all numbers which are equal to the sum of the factorial of their digits.</p> <p class="smaller">Note: As $1! = 1$ and $2! = 2$ are not sums they are not included.</p>
40730
Friday, 3rd January 2003, 06:00 pm
102509
5%
easy
195
$60$-degree Triangle Inscribed Circles
Let's call an integer sided triangle with exactly one angle of $60$ degrees a $60$-degree triangle. Let $r$ be the radius of the inscribed circle of such a $60$-degree triangle. There are $1234$ $60$-degree triangles for which $r \le 100$. Let $T(n)$ be the number of $60$-degree triangles for which $r \le n$, so $T(100) = 1234$, $T(1000) = 22767$, and $T(10000) = 359912$. Find $T(1053779)$.
Let's call an integer sided triangle with exactly one angle of $60$ degrees a $60$-degree triangle. Let $r$ be the radius of the inscribed circle of such a $60$-degree triangle. There are $1234$ $60$-degree triangles for which $r \le 100$. Let $T(n)$ be the number of $60$-degree triangles for which $r \le n$, so $T(100) = 1234$, $T(1000) = 22767$, and $T(10000) = 359912$. Find $T(1053779)$.
<p>Let's call an integer sided triangle with exactly one angle of $60$ degrees a $60$-degree triangle.<br/> Let $r$ be the radius of the inscribed circle of such a $60$-degree triangle.</p> <p>There are $1234$ $60$-degree triangles for which $r \le 100$. <br/>Let $T(n)$ be the number of $60$-degree triangles for which $r \le n$, so<br/> $T(100) = 1234$, $T(1000) = 22767$, and $T(10000) = 359912$.</p> <p>Find $T(1053779)$.</p>
75085391
Friday, 23rd May 2008, 02:00 pm
1616
75%
hard
851
SOP and POS
Let $n$ be a positive integer and let $E_n$ be the set of $n$-tuples of strictly positive integers. For $u = (u_1, \cdots, u_n)$ and $v = (v_1, \cdots, v_n)$ two elements of $E_n$, we define: the Sum Of Products of $u$ and $v$, denoted by $\langle u, v\rangle$, as the sum $\displaystyle\sum_{i = 1}^n u_i v_i$; the Product Of Sums of $u$ and $v$, denoted by $u \star v$, as the product $\displaystyle\prod_{i = 1}^n (u_i + v_i)$. Let $R_n(M)$ be the sum of $u \star v$ over all ordered pairs $(u, v)$ in $E_n$ such that $\langle u, v\rangle = M$. For example: $R_1(10) = 36$, $R_2(100) = 1873044$, $R_2(100!) \equiv 446575636 \bmod 10^9 + 7$. Find $R_6(10000!)$. Give your answer modulo $10^9+7$.
Let $n$ be a positive integer and let $E_n$ be the set of $n$-tuples of strictly positive integers. For $u = (u_1, \cdots, u_n)$ and $v = (v_1, \cdots, v_n)$ two elements of $E_n$, we define: the Sum Of Products of $u$ and $v$, denoted by $\langle u, v\rangle$, as the sum $\displaystyle\sum_{i = 1}^n u_i v_i$; the Product Of Sums of $u$ and $v$, denoted by $u \star v$, as the product $\displaystyle\prod_{i = 1}^n (u_i + v_i)$. Let $R_n(M)$ be the sum of $u \star v$ over all ordered pairs $(u, v)$ in $E_n$ such that $\langle u, v\rangle = M$. For example: $R_1(10) = 36$, $R_2(100) = 1873044$, $R_2(100!) \equiv 446575636 \bmod 10^9 + 7$. Find $R_6(10000!)$. Give your answer modulo $10^9+7$.
<p> Let $n$ be a positive integer and let $E_n$ be the set of $n$-tuples of strictly positive integers.</p> <p> For $u = (u_1, \cdots, u_n)$ and $v = (v_1, \cdots, v_n)$ two elements of $E_n$, we define:</p> <ul> <li>the <dfn>Sum Of Products</dfn> of $u$ and $v$, denoted by $\langle u, v\rangle$, as the sum $\displaystyle\sum_{i = 1}^n u_i v_i$;</li> <li>the <dfn>Product Of Sums</dfn> of $u$ and $v$, denoted by $u \star v$, as the product $\displaystyle\prod_{i = 1}^n (u_i + v_i)$.</li></ul> <p> Let $R_n(M)$ be the sum of $u \star v$ over all ordered pairs $(u, v)$ in $E_n$ such that $\langle u, v\rangle = M$.<br/> For example: $R_1(10) = 36$, $R_2(100) = 1873044$, $R_2(100!) \equiv 446575636 \bmod 10^9 + 7$.</p> <p> Find $R_6(10000!)$. Give your answer modulo $10^9+7$.</p>
726358482
Sunday, 9th July 2023, 11:00 am
151
85%
hard
514
Geoboard Shapes
A geoboard (of order $N$) is a square board with equally-spaced pins protruding from the surface, representing an integer point lattice for coordinates $0 \le x, y \le N$. John begins with a pinless geoboard. Each position on the board is a hole that can be filled with a pin. John decides to generate a random integer between $1$ and $N+1$ (inclusive) for each hole in the geoboard. If the random integer is equal to $1$ for a given hole, then a pin is placed in that hole. After John is finished generating numbers for all $(N+1)^2$ holes and placing any/all corresponding pins, he wraps a tight rubberband around the entire group of pins protruding from the board. Let $S$ represent the shape that is formed. $S$ can also be defined as the smallest convex shape that contains all the pins. The above image depicts a sample layout for $N = 4$. The green markers indicate positions where pins have been placed, and the blue lines collectively represent the rubberband. For this particular arrangement, $S$ has an area of $6$. If there are fewer than three pins on the board (or if all pins are collinear), $S$ can be assumed to have zero area. Let $E(N)$ be the expected area of $S$ given a geoboard of order $N$. For example, $E(1) = 0.18750$, $E(2) = 0.94335$, and $E(10) = 55.03013$ when rounded to five decimal places each. Calculate $E(100)$ rounded to five decimal places.
A geoboard (of order $N$) is a square board with equally-spaced pins protruding from the surface, representing an integer point lattice for coordinates $0 \le x, y \le N$. John begins with a pinless geoboard. Each position on the board is a hole that can be filled with a pin. John decides to generate a random integer between $1$ and $N+1$ (inclusive) for each hole in the geoboard. If the random integer is equal to $1$ for a given hole, then a pin is placed in that hole. After John is finished generating numbers for all $(N+1)^2$ holes and placing any/all corresponding pins, he wraps a tight rubberband around the entire group of pins protruding from the board. Let $S$ represent the shape that is formed. $S$ can also be defined as the smallest convex shape that contains all the pins. The above image depicts a sample layout for $N = 4$. The green markers indicate positions where pins have been placed, and the blue lines collectively represent the rubberband. For this particular arrangement, $S$ has an area of $6$. If there are fewer than three pins on the board (or if all pins are collinear), $S$ can be assumed to have zero area. Let $E(N)$ be the expected area of $S$ given a geoboard of order $N$. For example, $E(1) = 0.18750$, $E(2) = 0.94335$, and $E(10) = 55.03013$ when rounded to five decimal places each. Calculate $E(100)$ rounded to five decimal places.
<p>A <strong>geoboard</strong> (of order $N$) is a square board with equally-spaced pins protruding from the surface, representing an integer point lattice for coordinates $0 \le x, y \le N$.</p> <p>John begins with a pinless geoboard. Each position on the board is a hole that can be filled with a pin. John decides to generate a random integer between $1$ and $N+1$ (inclusive) for each hole in the geoboard. If the random integer is equal to $1$ for a given hole, then a pin is placed in that hole.</p> <p>After John is finished generating numbers for all $(N+1)^2$ holes and placing any/all corresponding pins, he wraps a tight rubberband around the entire group of pins protruding from the board. Let $S$ represent the shape that is formed. $S$ can also be defined as the smallest convex shape that contains all the pins.</p> <div align="center"><img alt="0514_geoboard.png" src="resources/images/0514_geoboard.png?1678992053"/></div> <p>The above image depicts a sample layout for $N = 4$. The green markers indicate positions where pins have been placed, and the blue lines collectively represent the rubberband. For this particular arrangement, $S$ has an area of $6$. If there are fewer than three pins on the board (or if all pins are collinear), $S$ can be assumed to have zero area.</p> <p>Let $E(N)$ be the expected area of $S$ given a geoboard of order $N$. For example, $E(1) = 0.18750$, $E(2) = 0.94335$, and $E(10) = 55.03013$ when rounded to five decimal places each.</p> <p>Calculate $E(100)$ rounded to five decimal places.</p>
8986.86698
Sunday, 3rd May 2015, 04:00 am
248
90%
hard
479
Roots on the Rise
Let $a_k$, $b_k$, and $c_k$ represent the three solutions (real or complex numbers) to the equation $\frac 1 x = (\frac k x)^2(k+x^2)-k x$. For instance, for $k=5$, we see that $\{a_5, b_5, c_5 \}$ is approximately $\{5.727244, -0.363622+2.057397i, -0.363622-2.057397i\}$. Let $\displaystyle S(n) = \sum_{p=1}^n\sum_{k=1}^n(a_k+b_k)^p(b_k+c_k)^p(c_k+a_k)^p$. Interestingly, $S(n)$ is always an integer. For example, $S(4) = 51160$. Find $S(10^6)$ modulo $1\,000\,000\,007$.
Let $a_k$, $b_k$, and $c_k$ represent the three solutions (real or complex numbers) to the equation $\frac 1 x = (\frac k x)^2(k+x^2)-k x$. For instance, for $k=5$, we see that $\{a_5, b_5, c_5 \}$ is approximately $\{5.727244, -0.363622+2.057397i, -0.363622-2.057397i\}$. Let $\displaystyle S(n) = \sum_{p=1}^n\sum_{k=1}^n(a_k+b_k)^p(b_k+c_k)^p(c_k+a_k)^p$. Interestingly, $S(n)$ is always an integer. For example, $S(4) = 51160$. Find $S(10^6)$ modulo $1\,000\,000\,007$.
<p>Let $a_k$, $b_k$, and $c_k$ represent the three solutions (real or complex numbers) to the equation $\frac 1 x = (\frac k x)^2(k+x^2)-k x$.</p> <p>For instance, for $k=5$, we see that $\{a_5, b_5, c_5 \}$ is approximately $\{5.727244, -0.363622+2.057397i, -0.363622-2.057397i\}$.</p> <p>Let $\displaystyle S(n) = \sum_{p=1}^n\sum_{k=1}^n(a_k+b_k)^p(b_k+c_k)^p(c_k+a_k)^p$. </p> <p>Interestingly, $S(n)$ is always an integer. For example, $S(4) = 51160$.</p> <p>Find $S(10^6)$ modulo $1\,000\,000\,007$.</p>
191541795
Saturday, 6th September 2014, 10:00 pm
1444
25%
easy
658
Incomplete Words II
In the context of formal languages, any finite sequence of letters of a given alphabet $\Sigma$ is called a word over $\Sigma$. We call a word incomplete if it does not contain every letter of $\Sigma$. For example, using the alphabet $\Sigma=\{ a, b, c\}$, '$ab$', '$abab$' and '$\,$' (the empty word) are incomplete words over $\Sigma$, while '$abac$' is a complete word over $\Sigma$. Given an alphabet $\Sigma$ of $\alpha$ letters, we define $I(\alpha,n)$ to be the number of incomplete words over $\Sigma$ with a length not exceeding $n$. For example, $I(3,0)=1$, $I(3,2)=13$ and $I(3,4)=79$. Let $\displaystyle S(k,n)=\sum_{\alpha=1}^k I(\alpha,n)$. For example, $S(4,4)=406$, $S(8,8)=27902680$ and $S (10,100) \equiv 983602076 \bmod 1\,000\,000\,007$. Find $S(10^7,10^{12})$. Give your answer modulo $1\,000\,000\,007$.
In the context of formal languages, any finite sequence of letters of a given alphabet $\Sigma$ is called a word over $\Sigma$. We call a word incomplete if it does not contain every letter of $\Sigma$. For example, using the alphabet $\Sigma=\{ a, b, c\}$, '$ab$', '$abab$' and '$\,$' (the empty word) are incomplete words over $\Sigma$, while '$abac$' is a complete word over $\Sigma$. Given an alphabet $\Sigma$ of $\alpha$ letters, we define $I(\alpha,n)$ to be the number of incomplete words over $\Sigma$ with a length not exceeding $n$. For example, $I(3,0)=1$, $I(3,2)=13$ and $I(3,4)=79$. Let $\displaystyle S(k,n)=\sum_{\alpha=1}^k I(\alpha,n)$. For example, $S(4,4)=406$, $S(8,8)=27902680$ and $S (10,100) \equiv 983602076 \bmod 1\,000\,000\,007$. Find $S(10^7,10^{12})$. Give your answer modulo $1\,000\,000\,007$.
<p>In the context of <strong>formal languages</strong>, any finite sequence of letters of a given <strong>alphabet</strong> $\Sigma$ is called a <strong>word</strong> over $\Sigma$. We call a word <dfn>incomplete</dfn> if it does not contain every letter of $\Sigma$.</p> <p> For example, using the alphabet $\Sigma=\{ a, b, c\}$, '$ab$', '$abab$' and '$\,$' (the empty word) are incomplete words over $\Sigma$, while '$abac$' is a complete word over $\Sigma$.</p> <p> Given an alphabet $\Sigma$ of $\alpha$ letters, we define $I(\alpha,n)$ to be the number of incomplete words over $\Sigma$ with a length not exceeding $n$. <br/> For example, $I(3,0)=1$, $I(3,2)=13$ and $I(3,4)=79$.</p> <p> Let $\displaystyle S(k,n)=\sum_{\alpha=1}^k I(\alpha,n)$.<br/> For example, $S(4,4)=406$, $S(8,8)=27902680$ and $S (10,100) \equiv 983602076 \bmod 1\,000\,000\,007$.</p> <p> Find $S(10^7,10^{12})$. Give your answer modulo $1\,000\,000\,007$. </p>
958280177
Saturday, 23rd February 2019, 01:00 pm
265
55%
medium
783
Urns
Given $n$ and $k$ two positive integers we begin with an urn that contains $kn$ white balls. We then proceed through $n$ turns where on each turn $k$ black balls are added to the urn and then $2k$ random balls are removed from the urn. We let $B_t(n,k)$ be the number of black balls that are removed on turn $t$. Further define $E(n,k)$ as the expectation of $\displaystyle \sum_{t=1}^n B_t(n,k)^2$. You are given $E(2,2) = 9.6$. Find $E(10^6,10)$. Round your answer to the nearest whole number.
Given $n$ and $k$ two positive integers we begin with an urn that contains $kn$ white balls. We then proceed through $n$ turns where on each turn $k$ black balls are added to the urn and then $2k$ random balls are removed from the urn. We let $B_t(n,k)$ be the number of black balls that are removed on turn $t$. Further define $E(n,k)$ as the expectation of $\displaystyle \sum_{t=1}^n B_t(n,k)^2$. You are given $E(2,2) = 9.6$. Find $E(10^6,10)$. Round your answer to the nearest whole number.
<p> Given $n$ and $k$ two positive integers we begin with an urn that contains $kn$ white balls. We then proceed through $n$ turns where on each turn $k$ black balls are added to the urn and then $2k$ random balls are removed from the urn.</p> <p> We let $B_t(n,k)$ be the number of black balls that are removed on turn $t$.</p> <p> Further define $E(n,k)$ as the expectation of $\displaystyle \sum_{t=1}^n B_t(n,k)^2$.</p> <p> You are given $E(2,2) = 9.6$.</p> <p> Find $E(10^6,10)$. Round your answer to the nearest whole number.</p>
136666597
Sunday, 30th January 2022, 01:00 am
212
55%
medium
583
Heron Envelopes
A standard envelope shape is a convex figure consisting of an isosceles triangle (the flap) placed on top of a rectangle. An example of an envelope with integral sides is shown below. Note that to form a sensible envelope, the perpendicular height of the flap ($BCD$) must be smaller than the height of the rectangle ($ABDE$). In the envelope illustrated, not only are all the sides integral, but also all the diagonals ($AC$, $AD$, $BD$, $BE$ and $CE$) are integral too. Let us call an envelope with these properties a Heron envelope. Let $S(p)$ be the sum of the perimeters of all the Heron envelopes with a perimeter less than or equal to $p$. You are given that $S(10^4) = 884680$. Find $S(10^7)$.
A standard envelope shape is a convex figure consisting of an isosceles triangle (the flap) placed on top of a rectangle. An example of an envelope with integral sides is shown below. Note that to form a sensible envelope, the perpendicular height of the flap ($BCD$) must be smaller than the height of the rectangle ($ABDE$). In the envelope illustrated, not only are all the sides integral, but also all the diagonals ($AC$, $AD$, $BD$, $BE$ and $CE$) are integral too. Let us call an envelope with these properties a Heron envelope. Let $S(p)$ be the sum of the perimeters of all the Heron envelopes with a perimeter less than or equal to $p$. You are given that $S(10^4) = 884680$. Find $S(10^7)$.
<p> A standard envelope shape is a convex figure consisting of an isosceles triangle (the flap) placed on top of a rectangle. An example of an envelope with integral sides is shown below. Note that to form a sensible envelope, the perpendicular height of the flap ($BCD$) must be smaller than the height of the rectangle ($ABDE$). </p> <div class="center"> <img alt="0583_heron_envelope.gif" src="resources/images/0583_heron_envelope.gif?1678992057"/> </div> <p> In the envelope illustrated, not only are all the sides integral, but also all the diagonals ($AC$, $AD$, $BD$, $BE$ and $CE$) are integral too. Let us call an envelope with these properties a <dfn>Heron envelope</dfn>. </p> <p> Let $S(p)$ be the sum of the perimeters of all the Heron envelopes with a perimeter less than or equal to $p$. </p> <p> You are given that $S(10^4) = 884680$. Find $S(10^7)$. </p>
1174137929000
Saturday, 24th December 2016, 01:00 pm
410
50%
medium
59
XOR Decryption
Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, asterisk (*) = 42, and lowercase k = 107. A modern encryption method is to take a text file, convert the bytes to ASCII, then XOR each byte with a given value, taken from a secret key. The advantage with the XOR function is that using the same encryption key on the cipher text, restores the plain text; for example, 65 XOR 42 = 107, then 107 XOR 42 = 65. For unbreakable encryption, the key is the same length as the plain text message, and the key is made up of random bytes. The user would keep the encrypted message and the encryption key in different locations, and without both "halves", it is impossible to decrypt the message. Unfortunately, this method is impractical for most users, so the modified method is to use a password as a key. If the password is shorter than the message, which is likely, the key is repeated cyclically throughout the message. The balance for this method is using a sufficiently long password key for security, but short enough to be memorable. Your task has been made easy, as the encryption key consists of three lower case characters. Using 0059_cipher.txt (right click and 'Save Link/Target As...'), a file containing the encrypted ASCII codes, and the knowledge that the plain text must contain common English words, decrypt the message and find the sum of the ASCII values in the original text.
Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, asterisk (*) = 42, and lowercase k = 107. A modern encryption method is to take a text file, convert the bytes to ASCII, then XOR each byte with a given value, taken from a secret key. The advantage with the XOR function is that using the same encryption key on the cipher text, restores the plain text; for example, 65 XOR 42 = 107, then 107 XOR 42 = 65. For unbreakable encryption, the key is the same length as the plain text message, and the key is made up of random bytes. The user would keep the encrypted message and the encryption key in different locations, and without both "halves", it is impossible to decrypt the message. Unfortunately, this method is impractical for most users, so the modified method is to use a password as a key. If the password is shorter than the message, which is likely, the key is repeated cyclically throughout the message. The balance for this method is using a sufficiently long password key for security, but short enough to be memorable. Your task has been made easy, as the encryption key consists of three lower case characters. Using 0059_cipher.txt (right click and 'Save Link/Target As...'), a file containing the encrypted ASCII codes, and the knowledge that the plain text must contain common English words, decrypt the message and find the sum of the ASCII values in the original text.
<p>Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, asterisk (*) = 42, and lowercase k = 107.</p> <p>A modern encryption method is to take a text file, convert the bytes to ASCII, then XOR each byte with a given value, taken from a secret key. The advantage with the XOR function is that using the same encryption key on the cipher text, restores the plain text; for example, 65 XOR 42 = 107, then 107 XOR 42 = 65.</p> <p>For unbreakable encryption, the key is the same length as the plain text message, and the key is made up of random bytes. The user would keep the encrypted message and the encryption key in different locations, and without both "halves", it is impossible to decrypt the message.</p> <p>Unfortunately, this method is impractical for most users, so the modified method is to use a password as a key. If the password is shorter than the message, which is likely, the key is repeated cyclically throughout the message. The balance for this method is using a sufficiently long password key for security, but short enough to be memorable.</p> <p>Your task has been made easy, as the encryption key consists of three lower case characters. Using <a href="resources/documents/0059_cipher.txt">0059_cipher.txt</a> (right click and 'Save Link/Target As...'), a file containing the encrypted ASCII codes, and the knowledge that the plain text must contain common English words, decrypt the message and find the sum of the ASCII values in the original text.</p>
129448
Friday, 19th December 2003, 06:00 pm
45196
5%
easy
831
Triple Product
Let $g(m)$ be the integer defined by the following double sum of products of binomial coefficients: $$\sum_{j=0}^m\sum_{i = 0}^j (-1)^{j-i}\binom mj \binom ji \binom{j+5+6i}{j+5}.$$ You are given that $g(10) = 127278262644918$. Its first (most significant) five digits are $12727$. Find the first ten digits of $g(142857)$ when written in base $7$.
Let $g(m)$ be the integer defined by the following double sum of products of binomial coefficients: $$\sum_{j=0}^m\sum_{i = 0}^j (-1)^{j-i}\binom mj \binom ji \binom{j+5+6i}{j+5}.$$ You are given that $g(10) = 127278262644918$. Its first (most significant) five digits are $12727$. Find the first ten digits of $g(142857)$ when written in base $7$.
<p>Let $g(m)$ be the integer defined by the following double sum of products of binomial coefficients:</p> <p> $$\sum_{j=0}^m\sum_{i = 0}^j (-1)^{j-i}\binom mj \binom ji \binom{j+5+6i}{j+5}.$$ </p> <p> You are given that $g(10) = 127278262644918$.<br/> Its first (most significant) five digits are $12727$.<br/> Find the first ten digits of $g(142857)$ when written in base $7$. </p>
5226432553
Sunday, 26th February 2023, 01:00 am
197
60%
hard
830
Binomials and Powers
Let $\displaystyle S(n)=\sum\limits_{k=0}^{n}\binom{n}{k}k^n$. You are given, $S(10)=142469423360$. Find $S(10^{18})$. Submit your answer modulo $83^3 89^3 97^3$.
Let $\displaystyle S(n)=\sum\limits_{k=0}^{n}\binom{n}{k}k^n$. You are given, $S(10)=142469423360$. Find $S(10^{18})$. Submit your answer modulo $83^3 89^3 97^3$.
<p> Let $\displaystyle S(n)=\sum\limits_{k=0}^{n}\binom{n}{k}k^n$.</p> <p> You are given, $S(10)=142469423360$.</p> <p> Find $S(10^{18})$. Submit your answer modulo $83^3 89^3 97^3$.</p>
254179446930484376
Saturday, 18th February 2023, 10:00 pm
161
75%
hard
773
Ruff Numbers
Let $S_k$ be the set containing $2$ and $5$ and the first $k$ primes that end in $7$. For example, $S_3 = \{2,5,7,17,37\}$. Define a $k$-Ruff number to be one that is not divisible by any element in $S_k$. If $N_k$ is the product of the numbers in $S_k$ then define $F(k)$ to be the sum of all $k$-Ruff numbers less than $N_k$ that have last digit $7$. You are given $F(3) = 76101452$. Find $F(97)$, give your answer modulo $1\,000\,000\,007$.
Let $S_k$ be the set containing $2$ and $5$ and the first $k$ primes that end in $7$. For example, $S_3 = \{2,5,7,17,37\}$. Define a $k$-Ruff number to be one that is not divisible by any element in $S_k$. If $N_k$ is the product of the numbers in $S_k$ then define $F(k)$ to be the sum of all $k$-Ruff numbers less than $N_k$ that have last digit $7$. You are given $F(3) = 76101452$. Find $F(97)$, give your answer modulo $1\,000\,000\,007$.
<p> Let $S_k$ be the set containing $2$ and $5$ and the first $k$ primes that end in $7$. For example, $S_3 = \{2,5,7,17,37\}$.</p> <p> Define a <dfn>$k$-Ruff</dfn> number to be one that is not divisible by any element in $S_k$.</p> <p> If $N_k$ is the product of the numbers in $S_k$ then define $F(k)$ to be the sum of all $k$-Ruff numbers less than $N_k$ that have last digit $7$. You are given $F(3) = 76101452$.</p> <p> Find $F(97)$, give your answer modulo $1\,000\,000\,007$.</p>
556206950
Saturday, 20th November 2021, 07:00 pm
213
50%
medium
859
Cookie Game
Odd and Even are playing a game with $N$ cookies. The game begins with the $N$ cookies divided into one or more piles, not necessarily of the same size. They then make moves in turn, starting with Odd. Odd's turn: Odd may choose any pile with an odd number of cookies, eat one and divide the remaining (if any) into two equal piles. Even's turn: Even may choose any pile with an even number of cookies, eat two of them and divide the remaining (if any) into two equal piles. The player that does not have a valid move loses the game. Let $C(N)$ be the number of ways that $N$ cookies can be divided so that Even has a winning strategy. For example, $C(5) = 2$ because there are two winning configurations for Even: a single pile containing all five cookies; three piles containing one, two and two cookies. You are also given $C(16) = 64$. Find $C(300)$.
Odd and Even are playing a game with $N$ cookies. The game begins with the $N$ cookies divided into one or more piles, not necessarily of the same size. They then make moves in turn, starting with Odd. Odd's turn: Odd may choose any pile with an odd number of cookies, eat one and divide the remaining (if any) into two equal piles. Even's turn: Even may choose any pile with an even number of cookies, eat two of them and divide the remaining (if any) into two equal piles. The player that does not have a valid move loses the game. Let $C(N)$ be the number of ways that $N$ cookies can be divided so that Even has a winning strategy. For example, $C(5) = 2$ because there are two winning configurations for Even: a single pile containing all five cookies; three piles containing one, two and two cookies. You are also given $C(16) = 64$. Find $C(300)$.
<p> Odd and Even are playing a game with $N$ cookies.</p> <p> The game begins with the $N$ cookies divided into one or more piles, not necessarily of the same size. They then make moves in turn, starting with Odd.<br/> Odd's turn: Odd may choose any pile with an <b>odd</b> number of cookies, eat one and divide the remaining (if any) into two equal piles.<br/> Even's turn: Even may choose any pile with an <b>even</b> number of cookies, eat two of them and divide the remaining (if any) into two equal piles.<br/> The player that does not have a valid move loses the game.</p> <p> Let $C(N)$ be the number of ways that $N$ cookies can be divided so that Even has a winning strategy.<br/> For example, $C(5) = 2$ because there are two winning configurations for Even: a single pile containing all five cookies; three piles containing one, two and two cookies.<br/> You are also given $C(16) = 64$.</p> <p> Find $C(300)$.</p>
1527162658488196
Sunday, 15th October 2023, 08:00 am
241
55%
medium
44
Pentagon Numbers
Pentagonal numbers are generated by the formula, $P_n=n(3n-1)/2$. The first ten pentagonal numbers are: $$1, 5, 12, 22, 35, 51, 70, 92, 117, 145, \dots$$ It can be seen that $P_4 + P_7 = 22 + 70 = 92 = P_8$. However, their difference, $70 - 22 = 48$, is not pentagonal. Find the pair of pentagonal numbers, $P_j$ and $P_k$, for which their sum and difference are pentagonal and $D = |P_k - P_j|$ is minimised; what is the value of $D$?
Pentagonal numbers are generated by the formula, $P_n=n(3n-1)/2$. The first ten pentagonal numbers are: $$1, 5, 12, 22, 35, 51, 70, 92, 117, 145, \dots$$ It can be seen that $P_4 + P_7 = 22 + 70 = 92 = P_8$. However, their difference, $70 - 22 = 48$, is not pentagonal. Find the pair of pentagonal numbers, $P_j$ and $P_k$, for which their sum and difference are pentagonal and $D = |P_k - P_j|$ is minimised; what is the value of $D$?
<p>Pentagonal numbers are generated by the formula, $P_n=n(3n-1)/2$. The first ten pentagonal numbers are: $$1, 5, 12, 22, 35, 51, 70, 92, 117, 145, \dots$$</p> <p>It can be seen that $P_4 + P_7 = 22 + 70 = 92 = P_8$. However, their difference, $70 - 22 = 48$, is not pentagonal.</p> <p>Find the pair of pentagonal numbers, $P_j$ and $P_k$, for which their sum and difference are pentagonal and $D = |P_k - P_j|$ is minimised; what is the value of $D$?</p>
5482660
Friday, 23rd May 2003, 06:00 pm
64423
5%
easy
262
Mountain Range
The following equation represents the continuous topography of a mountainous region, giving the elevationheight above sea level $h$ at any point $(x, y)$: $$h = \left(5000 - \frac{x^2 + y^2 + xy}{200} + \frac{25(x + y)}2\right) \cdot e^{-\left|\frac{x^2 + y^2}{1000000} - \frac{3(x + y)}{2000} + \frac 7 {10}\right|}.$$ A mosquito intends to fly from $A(200,200)$ to $B(1400,1400)$, without leaving the area given by $0 \le x, y \le 1600$. Because of the intervening mountains, it first rises straight up to a point $A^\prime$, having elevation $f$. Then, while remaining at the same elevation $f$, it flies around any obstacles until it arrives at a point $B^\prime$ directly above $B$. First, determine $f_{\mathrm{min}}$ which is the minimum constant elevation allowing such a trip from $A$ to $B$, while remaining in the specified area. Then, find the length of the shortest path between $A^\prime$ and $B^\prime$, while flying at that constant elevation $f_{\mathrm{min}}$. Give that length as your answer, rounded to three decimal places. Note: For convenience, the elevation function shown above is repeated below, in a form suitable for most programming languages: h=( 5000-0.005*(x*x+y*y+x*y)+12.5*(x+y) ) * exp( -abs(0.000001*(x*x+y*y)-0.0015*(x+y)+0.7) )
The following equation represents the continuous topography of a mountainous region, giving the elevationheight above sea level $h$ at any point $(x, y)$: $$h = \left(5000 - \frac{x^2 + y^2 + xy}{200} + \frac{25(x + y)}2\right) \cdot e^{-\left|\frac{x^2 + y^2}{1000000} - \frac{3(x + y)}{2000} + \frac 7 {10}\right|}.$$ A mosquito intends to fly from $A(200,200)$ to $B(1400,1400)$, without leaving the area given by $0 \le x, y \le 1600$. Because of the intervening mountains, it first rises straight up to a point $A^\prime$, having elevation $f$. Then, while remaining at the same elevation $f$, it flies around any obstacles until it arrives at a point $B^\prime$ directly above $B$. First, determine $f_{\mathrm{min}}$ which is the minimum constant elevation allowing such a trip from $A$ to $B$, while remaining in the specified area. Then, find the length of the shortest path between $A^\prime$ and $B^\prime$, while flying at that constant elevation $f_{\mathrm{min}}$. Give that length as your answer, rounded to three decimal places. Note: For convenience, the elevation function shown above is repeated below, in a form suitable for most programming languages: h=( 5000-0.005*(x*x+y*y+x*y)+12.5*(x+y) ) * exp( -abs(0.000001*(x*x+y*y)-0.0015*(x+y)+0.7) )
<p>The following equation represents the <i>continuous</i> topography of a mountainous region, giving the <strong class="tooltip">elevation<span class="tooltiptext">height above sea level</span></strong> $h$ at any point $(x, y)$: $$h = \left(5000 - \frac{x^2 + y^2 + xy}{200} + \frac{25(x + y)}2\right) \cdot e^{-\left|\frac{x^2 + y^2}{1000000} - \frac{3(x + y)}{2000} + \frac 7 {10}\right|}.$$ </p> <p>A mosquito intends to fly from $A(200,200)$ to $B(1400,1400)$, without leaving the area given by $0 \le x, y \le 1600$.</p> <p>Because of the intervening mountains, it first rises straight up to a point $A^\prime$, having elevation $f$. Then, while remaining at the same elevation $f$, it flies around any obstacles until it arrives at a point $B^\prime$ directly above $B$.</p> <p>First, determine $f_{\mathrm{min}}$ which is the minimum constant elevation allowing such a trip from $A$ to $B$, while remaining in the specified area.<br/> Then, find the length of the shortest path between $A^\prime$ and $B^\prime$, while flying at that constant elevation $f_{\mathrm{min}}$.</p> <p>Give that length as your answer, rounded to three decimal places.</p> <p><font><u>Note</u>: For convenience, the elevation function shown above is repeated below, in a form suitable for most programming languages:<br/> h=( 5000-0.005*(x*x+y*y+x*y)+12.5*(x+y) ) * exp( -abs(0.000001*(x*x+y*y)-0.0015*(x+y)+0.7) )</font></p>
2531.205
Friday, 30th October 2009, 09:00 pm
815
80%
hard
399
Squarefree Fibonacci Numbers
The first $15$ Fibonacci numbers are: $1,1,2,3,5,8,13,21,34,55,89,144,233,377,610$. It can be seen that $8$ and $144$ are not squarefree: $8$ is divisible by $4$ and $144$ is divisible by $4$ and by $9$. So the first $13$ squarefree Fibonacci numbers are: $1,1,2,3,5,13,21,34,55,89,233,377$ and $610$. The $200$th squarefree Fibonacci number is: $971183874599339129547649988289594072811608739584170445$. The last sixteen digits of this number are: $1608739584170445$ and in scientific notation this number can be written as $9.7\mathrm e53$. Find the $100\,000\,000$th squarefree Fibonacci number. Give as your answer its last sixteen digits followed by a comma followed by the number in scientific notation (rounded to one digit after the decimal point). For the $200$th squarefree number the answer would have been: 1608739584170445,9.7e53 Note: For this problem, assume that for every prime $p$, the first fibonacci number divisible by $p$ is not divisible by $p^2$ (this is part of Wall's conjecture). This has been verified for primes $\le 3 \cdot 10^{15}$, but has not been proven in general. If it happens that the conjecture is false, then the accepted answer to this problem isn't guaranteed to be the $100\,000\,000$th squarefree Fibonacci number, rather it represents only a lower bound for that number.
The first $15$ Fibonacci numbers are: $1,1,2,3,5,8,13,21,34,55,89,144,233,377,610$. It can be seen that $8$ and $144$ are not squarefree: $8$ is divisible by $4$ and $144$ is divisible by $4$ and by $9$. So the first $13$ squarefree Fibonacci numbers are: $1,1,2,3,5,13,21,34,55,89,233,377$ and $610$. The $200$th squarefree Fibonacci number is: $971183874599339129547649988289594072811608739584170445$. The last sixteen digits of this number are: $1608739584170445$ and in scientific notation this number can be written as $9.7\mathrm e53$. Find the $100\,000\,000$th squarefree Fibonacci number. Give as your answer its last sixteen digits followed by a comma followed by the number in scientific notation (rounded to one digit after the decimal point). For the $200$th squarefree number the answer would have been: 1608739584170445,9.7e53 Note: For this problem, assume that for every prime $p$, the first fibonacci number divisible by $p$ is not divisible by $p^2$ (this is part of Wall's conjecture). This has been verified for primes $\le 3 \cdot 10^{15}$, but has not been proven in general. If it happens that the conjecture is false, then the accepted answer to this problem isn't guaranteed to be the $100\,000\,000$th squarefree Fibonacci number, rather it represents only a lower bound for that number.
<p> The first $15$ Fibonacci numbers are:<br/> $1,1,2,3,5,8,13,21,34,55,89,144,233,377,610$.<br/> It can be seen that $8$ and $144$ are not squarefree: $8$ is divisible by $4$ and $144$ is divisible by $4$ and by $9$.<br/> So the first $13$ squarefree Fibonacci numbers are:<br/> $1,1,2,3,5,13,21,34,55,89,233,377$ and $610$. </p> <p> The $200$th squarefree Fibonacci number is: $971183874599339129547649988289594072811608739584170445$.<br/> The last sixteen digits of this number are: $1608739584170445$ and in scientific notation this number can be written as $9.7\mathrm e53$. </p> <p> Find the $100\,000\,000$th squarefree Fibonacci number.<br/> Give as your answer its last sixteen digits followed by a comma followed by the number in scientific notation (rounded to one digit after the decimal point).<br/> For the $200$th squarefree number the answer would have been: 1608739584170445,9.7e53 </p> <p> <font size="-1"> Note:<br/> For this problem, assume that for every prime $p$, the first fibonacci number divisible by $p$ is not divisible by $p^2$ (this is part of <strong>Wall's conjecture</strong>). This has been verified for primes $\le 3 \cdot 10^{15}$, but has not been proven in general.<br/> If it happens that the conjecture is false, then the accepted answer to this problem isn't guaranteed to be the $100\,000\,000$th squarefree Fibonacci number, rather it represents only a lower bound for that number. </font> </p>
1508395636674243,6.5e27330467
Sunday, 21st October 2012, 11:00 am
638
45%
medium
687
Shuffling Cards
A standard deck of $52$ playing cards, which consists of thirteen ranks (Ace, Two, ..., Ten, King, Queen and Jack) each in four suits (Clubs, Diamonds, Hearts and Spades), is randomly shuffled. Let us call a rank perfect if no two cards of that same rank appear next to each other after the shuffle. It can be seen that the expected number of ranks that are perfect after a random shuffle equals $\frac {4324} {425} \approx 10.1741176471$. Find the probability that the number of perfect ranks is prime. Give your answer rounded to $10$ decimal places.
A standard deck of $52$ playing cards, which consists of thirteen ranks (Ace, Two, ..., Ten, King, Queen and Jack) each in four suits (Clubs, Diamonds, Hearts and Spades), is randomly shuffled. Let us call a rank perfect if no two cards of that same rank appear next to each other after the shuffle. It can be seen that the expected number of ranks that are perfect after a random shuffle equals $\frac {4324} {425} \approx 10.1741176471$. Find the probability that the number of perfect ranks is prime. Give your answer rounded to $10$ decimal places.
<p>A standard deck of $52$ playing cards, which consists of thirteen ranks (Ace, Two, ..., Ten, King, Queen and Jack) each in four suits (Clubs, Diamonds, Hearts and Spades), is randomly shuffled. Let us call a rank <dfn>perfect</dfn> if no two cards of that same rank appear next to each other after the shuffle.</p> <p> It can be seen that the expected number of ranks that are perfect after a random shuffle equals $\frac {4324} {425} \approx 10.1741176471$.</p> <p> Find the probability that the number of perfect ranks is prime. Give your answer rounded to $10$ decimal places.</p>
0.3285320869
Saturday, 2nd November 2019, 10:00 pm
345
45%
medium
571
Super Pandigital Numbers
A positive number is pandigital in base $b$ if it contains all digits from $0$ to $b - 1$ at least once when written in base $b$. An $n$-super-pandigital number is a number that is simultaneously pandigital in all bases from $2$ to $n$ inclusively. For example $978 = 1111010010_2 = 1100020_3 = 33102_4 = 12403_5$ is the smallest $5$-super-pandigital number. Similarly, $1093265784$ is the smallest $10$-super-pandigital number. The sum of the $10$ smallest $10$-super-pandigital numbers is $20319792309$. What is the sum of the $10$ smallest $12$-super-pandigital numbers?
A positive number is pandigital in base $b$ if it contains all digits from $0$ to $b - 1$ at least once when written in base $b$. An $n$-super-pandigital number is a number that is simultaneously pandigital in all bases from $2$ to $n$ inclusively. For example $978 = 1111010010_2 = 1100020_3 = 33102_4 = 12403_5$ is the smallest $5$-super-pandigital number. Similarly, $1093265784$ is the smallest $10$-super-pandigital number. The sum of the $10$ smallest $10$-super-pandigital numbers is $20319792309$. What is the sum of the $10$ smallest $12$-super-pandigital numbers?
<p>A positive number is <strong>pandigital</strong> in base $b$ if it contains all digits from $0$ to $b - 1$ at least once when written in base $b$.</p> <p>An <dfn>$n$-super-pandigital</dfn> number is a number that is simultaneously pandigital in all bases from $2$ to $n$ inclusively.<br/> For example $978 = 1111010010_2 = 1100020_3 = 33102_4 = 12403_5$ is the smallest $5$-super-pandigital number.<br/> Similarly, $1093265784$ is the smallest $10$-super-pandigital number.<br/> The sum of the $10$ smallest $10$-super-pandigital numbers is $20319792309$.</p> <p>What is the sum of the $10$ smallest $12$-super-pandigital numbers?</p>
30510390701978
Sunday, 25th September 2016, 01:00 am
1224
25%
easy
253
Tidying Up A
A small child has a “number caterpillar” consisting of forty jigsaw pieces, each with one number on it, which, when connected together in a line, reveal the numbers $1$ to $40$ in order. Every night, the child's father has to pick up the pieces of the caterpillar that have been scattered across the play room. He picks up the pieces at random and places them in the correct order. As the caterpillar is built up in this way, it forms distinct segments that gradually merge together. The number of segments starts at zero (no pieces placed), generally increases up to about eleven or twelve, then tends to drop again before finishing at a single segment (all pieces placed). For example: Piece Placed Segments So Far 121422936434554354…… Let $M$ be the maximum number of segments encountered during a random tidy-up of the caterpillar. For a caterpillar of ten pieces, the number of possibilities for each $M$ is M Possibilities 1512      2250912      31815264      41418112      5144000       so the most likely value of $M$ is $3$ and the average value is $385643/113400 = 3.400732$, rounded to six decimal places. The most likely value of $M$ for a forty-piece caterpillar is $11$; but what is the average value of $M$? Give your answer rounded to six decimal places.
A small child has a “number caterpillar” consisting of forty jigsaw pieces, each with one number on it, which, when connected together in a line, reveal the numbers $1$ to $40$ in order. Every night, the child's father has to pick up the pieces of the caterpillar that have been scattered across the play room. He picks up the pieces at random and places them in the correct order. As the caterpillar is built up in this way, it forms distinct segments that gradually merge together. The number of segments starts at zero (no pieces placed), generally increases up to about eleven or twelve, then tends to drop again before finishing at a single segment (all pieces placed). For example: Piece Placed Segments So Far 121422936434554354…… Let $M$ be the maximum number of segments encountered during a random tidy-up of the caterpillar. For a caterpillar of ten pieces, the number of possibilities for each $M$ is M Possibilities 1512      2250912      31815264      41418112      5144000       so the most likely value of $M$ is $3$ and the average value is $385643/113400 = 3.400732$, rounded to six decimal places. The most likely value of $M$ for a forty-piece caterpillar is $11$; but what is the average value of $M$? Give your answer rounded to six decimal places.
<p>A small child has a “number caterpillar” consisting of forty jigsaw pieces, each with one number on it, which, when connected together in a line, reveal the numbers $1$ to $40$ in order.</p> <p>Every night, the child's father has to pick up the pieces of the caterpillar that have been scattered across the play room. He picks up the pieces at random and places them in the correct order.<br/> As the caterpillar is built up in this way, it forms distinct segments that gradually merge together.<br/> The number of segments starts at zero (no pieces placed), generally increases up to about eleven or twelve, then tends to drop again before finishing at a single segment (all pieces placed).</p><p> </p><p>For example:</p> <div class="center"> <table class="grid" style="margin:0 auto;"><tr><th align="center" width="80"><b>Piece Placed</b></th> <th align="center" width="80"><b>Segments So Far</b></th></tr> <tr><td align="center">12</td><td align="center">1</td></tr><tr><td align="center">4</td><td align="center">2</td></tr><tr><td align="center">29</td><td align="center">3</td></tr><tr><td align="center">6</td><td align="center">4</td></tr><tr><td align="center">34</td><td align="center">5</td></tr><tr><td align="center">5</td><td align="center">4</td></tr><tr><td align="center">35</td><td align="center">4</td></tr><tr><td align="center">…</td><td align="center">…</td></tr></table></div> <p>Let $M$ be the maximum number of segments encountered during a random tidy-up of the caterpillar.<br/> For a caterpillar of ten pieces, the number of possibilities for each $M$ is</p> <div class="center"> <table class="grid" style="margin:0 auto;"><tr><th align="center" width="50"><b><var>M</var></b></th> <th align="center" width="90"><b>Possibilities</b></th></tr> <tr><td align="center">1</td><td align="right">512      </td></tr><tr><td align="center">2</td><td align="right">250912      </td></tr><tr><td align="center">3</td><td align="right">1815264      </td></tr><tr><td align="center">4</td><td align="right">1418112      </td></tr><tr><td align="center">5</td><td align="right">144000      </td></tr></table></div> <p>so the most likely value of $M$ is $3$ and the average value is $385643/113400 = 3.400732$, rounded to six decimal places.</p> <p>The most likely value of $M$ for a forty-piece caterpillar is $11$; but what is the average value of $M$?</p> <p>Give your answer rounded to six decimal places.</p>
11.492847
Friday, 28th August 2009, 01:00 pm
1173
75%
hard
825
Chasing Game
Two cars are on a circular track of total length $2n$, facing the same direction, initially distance $n$ apart. They move in turn. At each turn, the moving car will advance a distance of $1$, $2$ or $3$, with equal probabilities. The chase ends when the moving car reaches or goes beyond the position of the other car. The moving car is declared the winner. Let $S(n)$ be the difference between the winning probabilities of the two cars. For example, when $n = 2$, the winning probabilities of the two cars are $\frac 9 {11}$ and $\frac 2 {11}$, and thus $S(2) = \frac 7 {11}$. Let $\displaystyle T(N) = \sum_{n = 2}^N S(n)$. You are given that $T(10) = 2.38235282$ rounded to 8 digits after the decimal point. Find $T(10^{14})$, rounded to 8 digits after the decimal point.
Two cars are on a circular track of total length $2n$, facing the same direction, initially distance $n$ apart. They move in turn. At each turn, the moving car will advance a distance of $1$, $2$ or $3$, with equal probabilities. The chase ends when the moving car reaches or goes beyond the position of the other car. The moving car is declared the winner. Let $S(n)$ be the difference between the winning probabilities of the two cars. For example, when $n = 2$, the winning probabilities of the two cars are $\frac 9 {11}$ and $\frac 2 {11}$, and thus $S(2) = \frac 7 {11}$. Let $\displaystyle T(N) = \sum_{n = 2}^N S(n)$. You are given that $T(10) = 2.38235282$ rounded to 8 digits after the decimal point. Find $T(10^{14})$, rounded to 8 digits after the decimal point.
<p>Two cars are on a circular track of total length $2n$, facing the same direction, initially distance $n$ apart.<br> They move in turn. At each turn, the moving car will advance a distance of $1$, $2$ or $3$, with equal probabilities.<br/> The chase ends when the moving car reaches or goes beyond the position of the other car. The moving car is declared the winner.</br></p> <p>Let $S(n)$ be the difference between the winning probabilities of the two cars.<br/> For example, when $n = 2$, the winning probabilities of the two cars are $\frac 9 {11}$ and $\frac 2 {11}$, and thus $S(2) = \frac 7 {11}$.</p> <p>Let $\displaystyle T(N) = \sum_{n = 2}^N S(n)$.</p> <p>You are given that $T(10) = 2.38235282$ rounded to 8 digits after the decimal point.</p> <p>Find $T(10^{14})$, rounded to 8 digits after the decimal point.</p>
32.34481054
Sunday, 15th January 2023, 07:00 am
167
60%
hard
699
Triffle Numbers
Let $\sigma(n)$ be the sum of all the divisors of the positive integer $n$, for example: $\sigma(10) = 1+2+5+10 = 18$. Define $T(N)$ to be the sum of all numbers $n \le N$ such that when the fraction $\frac{\sigma(n)}{n}$ is written in its lowest form $\frac ab$, the denominator is a power of 3 i.e. $b = 3^k, k > 0$. You are given $T(100) = 270$ and $T(10^6) = 26089287$. Find $T(10^{14})$.
Let $\sigma(n)$ be the sum of all the divisors of the positive integer $n$, for example: $\sigma(10) = 1+2+5+10 = 18$. Define $T(N)$ to be the sum of all numbers $n \le N$ such that when the fraction $\frac{\sigma(n)}{n}$ is written in its lowest form $\frac ab$, the denominator is a power of 3 i.e. $b = 3^k, k > 0$. You are given $T(100) = 270$ and $T(10^6) = 26089287$. Find $T(10^{14})$.
<p> Let $\sigma(n)$ be the sum of all the divisors of the positive integer $n$, for example:<br> $\sigma(10) = 1+2+5+10 = 18$. </br></p> <p> Define $T(N)$ to be the sum of all numbers $n \le N$ such that when the fraction $\frac{\sigma(n)}{n}$ is written in its lowest form $\frac ab$, the denominator is a power of 3 i.e. $b = 3^k, k &gt; 0$. </p> <p> You are given $T(100) = 270$ and $T(10^6) = 26089287$. </p> <p> Find $T(10^{14})$. </p>
37010438774467572
Sunday, 26th January 2020, 10:00 am
209
80%
hard
460
An Ant on the Move
On the Euclidean plane, an ant travels from point $A(0, 1)$ to point $B(d, 1)$ for an integer $d$. In each step, the ant at point $(x_0, y_0)$ chooses one of the lattice points $(x_1, y_1)$ which satisfy $x_1 \ge 0$ and $y_1 \ge 1$ and goes straight to $(x_1, y_1)$ at a constant velocity $v$. The value of $v$ depends on $y_0$ and $y_1$ as follows: If $y_0 = y_1$, the value of $v$ equals $y_0$. If $y_0 \ne y_1$, the value of $v$ equals $(y_1 - y_0) / (\ln(y_1) - \ln(y_0))$. The left image is one of the possible paths for $d = 4$. First the ant goes from $A(0, 1)$ to $P_1(1, 3)$ at velocity $(3 - 1) / (\ln(3) - \ln(1)) \approx 1.8205$. Then the required time is $\sqrt 5 / 1.8205 \approx 1.2283$. From $P_1(1, 3)$ to $P_2(3, 3)$ the ant travels at velocity $3$ so the required time is $2 / 3 \approx 0.6667$. From $P_2(3, 3)$ to $B(4, 1)$ the ant travels at velocity $(1 - 3) / (\ln(1) - \ln(3)) \approx 1.8205$ so the required time is $\sqrt 5 / 1.8205 \approx 1.2283$. Thus the total required time is $1.2283 + 0.6667 + 1.2283 = 3.1233$. The right image is another path. The total required time is calculated as $0.98026 + 1 + 0.98026 = 2.96052$. It can be shown that this is the quickest path for $d = 4$. Let $F(d)$ be the total required time if the ant chooses the quickest path. For example, $F(4) \approx 2.960516287$. We can verify that $F(10) \approx 4.668187834$ and $F(100) \approx 9.217221972$. Find $F(10000)$. Give your answer rounded to nine decimal places.
On the Euclidean plane, an ant travels from point $A(0, 1)$ to point $B(d, 1)$ for an integer $d$. In each step, the ant at point $(x_0, y_0)$ chooses one of the lattice points $(x_1, y_1)$ which satisfy $x_1 \ge 0$ and $y_1 \ge 1$ and goes straight to $(x_1, y_1)$ at a constant velocity $v$. The value of $v$ depends on $y_0$ and $y_1$ as follows: If $y_0 = y_1$, the value of $v$ equals $y_0$. If $y_0 \ne y_1$, the value of $v$ equals $(y_1 - y_0) / (\ln(y_1) - \ln(y_0))$. The left image is one of the possible paths for $d = 4$. First the ant goes from $A(0, 1)$ to $P_1(1, 3)$ at velocity $(3 - 1) / (\ln(3) - \ln(1)) \approx 1.8205$. Then the required time is $\sqrt 5 / 1.8205 \approx 1.2283$. From $P_1(1, 3)$ to $P_2(3, 3)$ the ant travels at velocity $3$ so the required time is $2 / 3 \approx 0.6667$. From $P_2(3, 3)$ to $B(4, 1)$ the ant travels at velocity $(1 - 3) / (\ln(1) - \ln(3)) \approx 1.8205$ so the required time is $\sqrt 5 / 1.8205 \approx 1.2283$. Thus the total required time is $1.2283 + 0.6667 + 1.2283 = 3.1233$. The right image is another path. The total required time is calculated as $0.98026 + 1 + 0.98026 = 2.96052$. It can be shown that this is the quickest path for $d = 4$. Let $F(d)$ be the total required time if the ant chooses the quickest path. For example, $F(4) \approx 2.960516287$. We can verify that $F(10) \approx 4.668187834$ and $F(100) \approx 9.217221972$. Find $F(10000)$. Give your answer rounded to nine decimal places.
<p> On the Euclidean plane, an ant travels from point $A(0, 1)$ to point $B(d, 1)$ for an integer $d$. </p> <p> In each step, the ant at point $(x_0, y_0)$ chooses one of the lattice points $(x_1, y_1)$ which satisfy $x_1 \ge 0$ and $y_1 \ge 1$ and goes straight to $(x_1, y_1)$ at a constant velocity $v$. The value of $v$ depends on $y_0$ and $y_1$ as follows: </p><ul><li> If $y_0 = y_1$, the value of $v$ equals $y_0$.</li> <li> If $y_0 \ne y_1$, the value of $v$ equals $(y_1 - y_0) / (\ln(y_1) - \ln(y_0))$.</li> </ul><p> The left image is one of the possible paths for $d = 4$. First the ant goes from $A(0, 1)$ to $P_1(1, 3)$ at velocity $(3 - 1) / (\ln(3) - \ln(1)) \approx 1.8205$. Then the required time is $\sqrt 5 / 1.8205 \approx 1.2283$.<br/> From $P_1(1, 3)$ to $P_2(3, 3)$ the ant travels at velocity $3$ so the required time is $2 / 3 \approx 0.6667$. From $P_2(3, 3)$ to $B(4, 1)$ the ant travels at velocity $(1 - 3) / (\ln(1) - \ln(3)) \approx 1.8205$ so the required time is $\sqrt 5 / 1.8205 \approx 1.2283$.<br/> Thus the total required time is $1.2283 + 0.6667 + 1.2283 = 3.1233$. </p> <p> The right image is another path. The total required time is calculated as $0.98026 + 1 + 0.98026 = 2.96052$. It can be shown that this is the quickest path for $d = 4$. </p> <p align="center"><img alt="0460_ant.jpg" src="resources/images/0460_ant.jpg?1678992054"/></p> <p> Let $F(d)$ be the total required time if the ant chooses the quickest path. For example, $F(4) \approx 2.960516287$.<br/> We can verify that $F(10) \approx 4.668187834$ and $F(100) \approx 9.217221972$. </p> <p> Find $F(10000)$. Give your answer rounded to nine decimal places. </p>
18.420738199
Saturday, 22nd February 2014, 01:00 pm
358
60%
hard
573
Unfair Race
$n$ runners in very different training states want to compete in a race. Each one of them is given a different starting number $k$ $(1\leq k \leq n)$ according to the runner's (constant) individual racing speed being $v_k=\frac{k}{n}$. In order to give the slower runners a chance to win the race, $n$ different starting positions are chosen randomly (with uniform distribution) and independently from each other within the racing track of length $1$. After this, the starting position nearest to the goal is assigned to runner $1$, the next nearest starting position to runner $2$ and so on, until finally the starting position furthest away from the goal is assigned to runner $n$. The winner of the race is the runner who reaches the goal first. Interestingly, the expected running time for the winner is $\frac{1}{2}$, independently of the number of runners. Moreover, while it can be shown that all runners will have the same expected running time of $\frac{n}{n+1}$, the race is still unfair, since the winning chances may differ significantly for different starting numbers: Let $P_{n,k}$ be the probability for runner $k$ to win a race with $n$ runners and $E_n = \sum_{k=1}^n k P_{n,k}$ be the expected starting number of the winner in that race. It can be shown that, for example, $P_{3,1}=\frac{4}{9}$, $P_{3,2}=\frac{2}{9}$, $P_{3,3}=\frac{1}{3}$ and $E_3=\frac{17}{9}$ for a race with $3$ runners. You are given that $E_4=2.21875$, $E_5=2.5104$ and $E_{10}=3.66021568$. Find $E_{1000000}$ rounded to $4$ digits after the decimal point.
$n$ runners in very different training states want to compete in a race. Each one of them is given a different starting number $k$ $(1\leq k \leq n)$ according to the runner's (constant) individual racing speed being $v_k=\frac{k}{n}$. In order to give the slower runners a chance to win the race, $n$ different starting positions are chosen randomly (with uniform distribution) and independently from each other within the racing track of length $1$. After this, the starting position nearest to the goal is assigned to runner $1$, the next nearest starting position to runner $2$ and so on, until finally the starting position furthest away from the goal is assigned to runner $n$. The winner of the race is the runner who reaches the goal first. Interestingly, the expected running time for the winner is $\frac{1}{2}$, independently of the number of runners. Moreover, while it can be shown that all runners will have the same expected running time of $\frac{n}{n+1}$, the race is still unfair, since the winning chances may differ significantly for different starting numbers: Let $P_{n,k}$ be the probability for runner $k$ to win a race with $n$ runners and $E_n = \sum_{k=1}^n k P_{n,k}$ be the expected starting number of the winner in that race. It can be shown that, for example, $P_{3,1}=\frac{4}{9}$, $P_{3,2}=\frac{2}{9}$, $P_{3,3}=\frac{1}{3}$ and $E_3=\frac{17}{9}$ for a race with $3$ runners. You are given that $E_4=2.21875$, $E_5=2.5104$ and $E_{10}=3.66021568$. Find $E_{1000000}$ rounded to $4$ digits after the decimal point.
<p>$n$ runners in very different training states want to compete in a race. Each one of them is given a different starting number $k$ $(1\leq k \leq n)$ according to the runner's (constant) individual racing speed being $v_k=\frac{k}{n}$.<br/> In order to give the slower runners a chance to win the race, $n$ different starting positions are chosen randomly (with uniform distribution) and independently from each other within the racing track of length $1$. After this, the starting position nearest to the goal is assigned to runner $1$, the next nearest starting position to runner $2$ and so on, until finally the starting position furthest away from the goal is assigned to runner $n$. The winner of the race is the runner who reaches the goal first.</p> <p>Interestingly, the expected running time for the winner is $\frac{1}{2}$, independently of the number of runners. Moreover, while it can be shown that all runners will have the same expected running time of $\frac{n}{n+1}$, the race is still unfair, since the winning chances may differ significantly for different starting numbers:</p> <p>Let $P_{n,k}$ be the probability for runner $k$ to win a race with $n$ runners and $E_n = \sum_{k=1}^n k P_{n,k}$ be the expected starting number of the winner in that race. It can be shown that, for example, $P_{3,1}=\frac{4}{9}$, $P_{3,2}=\frac{2}{9}$, $P_{3,3}=\frac{1}{3}$ and $E_3=\frac{17}{9}$ for a race with $3$ runners. <br/> You are given that $E_4=2.21875$, $E_5=2.5104$ and $E_{10}=3.66021568$.</p> <p>Find $E_{1000000}$ rounded to $4$ digits after the decimal point.</p>
1252.9809
Sunday, 9th October 2016, 07:00 am
232
80%
hard
651
Patterned Cylinders
An infinitely long cylinder has its curved surface fully covered with different coloured but otherwise identical rectangular stickers, without overlapping. The stickers are aligned with the cylinder, so two of their edges are parallel with the cylinder's axis, with four stickers meeting at each corner. Let $a>0$ and suppose that the colouring is periodic along the cylinder, with the pattern repeating every $a$ stickers. (The period is allowed to be any divisor of $a$.) Let $b$ be the number of stickers that fit round the circumference of the cylinder. Let $f(m, a, b)$ be the number of different such periodic patterns that use exactly $m$ distinct colours of stickers. Translations along the axis, reflections in any plane, rotations in any axis, (or combinations of such operations) applied to a pattern are to be counted as the same as the original pattern. You are given that $f(2, 2, 3) = 11$, $f(3, 2, 3) = 56$, and $f(2, 3, 4) = 156$. Furthermore, $f(8, 13, 21) \equiv 49718354 \pmod{1\,000\,000\,007}$, and $f(13, 144, 233) \equiv 907081451 \pmod{1\,000\,000\,007}$. Find $\sum_{i=4}^{40} f(i, F_{i-1}, F_i) \bmod 1\,000\,000\,007$, where $F_i$ are the Fibonacci numbers starting at $F_0=0$, $F_1=1$.
An infinitely long cylinder has its curved surface fully covered with different coloured but otherwise identical rectangular stickers, without overlapping. The stickers are aligned with the cylinder, so two of their edges are parallel with the cylinder's axis, with four stickers meeting at each corner. Let $a>0$ and suppose that the colouring is periodic along the cylinder, with the pattern repeating every $a$ stickers. (The period is allowed to be any divisor of $a$.) Let $b$ be the number of stickers that fit round the circumference of the cylinder. Let $f(m, a, b)$ be the number of different such periodic patterns that use exactly $m$ distinct colours of stickers. Translations along the axis, reflections in any plane, rotations in any axis, (or combinations of such operations) applied to a pattern are to be counted as the same as the original pattern. You are given that $f(2, 2, 3) = 11$, $f(3, 2, 3) = 56$, and $f(2, 3, 4) = 156$. Furthermore, $f(8, 13, 21) \equiv 49718354 \pmod{1\,000\,000\,007}$, and $f(13, 144, 233) \equiv 907081451 \pmod{1\,000\,000\,007}$. Find $\sum_{i=4}^{40} f(i, F_{i-1}, F_i) \bmod 1\,000\,000\,007$, where $F_i$ are the Fibonacci numbers starting at $F_0=0$, $F_1=1$.
<p>An infinitely long cylinder has its curved surface fully covered with different coloured but otherwise identical rectangular stickers, without overlapping. The stickers are aligned with the cylinder, so two of their edges are parallel with the cylinder's axis, with four stickers meeting at each corner.</p> <p>Let $a&gt;0$ and suppose that the colouring is periodic along the cylinder, with the pattern repeating every $a$ stickers. (The period is allowed to be any divisor of $a$.) Let $b$ be the number of stickers that fit round the circumference of the cylinder.</p> <p>Let $f(m, a, b)$ be the number of different such periodic patterns that use <i>exactly</i> $m$ distinct colours of stickers. Translations along the axis, reflections in any plane, rotations in any axis, (or combinations of such operations) applied to a pattern are to be counted as the same as the original pattern.</p> <p>You are given that $f(2, 2, 3) = 11$, $f(3, 2, 3) = 56$, and $f(2, 3, 4) = 156$. Furthermore, $f(8, 13, 21) \equiv 49718354 \pmod{1\,000\,000\,007}$, and $f(13, 144, 233) \equiv 907081451 \pmod{1\,000\,000\,007}$.</p> <p>Find $\sum_{i=4}^{40} f(i, F_{i-1}, F_i) \bmod 1\,000\,000\,007$, where $F_i$ are the Fibonacci numbers starting at $F_0=0$, $F_1=1$.</p>
448233151
Saturday, 12th January 2019, 07:00 pm
188
70%
hard
214
Totient Chains
Let $\phi$ be Euler's totient function, i.e. for a natural number $n$, $\phi(n)$ is the number of $k$, $1 \le k \le n$, for which $\gcd(k, n) = 1$. By iterating $\phi$, each positive integer generates a decreasing chain of numbers ending in $1$. E.g. if we start with $5$ the sequence $5,4,2,1$ is generated. Here is a listing of all chains with length $4$: \begin{align} 5,4,2,1&\\ 7,6,2,1&\\ 8,4,2,1&\\ 9,6,2,1&\\ 10,4,2,1&\\ 12,4,2,1&\\ 14,6,2,1&\\ 18,6,2,1 \end{align} Only two of these chains start with a prime, their sum is $12$. What is the sum of all primes less than $40000000$ which generate a chain of length $25$?
Let $\phi$ be Euler's totient function, i.e. for a natural number $n$, $\phi(n)$ is the number of $k$, $1 \le k \le n$, for which $\gcd(k, n) = 1$. By iterating $\phi$, each positive integer generates a decreasing chain of numbers ending in $1$. E.g. if we start with $5$ the sequence $5,4,2,1$ is generated. Here is a listing of all chains with length $4$: \begin{align} 5,4,2,1&\\ 7,6,2,1&\\ 8,4,2,1&\\ 9,6,2,1&\\ 10,4,2,1&\\ 12,4,2,1&\\ 14,6,2,1&\\ 18,6,2,1 \end{align} Only two of these chains start with a prime, their sum is $12$. What is the sum of all primes less than $40000000$ which generate a chain of length $25$?
<p>Let $\phi$ be Euler's totient function, i.e. for a natural number $n$, $\phi(n)$ is the number of $k$, $1 \le k \le n$, for which $\gcd(k, n) = 1$.</p> <p>By iterating $\phi$, each positive integer generates a decreasing chain of numbers ending in $1$.<br/> E.g. if we start with $5$ the sequence $5,4,2,1$ is generated.<br/> Here is a listing of all chains with length $4$:</p> \begin{align} 5,4,2,1&\\ 7,6,2,1&\\ 8,4,2,1&\\ 9,6,2,1&\\ 10,4,2,1&\\ 12,4,2,1&\\ 14,6,2,1&\\ 18,6,2,1 \end{align} <p>Only two of these chains start with a prime, their sum is $12$.</p> <p>What is the sum of all primes less than $40000000$ which generate a chain of length $25$?</p>
1677366278943
Saturday, 25th October 2008, 02:00 pm
5717
40%
medium
481
Chef Showdown
A group of chefs (numbered #$1$, #$2$, etc) participate in a turn-based strategic cooking competition. On each chef's turn, he/she cooks up a dish to the best of his/her ability and gives it to a separate panel of judges for taste-testing. Let $S(k)$ represent chef #$k$'s skill level (which is publicly known). More specifically, $S(k)$ is the probability that chef #$k$'s dish will be assessed favorably by the judges (on any/all turns). If the dish receives a favorable rating, then the chef must choose one other chef to be eliminated from the competition. The last chef remaining in the competition is the winner. The game always begins with chef #$1$, with the turn order iterating sequentially over the rest of the chefs still in play. Then the cycle repeats from the lowest-numbered chef. All chefs aim to optimize their chances of winning within the rules as stated, assuming that the other chefs behave in the same manner. In the event that a chef has more than one equally-optimal elimination choice, assume that the chosen chef is always the one with the next-closest turn. Define $W_n(k)$ as the probability that chef #$k$ wins in a competition with $n$ chefs. If we have $S(1) = 0.25$, $S(2) = 0.5$, and $S(3) = 1$, then $W_3(1) = 0.29375$. Going forward, we assign $S(k) = F_k/F_{n+1}$ over all $1 \le k \le n$, where $F_k$ is a Fibonacci number: $F_k = F_{k-1} + F_{k-2}$ with base cases $F_1 = F_2 = 1$. Then, for example, when considering a competition with $n = 7$ chefs, we have $W_7(1) = 0.08965042$, $W_7(2) = 0.20775702$, $W_7(3) = 0.15291406$, $W_7(4) = 0.14554098$, $W_7(5) = 0.15905291$, $W_7(6) = 0.10261412$, and $W_7(7) = 0.14247050$, rounded to $8$ decimal places each. Let $E(n)$ represent the expected number of dishes cooked in a competition with $n$ chefs. For instance, $E(7) = 42.28176050$. Find $E(14)$ rounded to $8$ decimal places.
A group of chefs (numbered #$1$, #$2$, etc) participate in a turn-based strategic cooking competition. On each chef's turn, he/she cooks up a dish to the best of his/her ability and gives it to a separate panel of judges for taste-testing. Let $S(k)$ represent chef #$k$'s skill level (which is publicly known). More specifically, $S(k)$ is the probability that chef #$k$'s dish will be assessed favorably by the judges (on any/all turns). If the dish receives a favorable rating, then the chef must choose one other chef to be eliminated from the competition. The last chef remaining in the competition is the winner. The game always begins with chef #$1$, with the turn order iterating sequentially over the rest of the chefs still in play. Then the cycle repeats from the lowest-numbered chef. All chefs aim to optimize their chances of winning within the rules as stated, assuming that the other chefs behave in the same manner. In the event that a chef has more than one equally-optimal elimination choice, assume that the chosen chef is always the one with the next-closest turn. Define $W_n(k)$ as the probability that chef #$k$ wins in a competition with $n$ chefs. If we have $S(1) = 0.25$, $S(2) = 0.5$, and $S(3) = 1$, then $W_3(1) = 0.29375$. Going forward, we assign $S(k) = F_k/F_{n+1}$ over all $1 \le k \le n$, where $F_k$ is a Fibonacci number: $F_k = F_{k-1} + F_{k-2}$ with base cases $F_1 = F_2 = 1$. Then, for example, when considering a competition with $n = 7$ chefs, we have $W_7(1) = 0.08965042$, $W_7(2) = 0.20775702$, $W_7(3) = 0.15291406$, $W_7(4) = 0.14554098$, $W_7(5) = 0.15905291$, $W_7(6) = 0.10261412$, and $W_7(7) = 0.14247050$, rounded to $8$ decimal places each. Let $E(n)$ represent the expected number of dishes cooked in a competition with $n$ chefs. For instance, $E(7) = 42.28176050$. Find $E(14)$ rounded to $8$ decimal places.
<p>A group of chefs (numbered #$1$, #$2$, etc) participate in a turn-based strategic cooking competition. On each chef's turn, he/she cooks up a dish to the best of his/her ability and gives it to a separate panel of judges for taste-testing. Let $S(k)$ represent chef #$k$'s skill level (which is publicly known). More specifically, $S(k)$ is the probability that chef #$k$'s dish will be assessed favorably by the judges (on any/all turns). If the dish receives a favorable rating, then the chef must choose one other chef to be eliminated from the competition. The last chef remaining in the competition is the winner.</p> <p>The game always begins with chef #$1$, with the turn order iterating sequentially over the rest of the chefs still in play. Then the cycle repeats from the lowest-numbered chef. All chefs aim to optimize their chances of winning within the rules as stated, assuming that the other chefs behave in the same manner. In the event that a chef has more than one equally-optimal elimination choice, assume that the chosen chef is always the one with the next-closest turn.</p> <p>Define $W_n(k)$ as the probability that chef #$k$ wins in a competition with $n$ chefs. If we have $S(1) = 0.25$, $S(2) = 0.5$, and $S(3) = 1$, then $W_3(1) = 0.29375$.</p> <p>Going forward, we assign $S(k) = F_k/F_{n+1}$ over all $1 \le k \le n$, where $F_k$ is a Fibonacci number: $F_k = F_{k-1} + F_{k-2}$ with base cases $F_1 = F_2 = 1$. Then, for example, when considering a competition with $n = 7$ chefs, we have $W_7(1) = 0.08965042$, $W_7(2) = 0.20775702$, $W_7(3) = 0.15291406$, $W_7(4) = 0.14554098$, $W_7(5) = 0.15905291$, $W_7(6) = 0.10261412$, and $W_7(7) = 0.14247050$, rounded to $8$ decimal places each.</p> <p>Let $E(n)$ represent the expected number of dishes cooked in a competition with $n$ chefs. For instance, $E(7) = 42.28176050$.</p> <p>Find $E(14)$ rounded to $8$ decimal places.</p>
729.12106947
Sunday, 21st September 2014, 04:00 am
280
70%
hard
126
Cuboid Layers
The minimum number of cubes to cover every visible face on a cuboid measuring $3 \times 2 \times 1$ is twenty-two. If we then add a second layer to this solid it would require forty-six cubes to cover every visible face, the third layer would require seventy-eight cubes, and the fourth layer would require one-hundred and eighteen cubes to cover every visible face. However, the first layer on a cuboid measuring $5 \times 1 \times 1$ also requires twenty-two cubes; similarly the first layer on cuboids measuring $5 \times 3 \times 1$, $7 \times 2 \times 1$, and $11 \times 1 \times 1$ all contain forty-six cubes. We shall define $C(n)$ to represent the number of cuboids that contain $n$ cubes in one of its layers. So $C(22) = 2$, $C(46) = 4$, $C(78) = 5$, and $C(118) = 8$. It turns out that $154$ is the least value of $n$ for which $C(n) = 10$. Find the least value of $n$ for which $C(n) = 1000$.
The minimum number of cubes to cover every visible face on a cuboid measuring $3 \times 2 \times 1$ is twenty-two. If we then add a second layer to this solid it would require forty-six cubes to cover every visible face, the third layer would require seventy-eight cubes, and the fourth layer would require one-hundred and eighteen cubes to cover every visible face. However, the first layer on a cuboid measuring $5 \times 1 \times 1$ also requires twenty-two cubes; similarly the first layer on cuboids measuring $5 \times 3 \times 1$, $7 \times 2 \times 1$, and $11 \times 1 \times 1$ all contain forty-six cubes. We shall define $C(n)$ to represent the number of cuboids that contain $n$ cubes in one of its layers. So $C(22) = 2$, $C(46) = 4$, $C(78) = 5$, and $C(118) = 8$. It turns out that $154$ is the least value of $n$ for which $C(n) = 10$. Find the least value of $n$ for which $C(n) = 1000$.
<p>The minimum number of cubes to cover every visible face on a cuboid measuring $3 \times 2 \times 1$ is twenty-two.</p> <div class="center"> <img alt="" class="dark_img" src="resources/images/0126.png?1678992052"/><br/></div> <p>If we then add a second layer to this solid it would require forty-six cubes to cover every visible face, the third layer would require seventy-eight cubes, and the fourth layer would require one-hundred and eighteen cubes to cover every visible face.</p> <p>However, the first layer on a cuboid measuring $5 \times 1 \times 1$ also requires twenty-two cubes; similarly the first layer on cuboids measuring $5 \times 3 \times 1$, $7 \times 2 \times 1$, and $11 \times 1 \times 1$ all contain forty-six cubes.</p> <p>We shall define $C(n)$ to represent the number of cuboids that contain $n$ cubes in one of its layers. So $C(22) = 2$, $C(46) = 4$, $C(78) = 5$, and $C(118) = 8$.</p> <p>It turns out that $154$ is the least value of $n$ for which $C(n) = 10$.</p> <p>Find the least value of $n$ for which $C(n) = 1000$.</p>
18522
Friday, 18th August 2006, 06:00 pm
5374
55%
medium
840
Sum of Products
A partition of $n$ is a set of positive integers for which the sum equals $n$. The partitions of 5 are: $\{5\},\{1,4\},\{2,3\},\{1,1,3\},\{1,2,2\},\{1,1,1,2\}$ and $\{1,1,1,1,1\}$. Further we define the function $D(p)$ as: $$ \begin{align} \begin{split} D(1) &= 1 \\ D(p) &= 1, \text{ for any prime } p \\ D(pq) &= D(p)q + pD(q), \text{ for any positive integers } p,q \gt 1. \end{split} \end{align} $$ Now let $\{a_1, a_2,\ldots,a_k\}$ be a partition of $n$. We assign to this particular partition the value: $$P=\prod_{j=1}^{k}D(a_j). $$ $G(n)$ is the sum of $P$ for all partitions of $n$. We can verify that $G(10) = 164$. We also define: $$S(N)=\sum_{n=1}^{N}G(n).$$ You are given $S(10)=396$. Find $S(5\times 10^4) \mod 999676999$.
A partition of $n$ is a set of positive integers for which the sum equals $n$. The partitions of 5 are: $\{5\},\{1,4\},\{2,3\},\{1,1,3\},\{1,2,2\},\{1,1,1,2\}$ and $\{1,1,1,1,1\}$. Further we define the function $D(p)$ as: $$ \begin{align} \begin{split} D(1) &= 1 \\ D(p) &= 1, \text{ for any prime } p \\ D(pq) &= D(p)q + pD(q), \text{ for any positive integers } p,q \gt 1. \end{split} \end{align} $$ Now let $\{a_1, a_2,\ldots,a_k\}$ be a partition of $n$. We assign to this particular partition the value: $$P=\prod_{j=1}^{k}D(a_j). $$ $G(n)$ is the sum of $P$ for all partitions of $n$. We can verify that $G(10) = 164$. We also define: $$S(N)=\sum_{n=1}^{N}G(n).$$ You are given $S(10)=396$. Find $S(5\times 10^4) \mod 999676999$.
<p>A <strong>partition</strong> of $n$ is a set of positive integers for which the sum equals $n$.<br/> The partitions of 5 are:<br/> $\{5\},\{1,4\},\{2,3\},\{1,1,3\},\{1,2,2\},\{1,1,1,2\}$ and $\{1,1,1,1,1\}$. </p> <p> Further we define the function $D(p)$ as:<br/> $$ \begin{align} \begin{split} D(1) &amp;= 1 \\ D(p) &amp;= 1, \text{ for any prime } p \\ D(pq) &amp;= D(p)q + pD(q), \text{ for any positive integers } p,q \gt 1. \end{split} \end{align} $$ </p> <p> Now let $\{a_1, a_2,\ldots,a_k\}$ be a partition of $n$.<br/> We assign to this particular partition the value:<br/> $$P=\prod_{j=1}^{k}D(a_j). $$ </p> <p> $G(n)$ is the sum of $P$ for all partitions of $n$.<br/> We can verify that $G(10) = 164$. </p> We also define: $$S(N)=\sum_{n=1}^{N}G(n).$$ You are given $S(10)=396$.<br/> Find $S(5\times 10^4) \mod 999676999$.
194396971
Sunday, 23rd April 2023, 02:00 am
400
25%
easy
236
Luxury Hampers
Suppliers 'A' and 'B' provided the following numbers of products for the luxury hamper market: Product'A''B'Beluga Caviar5248640Christmas Cake13121888Gammon Joint26243776Vintage Port57603776Champagne Truffles39365664 Although the suppliers try very hard to ship their goods in perfect condition, there is inevitably some spoilage - i.e. products gone bad. The suppliers compare their performance using two types of statistic:The five per-product spoilage rates for each supplier are equal to the number of products gone bad divided by the number of products supplied, for each of the five products in turn. The overall spoilage rate for each supplier is equal to the total number of products gone bad divided by the total number of products provided by that supplier.To their surprise, the suppliers found that each of the five per-product spoilage rates was worse (higher) for 'B' than for 'A' by the same factor (ratio of spoilage rates), m>1; and yet, paradoxically, the overall spoilage rate was worse for 'A' than for 'B', also by a factor of m. There are thirty-five m>1 for which this surprising result could have occurred, the smallest of which is 1476/1475. What's the largest possible value of m? Give your answer as a fraction reduced to its lowest terms, in the form u/v.
Suppliers 'A' and 'B' provided the following numbers of products for the luxury hamper market: Product'A''B'Beluga Caviar5248640Christmas Cake13121888Gammon Joint26243776Vintage Port57603776Champagne Truffles39365664 Although the suppliers try very hard to ship their goods in perfect condition, there is inevitably some spoilage - i.e. products gone bad. The suppliers compare their performance using two types of statistic:The five per-product spoilage rates for each supplier are equal to the number of products gone bad divided by the number of products supplied, for each of the five products in turn. The overall spoilage rate for each supplier is equal to the total number of products gone bad divided by the total number of products provided by that supplier.To their surprise, the suppliers found that each of the five per-product spoilage rates was worse (higher) for 'B' than for 'A' by the same factor (ratio of spoilage rates), m>1; and yet, paradoxically, the overall spoilage rate was worse for 'A' than for 'B', also by a factor of m. There are thirty-five m>1 for which this surprising result could have occurred, the smallest of which is 1476/1475. What's the largest possible value of m? Give your answer as a fraction reduced to its lowest terms, in the form u/v.
<p>Suppliers 'A' and 'B' provided the following numbers of products for the luxury hamper market:</p> <p></p><center><table class="p236"><tr><th>Product</th><th class="center">'A'</th><th class="center">'B'</th></tr><tr><td>Beluga Caviar</td><td>5248</td><td>640</td></tr><tr><td>Christmas Cake</td><td>1312</td><td>1888</td></tr><tr><td>Gammon Joint</td><td>2624</td><td>3776</td></tr><tr><td>Vintage Port</td><td>5760</td><td>3776</td></tr><tr><td>Champagne Truffles</td><td>3936</td><td>5664</td></tr></table></center> <p>Although the suppliers try very hard to ship their goods in perfect condition, there is inevitably some spoilage - <i>i.e.</i> products gone bad.</p> <p>The suppliers compare their performance using two types of statistic:</p><ul><li>The five <i>per-product spoilage rates</i> for each supplier are equal to the number of products gone bad divided by the number of products supplied, for each of the five products in turn.</li> <li>The <i>overall spoilage rate</i> for each supplier is equal to the total number of products gone bad divided by the total number of products provided by that supplier.</li></ul><p>To their surprise, the suppliers found that each of the five per-product spoilage rates was worse (higher) for 'B' than for 'A' by the same factor (ratio of spoilage rates), <var>m</var>&gt;1; and yet, paradoxically, the overall spoilage rate was worse for 'A' than for 'B', also by a factor of <var>m</var>.</p> <p>There are thirty-five <var>m</var>&gt;1 for which this surprising result could have occurred, the smallest of which is 1476/1475.</p> <p>What's the largest possible value of <var>m</var>?<br> Give your answer as a fraction reduced to its lowest terms, in the form <var>u</var>/<var>v</var>.</br></p>
123/59
Saturday, 14th March 2009, 09:00 am
1054
80%
hard
281
Pizza Toppings
You are given a pizza (perfect circle) that has been cut into $m \cdot n$ equal pieces and you want to have exactly one topping on each slice. Let $f(m, n)$ denote the number of ways you can have toppings on the pizza with $m$ different toppings ($m \ge 2$), using each topping on exactly $n$ slices ($n \ge 1$).Reflections are considered distinct, rotations are not. Thus, for instance, $f(2,1) = 1$, $f(2, 2) = f(3, 1) = 2$ and $f(3, 2) = 16$. $f(3, 2)$ is shown below: Find the sum of all $f(m, n)$ such that $f(m, n) \le 10^{15}$.
You are given a pizza (perfect circle) that has been cut into $m \cdot n$ equal pieces and you want to have exactly one topping on each slice. Let $f(m, n)$ denote the number of ways you can have toppings on the pizza with $m$ different toppings ($m \ge 2$), using each topping on exactly $n$ slices ($n \ge 1$).Reflections are considered distinct, rotations are not. Thus, for instance, $f(2,1) = 1$, $f(2, 2) = f(3, 1) = 2$ and $f(3, 2) = 16$. $f(3, 2)$ is shown below: Find the sum of all $f(m, n)$ such that $f(m, n) \le 10^{15}$.
<p>You are given a pizza (perfect circle) that has been cut into $m \cdot n$ equal pieces and you want to have exactly one topping on each slice.</p> <p>Let $f(m, n)$ denote the number of ways you can have toppings on the pizza with $m$ different toppings ($m \ge 2$), using each topping on exactly $n$ slices ($n \ge 1$).<br/>Reflections are considered distinct, rotations are not. </p> <p>Thus, for instance, $f(2,1) = 1$, $f(2, 2) = f(3, 1) = 2$ and $f(3, 2) = 16$. <br/>$f(3, 2)$ is shown below:</p> <div align="center"><img alt="0281_pizza.gif" class="dark_img" src="resources/images/0281_pizza.gif?1678992056"/></div> <p>Find the sum of all $f(m, n)$ such that $f(m, n) \le 10^{15}$.</p>
1485776387445623
Friday, 5th March 2010, 01:00 pm
1109
55%
medium
154
Exploring Pascal's Pyramid
A triangular pyramid is constructed using spherical balls so that each ball rests on exactly three balls of the next lower level. Then, we calculate the number of paths leading from the apex to each position: A path starts at the apex and progresses downwards to any of the three spheres directly below the current position. Consequently, the number of paths to reach a certain position is the sum of the numbers immediately above it (depending on the position, there are up to three numbers above it). The result is Pascal's pyramid and the numbers at each level $n$ are the coefficients of the trinomial expansion $(x + y + z)^n$. How many coefficients in the expansion of $(x + y + z)^{200000}$ are multiples of $10^{12}$?
A triangular pyramid is constructed using spherical balls so that each ball rests on exactly three balls of the next lower level. Then, we calculate the number of paths leading from the apex to each position: A path starts at the apex and progresses downwards to any of the three spheres directly below the current position. Consequently, the number of paths to reach a certain position is the sum of the numbers immediately above it (depending on the position, there are up to three numbers above it). The result is Pascal's pyramid and the numbers at each level $n$ are the coefficients of the trinomial expansion $(x + y + z)^n$. How many coefficients in the expansion of $(x + y + z)^{200000}$ are multiples of $10^{12}$?
<p>A triangular pyramid is constructed using spherical balls so that each ball rests on exactly three balls of the next lower level.</p> <div class="center"><img alt="" class="dark_img" src="resources/images/0154_pyramid.png?1678992052"/></div> <p>Then, we calculate the number of paths leading from the apex to each position:</p> <p>A path starts at the apex and progresses downwards to any of the three spheres directly below the current position.</p> <p>Consequently, the number of paths to reach a certain position is the sum of the numbers immediately above it (depending on the position, there are up to three numbers above it).</p> <p>The result is <strong>Pascal's pyramid</strong> and the numbers at each level $n$ are the coefficients of the trinomial expansion $(x + y + z)^n$.</p> <p>How many coefficients in the expansion of $(x + y + z)^{200000}$ are multiples of $10^{12}$?</p>
479742450
Saturday, 12th May 2007, 06:00 am
2975
65%
hard
848
Guessing with Sets
Two players play a game. At the start of the game each player secretly chooses an integer; the first player from $1,...,n$ and the second player from $1,...,m$. Then they take alternate turns, starting with the first player. The player, whose turn it is, displays a set of numbers and the other player tells whether their secret number is in the set or not. The player to correctly guess a set with a single number is the winner and the game ends. Let $p(m,n)$ be the winning probability of the first player assuming both players play optimally. For example $p(1, n) = 1$ and $p(m, 1) = 1/m$. You are also given $p(7,5) \approx 0.51428571$. Find $\displaystyle \sum_{i=0}^{20}\sum_{j=0}^{20} p(7^i, 5^j)$ and give your answer rounded to 8 digits after the decimal point.
Two players play a game. At the start of the game each player secretly chooses an integer; the first player from $1,...,n$ and the second player from $1,...,m$. Then they take alternate turns, starting with the first player. The player, whose turn it is, displays a set of numbers and the other player tells whether their secret number is in the set or not. The player to correctly guess a set with a single number is the winner and the game ends. Let $p(m,n)$ be the winning probability of the first player assuming both players play optimally. For example $p(1, n) = 1$ and $p(m, 1) = 1/m$. You are also given $p(7,5) \approx 0.51428571$. Find $\displaystyle \sum_{i=0}^{20}\sum_{j=0}^{20} p(7^i, 5^j)$ and give your answer rounded to 8 digits after the decimal point.
<p>Two players play a game. At the start of the game each player secretly chooses an integer; the first player from $1,...,n$ and the second player from $1,...,m$. Then they take alternate turns, starting with the first player. The player, whose turn it is, displays a set of numbers and the other player tells whether their secret number is in the set or not. The player to correctly guess a set with a single number is the winner and the game ends.</p> <p>Let $p(m,n)$ be the winning probability of the first player assuming both players play optimally. For example $p(1, n) = 1$ and $p(m, 1) = 1/m$.</p> <p>You are also given $p(7,5) \approx 0.51428571$.</p> <p>Find $\displaystyle \sum_{i=0}^{20}\sum_{j=0}^{20} p(7^i, 5^j)$ and give your answer rounded to 8 digits after the decimal point.</p>
188.45503259
Sunday, 18th June 2023, 02:00 am
213
45%
medium
540
Counting Primitive Pythagorean Triples
A Pythagorean triple consists of three positive integers $a, b$ and $c$ satisfying $a^2+b^2=c^2$. The triple is called primitive if $a, b$ and $c$ are relatively prime. Let $P(n)$ be the number of primitive Pythagorean triples with $a \lt b \lt c \le n$. For example $P(20) = 3$, since there are three triples: $(3,4,5)$, $(5,12,13)$ and $(8,15,17)$. You are given that $P(10^6) = 159139$. Find $P(3141592653589793)$.
A Pythagorean triple consists of three positive integers $a, b$ and $c$ satisfying $a^2+b^2=c^2$. The triple is called primitive if $a, b$ and $c$ are relatively prime. Let $P(n)$ be the number of primitive Pythagorean triples with $a \lt b \lt c \le n$. For example $P(20) = 3$, since there are three triples: $(3,4,5)$, $(5,12,13)$ and $(8,15,17)$. You are given that $P(10^6) = 159139$. Find $P(3141592653589793)$.
<p> A <strong>Pythagorean triple</strong> consists of three positive integers $a, b$ and $c$ satisfying $a^2+b^2=c^2$.<br/> The triple is called primitive if $a, b$ and $c$ are relatively prime.<br/> Let $P(n)$ be the number of <strong>primitive Pythagorean triples</strong> with $a \lt b \lt c \le n$.<br/> For example $P(20) = 3$, since there are three triples: $(3,4,5)$, $(5,12,13)$ and $(8,15,17)$. </p> <p> You are given that $P(10^6) = 159139$.<br/> Find $P(3141592653589793)$. </p>
500000000002845
Sunday, 27th December 2015, 07:00 am
736
30%
easy
672
One More One
Consider the following process that can be applied recursively to any positive integer $n$: if $n = 1$ do nothing and the process stops, if $n$ is divisible by $7$ divide it by $7$, otherwise add $1$. Define $g(n)$ to be the number of $1$'s that must be added before the process ends. For example: $125\xrightarrow{\scriptsize{+1}} 126\xrightarrow{\scriptsize{\div 7}} 18\xrightarrow{\scriptsize{+1}} 19\xrightarrow{\scriptsize{+1}} 20\xrightarrow{\scriptsize{+1}} 21\xrightarrow{\scriptsize{\div 7}} 3\xrightarrow{\scriptsize{+1}} 4\xrightarrow{\scriptsize{+1}} 5\xrightarrow{\scriptsize{+1}} 6\xrightarrow{\scriptsize{+1}} 7\xrightarrow{\scriptsize{\div 7}} 1$. Eight $1$'s are added so $g(125) = 8$. Similarly $g(1000) = 9$ and $g(10000) = 21$. Define $S(N) = \sum_{n=1}^N g(n)$ and $H(K) = S\left(\frac{7^K-1}{11}\right)$. You are given $H(10) = 690409338$. Find $H(10^9)$ modulo $1\,117\,117\,717$.
Consider the following process that can be applied recursively to any positive integer $n$: if $n = 1$ do nothing and the process stops, if $n$ is divisible by $7$ divide it by $7$, otherwise add $1$. Define $g(n)$ to be the number of $1$'s that must be added before the process ends. For example: $125\xrightarrow{\scriptsize{+1}} 126\xrightarrow{\scriptsize{\div 7}} 18\xrightarrow{\scriptsize{+1}} 19\xrightarrow{\scriptsize{+1}} 20\xrightarrow{\scriptsize{+1}} 21\xrightarrow{\scriptsize{\div 7}} 3\xrightarrow{\scriptsize{+1}} 4\xrightarrow{\scriptsize{+1}} 5\xrightarrow{\scriptsize{+1}} 6\xrightarrow{\scriptsize{+1}} 7\xrightarrow{\scriptsize{\div 7}} 1$. Eight $1$'s are added so $g(125) = 8$. Similarly $g(1000) = 9$ and $g(10000) = 21$. Define $S(N) = \sum_{n=1}^N g(n)$ and $H(K) = S\left(\frac{7^K-1}{11}\right)$. You are given $H(10) = 690409338$. Find $H(10^9)$ modulo $1\,117\,117\,717$.
<p>Consider the following process that can be applied recursively to any positive integer $n$:</p> <ul> <li>if $n = 1$ do nothing and the process stops,</li> <li>if $n$ is divisible by $7$ divide it by $7$,</li> <li>otherwise add $1$.</li> </ul> <p>Define $g(n)$ to be the number of $1$'s that must be added before the process ends. For example:</p> <center>$125\xrightarrow{\scriptsize{+1}} 126\xrightarrow{\scriptsize{\div 7}} 18\xrightarrow{\scriptsize{+1}} 19\xrightarrow{\scriptsize{+1}} 20\xrightarrow{\scriptsize{+1}} 21\xrightarrow{\scriptsize{\div 7}} 3\xrightarrow{\scriptsize{+1}} 4\xrightarrow{\scriptsize{+1}} 5\xrightarrow{\scriptsize{+1}} 6\xrightarrow{\scriptsize{+1}} 7\xrightarrow{\scriptsize{\div 7}} 1$.</center> <p>Eight $1$'s are added so $g(125) = 8$. Similarly $g(1000) = 9$ and $g(10000) = 21$.</p> <p>Define $S(N) = \sum_{n=1}^N g(n)$ and $H(K) = S\left(\frac{7^K-1}{11}\right)$. You are given $H(10) = 690409338$.</p> <p>Find $H(10^9)$ modulo $1\,117\,117\,717$.</p>
91627537
Sunday, 26th May 2019, 04:00 am
292
50%
medium
294
Sum of Digits - Experience #23
For a positive integer $k$, define $d(k)$ as the sum of the digits of $k$ in its usual decimal representation. Thus $d(42) = 4+2 = 6$. For a positive integer $n$, define $S(n)$ as the number of positive integers $k \lt 10^n$ with the following properties : $k$ is divisible by $23$ and $d(k) = 23$. You are given that $S(9) = 263626$ and $S(42) = 6377168878570056$. Find $S(11^{12})$ and give your answer mod $10^9$.
For a positive integer $k$, define $d(k)$ as the sum of the digits of $k$ in its usual decimal representation. Thus $d(42) = 4+2 = 6$. For a positive integer $n$, define $S(n)$ as the number of positive integers $k \lt 10^n$ with the following properties : $k$ is divisible by $23$ and $d(k) = 23$. You are given that $S(9) = 263626$ and $S(42) = 6377168878570056$. Find $S(11^{12})$ and give your answer mod $10^9$.
<p> For a positive integer $k$, define $d(k)$ as the sum of the digits of $k$ in its usual decimal representation. Thus $d(42) = 4+2 = 6$. </p> <p> For a positive integer $n$, define $S(n)$ as the number of positive integers $k \lt 10^n$ with the following properties : </p><ul><li>$k$ is divisible by $23$ and </li><li>$d(k) = 23$. </li></ul> You are given that $S(9) = 263626$ and $S(42) = 6377168878570056$. <p> Find $S(11^{12})$ and give your answer mod $10^9$. </p>
789184709
Saturday, 29th May 2010, 09:00 am
1044
45%
medium
375
Minimum of Subsequences
Let $S_n$ be an integer sequence produced with the following pseudo-random number generator: \begin{align} S_0 & = 290797 \\ S_{n+1} & = S_n^2 \bmod 50515093 \end{align} Let $A(i, j)$ be the minimum of the numbers $S_i, S_{i+1}, \dots, S_j$ for $i\le j$. Let $M(N) = \sum A(i, j)$ for $1 \le i \le j \le N$. We can verify that $M(10) = 432256955$ and $M(10\,000) = 3264567774119$. Find $M(2\,000\,000\,000)$.
Let $S_n$ be an integer sequence produced with the following pseudo-random number generator: \begin{align} S_0 & = 290797 \\ S_{n+1} & = S_n^2 \bmod 50515093 \end{align} Let $A(i, j)$ be the minimum of the numbers $S_i, S_{i+1}, \dots, S_j$ for $i\le j$. Let $M(N) = \sum A(i, j)$ for $1 \le i \le j \le N$. We can verify that $M(10) = 432256955$ and $M(10\,000) = 3264567774119$. Find $M(2\,000\,000\,000)$.
<p>Let $S_n$ be an integer sequence produced with the following pseudo-random number generator:</p> \begin{align} S_0 & = 290797 \\ S_{n+1} & = S_n^2 \bmod 50515093 \end{align} <p> Let $A(i, j)$ be the minimum of the numbers $S_i, S_{i+1}, \dots, S_j$ for $i\le j$.<br/> Let $M(N) = \sum A(i, j)$ for $1 \le i \le j \le N$.<br/> We can verify that $M(10) = 432256955$ and $M(10\,000) = 3264567774119$.</p> <p> Find $M(2\,000\,000\,000)$. </p>
7435327983715286168
Saturday, 10th March 2012, 10:00 pm
979
40%
medium
358
Cyclic Numbers
A cyclic number with $n$ digits has a very interesting property: When it is multiplied by $1, 2, 3, 4, \dots, n$, all the products have exactly the same digits, in the same order, but rotated in a circular fashion! The smallest cyclic number is the $6$-digit number $142857$: $142857 \times 1 = 142857$ $142857 \times 2 = 285714$ $142857 \times 3 = 428571$ $142857 \times 4 = 571428$ $142857 \times 5 = 714285$ $142857 \times 6 = 857142$ The next cyclic number is $0588235294117647$ with $16$ digits : $0588235294117647 \times 1 = 0588235294117647$ $0588235294117647 \times 2 = 1176470588235294$ $0588235294117647 \times 3 = 1764705882352941$ $\dots$ $0588235294117647 \times 16 = 9411764705882352$ Note that for cyclic numbers, leading zeros are important. There is only one cyclic number for which, the eleven leftmost digits are $00000000137$ and the five rightmost digits are $56789$ (i.e., it has the form $00000000137 \cdots 56789$ with an unknown number of digits in the middle). Find the sum of all its digits.
A cyclic number with $n$ digits has a very interesting property: When it is multiplied by $1, 2, 3, 4, \dots, n$, all the products have exactly the same digits, in the same order, but rotated in a circular fashion! The smallest cyclic number is the $6$-digit number $142857$: $142857 \times 1 = 142857$ $142857 \times 2 = 285714$ $142857 \times 3 = 428571$ $142857 \times 4 = 571428$ $142857 \times 5 = 714285$ $142857 \times 6 = 857142$ The next cyclic number is $0588235294117647$ with $16$ digits : $0588235294117647 \times 1 = 0588235294117647$ $0588235294117647 \times 2 = 1176470588235294$ $0588235294117647 \times 3 = 1764705882352941$ $\dots$ $0588235294117647 \times 16 = 9411764705882352$ Note that for cyclic numbers, leading zeros are important. There is only one cyclic number for which, the eleven leftmost digits are $00000000137$ and the five rightmost digits are $56789$ (i.e., it has the form $00000000137 \cdots 56789$ with an unknown number of digits in the middle). Find the sum of all its digits.
<p>A <strong>cyclic number</strong> with $n$ digits has a very interesting property:<br/> When it is multiplied by $1, 2, 3, 4, \dots, n$, all the products have exactly the same digits, in the same order, but rotated in a circular fashion! </p> <p> The smallest cyclic number is the $6$-digit number $142857$:<br/> $142857 \times 1 = 142857$<br/> $142857 \times 2 = 285714$<br/> $142857 \times 3 = 428571$<br/> $142857 \times 4 = 571428$<br/> $142857 \times 5 = 714285$<br/> $142857 \times 6 = 857142$ </p> <p> The next cyclic number is $0588235294117647$ with $16$ digits :<br/> $0588235294117647 \times 1 = 0588235294117647$<br/> $0588235294117647 \times 2 = 1176470588235294$<br/> $0588235294117647 \times 3 = 1764705882352941$<br/> $\dots$<br/> $0588235294117647 \times 16 = 9411764705882352$ </p> <p> Note that for cyclic numbers, leading zeros are important. </p> <p> There is only one cyclic number for which, the eleven leftmost digits are $00000000137$ and the five rightmost digits are $56789$ (i.e., it has the form $00000000137 \cdots 56789$ with an unknown number of digits in the middle). Find the sum of all its digits. </p>
3284144505
Saturday, 12th November 2011, 07:00 pm
1785
25%
easy
27
Quadratic Primes
Euler discovered the remarkable quadratic formula: $n^2 + n + 41$ It turns out that the formula will produce $40$ primes for the consecutive integer values $0 \le n \le 39$. However, when $n = 40, 40^2 + 40 + 41 = 40(40 + 1) + 41$ is divisible by $41$, and certainly when $n = 41, 41^2 + 41 + 41$ is clearly divisible by $41$. The incredible formula $n^2 - 79n + 1601$ was discovered, which produces $80$ primes for the consecutive values $0 \le n \le 79$. The product of the coefficients, $-79$ and $1601$, is $-126479$. Considering quadratics of the form: $n^2 + an + b$, where $|a| < 1000$ and $|b| \le 1000$where $|n|$ is the modulus/absolute value of $n$e.g. $|11| = 11$ and $|-4| = 4$ Find the product of the coefficients, $a$ and $b$, for the quadratic expression that produces the maximum number of primes for consecutive values of $n$, starting with $n = 0$.
Euler discovered the remarkable quadratic formula: $n^2 + n + 41$ It turns out that the formula will produce $40$ primes for the consecutive integer values $0 \le n \le 39$. However, when $n = 40, 40^2 + 40 + 41 = 40(40 + 1) + 41$ is divisible by $41$, and certainly when $n = 41, 41^2 + 41 + 41$ is clearly divisible by $41$. The incredible formula $n^2 - 79n + 1601$ was discovered, which produces $80$ primes for the consecutive values $0 \le n \le 79$. The product of the coefficients, $-79$ and $1601$, is $-126479$. Considering quadratics of the form: $n^2 + an + b$, where $|a| < 1000$ and $|b| \le 1000$where $|n|$ is the modulus/absolute value of $n$e.g. $|11| = 11$ and $|-4| = 4$ Find the product of the coefficients, $a$ and $b$, for the quadratic expression that produces the maximum number of primes for consecutive values of $n$, starting with $n = 0$.
<p>Euler discovered the remarkable quadratic formula:</p> <p class="center">$n^2 + n + 41$</p> <p>It turns out that the formula will produce $40$ primes for the consecutive integer values $0 \le n \le 39$. However, when $n = 40, 40^2 + 40 + 41 = 40(40 + 1) + 41$ is divisible by $41$, and certainly when $n = 41, 41^2 + 41 + 41$ is clearly divisible by $41$.</p> <p>The incredible formula $n^2 - 79n + 1601$ was discovered, which produces $80$ primes for the consecutive values $0 \le n \le 79$. The product of the coefficients, $-79$ and $1601$, is $-126479$.</p> <p>Considering quadratics of the form:</p> <blockquote> $n^2 + an + b$, where $|a| &lt; 1000$ and $|b| \le 1000$<br/><br/><div>where $|n|$ is the modulus/absolute value of $n$<br/>e.g. $|11| = 11$ and $|-4| = 4$</div> </blockquote> <p>Find the product of the coefficients, $a$ and $b$, for the quadratic expression that produces the maximum number of primes for consecutive values of $n$, starting with $n = 0$.</p>
-59231
Friday, 27th September 2002, 06:00 pm
95475
5%
easy