task
stringlengths
0
154k
__index_level_0__
int64
0
39.2k
Let s_k be the number of 1’s when writing the numbers from 0 to k in binary. For example, writing 0 to 5 in binary, we have 0, 1, 10, 11, 100, 101. There are seven 1’s, so s_5 = 7. The sequence S = \{s_k : k \ge 0\} starts \{0, 1, 2, 4, 5, 7, 9, 12, ...\}. A game is played by two players. Before the game starts, a numb...
25,400
A rectilinear grid is an orthogonal grid where the spacing between the gridlines does not have to be equidistant. An example of such grid is logarithmic graph paper. Consider rectilinear grids in the Cartesian coordinate system with the following properties: The gridlines are parallel to the axes of the Cartesian coord...
25,401
An n \times n grid of squares contains n^2 ants, one ant per square. All ants decide to move simultaneously to an adjacent square (usually 4 possibilities, except for ants on the edge of the grid or at the corners). We define f(n) to be the number of ways this can happen without any ants ending on the same square and w...
25,402
Jeff eats a pie in an unusual way. The pie is circular. He starts with slicing an initial cut in the pie along a radius. While there is at least a given fraction F of pie left, he performs the following procedure: - He makes two slices from the pie centre to any point of what is remaining of the pie border, any point o...
25,403
The Pythagorean tree is a fractal generated by the following procedure: Start with a unit square. Then, calling one of the sides its base (in the animation, the bottom side is the base): Attach a right triangle to the side opposite the base, with the hypotenuse coinciding with that side and with the sides in a 3\text -...
25,404
For any positive integer n, the nth weak Goodstein sequence \{g_1, g_2, g_3, \dots\} is defined as: g_1 = n for k \gt 1, g_k is obtained by writing g_{k-1} in base k, interpreting it as a base k + 1 number, and subtracting 1. The sequence terminates when g_k becomes 0. For example, the 6th weak Goodstein sequence is \{...
25,405
On the parabola y = x^2/k, three points A(a, a^2/k), B(b, b^2/k) and C(c, c^2/k) are chosen. Let F(K, X) be the number of the integer quadruplets (k, a, b, c) such that at least one angle of the triangle ABC is 45-degree, with 1 \le k \le K and -X \le a \lt b \lt c \le X. For example, F(1, 10) = 41 and F(10, 100) = 124...
25,406
Inside a rope of length n, n - 1 points are placed with distance 1 from each other and from the endpoints. Among these points, we choose m - 1 points at random and cut the rope at these points to create m segments. Let E(n, m) be the expected length of the second-shortest segment. For example, E(3, 2) = 2 and E(8, 3) =...
25,407
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 200th squarefree Fibonacci number is: ...
25,408
A Fibonacci tree is a binary tree recursively defined as: T(0) is the empty tree. T(1) is the binary tree with only one node. T(k) consists of a root node that has T(k-1) and T(k-2) as children. On such a tree two players play a take-away game. On each turn a player selects a node and removes that node along with the s...
25,409
The divisors of 6 are 1,2,3 and 6. The sum of the squares of these numbers is 1+4+9+36=50. Let \operatorname{sigma}_2(n) represent the sum of the squares of the divisors of n. Thus \operatorname{sigma}_2(6)=50. Let \operatorname{SIGMA}_2 represent the summatory function of \operatorname{sigma}_2, that is \operatorname{...
25,410
It can be shown that the polynomial n^4 + 4n^3 + 2n^2 + 5n is a multiple of 6 for every integer n. It can also be shown that 6 is the largest integer satisfying this property. Define M(a, b, c) as the maximum m such that n^4 + an^3 + bn^2 + cn is a multiple of m for all integers n. For example, M(4, 2, 5) = 6. Also, de...
25,411
For integers a and b, we define D(a, b) as the domain enclosed by the parabola y = x^2 and the line y = a\cdot x + b: D(a, b) = \{(x, y) \mid x^2 \leq y \leq a\cdot x + b \}. L(a, b) is defined as the number of lattice points contained in D(a, b). For example, L(1, 2) = 8 and L(2, -1) = 1. We also define S(N) as the su...
25,412
E_a is an ellipse with an equation of the form x^2 + 4y^2 = 4a^2. E_a^\prime is the rotated image of E_a by \theta degrees counterclockwise around the origin O(0, 0) for 0^\circ \lt \theta \lt 90^\circ. b is the distance to the origin of the two intersection points closest to the origin and c is the distance of the two...
25,413
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 wh...
25,414
We are trying to find a hidden number selected from the set of integers \{1, 2, \dots, n\} by asking questions. Each number (question) we ask, we get one of three possible answers: "Your guess is lower than the hidden number" (and you incur a cost of a), or "Your guess is higher than the hidden number" (and you incur ...
25,415
If we calculate a^2 \bmod 6 for 0 \leq a \leq 5 we get: 0,1,4,3,4,1. The largest value of a such that a^2 \equiv a \bmod 6 is 4. Let's call M(n) the largest value of a \lt n such that a^2 \equiv a \pmod n. So M(6) = 4. Find \sum M(n) for 1 \leq n \leq 10^7.
25,416
Let's call a lattice point (x, y) inadmissible if x, y and x+y are all positive perfect squares. For example, (9, 16) is inadmissible, while (0, 4), (3, 1) and (9, 4) are not. Consider a path from point (x_1, y_1) to point (x_2, y_2) using only unit steps north or east. Let's call such a path admissible if none of its ...
25,417
Let n be a positive integer. Consider nim positions where: There are n non-empty piles. Each pile has size less than 2^n. No two piles have the same size. Let W(n) be the number of winning nim positions satisfying the above conditions (a position is winning if the first player has a winning strategy). For example, W(1)...
25,418
Let C be the circle with radius r, x^2 + y^2 = r^2. We choose two points P(a, b) and Q(-a, c) so that the line passing through P and Q is tangent to C. For example, the quadruplet (r, a, b, c) = (2, 6, 2, -7) satisfies this property. Let F(R, X) be the number of the integer quadruplets (r, a, b, c) with this property, ...
25,419
Let n be a positive integer. Suppose there are stations at the coordinates (x, y) = (2^i \bmod n, 3^i \bmod n) for 0 \leq i \leq 2n. We will consider stations with the same coordinates as the same station. We wish to form a path from (0, 0) to (n, n) such that the x and y coordinates never decrease. Let S(n) be the max...
25,420
For integers m, n (0 \leq n \lt m), let L(m, n) be an m \times m grid with the top-right n \times n grid removed. For example, L(5, 3) looks like this: We want to number each cell of L(m, n) with consecutive integers 1, 2, 3, \dots such that the number in every cell is smaller than the number below it and to the left o...
25,421
We say that a d-digit positive number (no leading zeros) is a one-child number if exactly one of its sub-strings is divisible by d. For example, 5671 is a 4-digit one-child number. Among all its sub-strings 5, 6, 7, 1, 56, 67, 71, 567, 671 and 5671, only 56 is divisible by 4. Similarly, 104 is a 3-digit one-child numbe...
25,422
6174 is a remarkable number; if we sort its digits in increasing order and subtract that number from the number you get when you sort the digits in decreasing order, we get 7641-1467=6174. Even more remarkable is that if we start from any 4 digit number and repeat this process of sorting and subtracting, we'll eventual...
25,423
A set of lattice points S is called a titanic set if there exists a line passing through exactly two points in S. An example of a titanic set is S = \{(0, 0), (0, 1), (0, 2), (1, 1), (2, 0), (1, 0)\}, where the line passing through (0, 1) and (2, 0) does not pass through any other point in S. On the other hand, the set...
25,424
A row of n squares contains a frog in the leftmost square. By successive jumps the frog goes to the rightmost square and then back to the leftmost square. On the outward trip he jumps one, two or three squares to the right, and on the homeward trip he jumps to the left in a similar manner. He cannot jump outside the sq...
25,425
A unit fraction contains 1 in the numerator. The decimal representation of the unit fractions with denominators 2 to 10 are given: \begin{align} 1/2 &= 0.5\\ 1/3 &=0.(3)\\ 1/4 &=0.25\\ 1/5 &= 0.2\\ 1/6 &= 0.1(6)\\ 1/7 &= 0.(142857)\\ 1/8 &= 0.125\\ 1/9 &= 0.(1)\\ 1/10 &= 0.1 \end{align} Where 0.1(6) means 0.166666\cdot...
25,426
Let n be a positive integer. An integer triple (a, b, c) is called a factorisation triple of n if: 1 \leq a \leq b \leq c a \cdot b \cdot c = n. Define f(n) to be a + b + c for the factorisation triple (a, b, c) of n which minimises c / a. One can show that this triple is unique. For example, f(165) = 19, f(100100) = 1...
25,427
The look and say sequence goes 1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, ... The sequence starts with 1 and all other members are obtained by describing the previous member in terms of consecutive digits. It helps to do this out loud: 1 is 'one one' → 11 11 is 'two ones' → 21 21 is 'one two and one one' → ...
25,428
A positive integer matrix is a matrix whose elements are all positive integers. Some positive integer matrices can be expressed as a square of a positive integer matrix in two different ways. Here is an example: \begin{pmatrix} 40 & 12\\ 48 & 40 \end{pmatrix} = \begin{pmatrix} 2 & 3\\ 12 & 2 \end{pmatrix}^2 = \begin{pm...
25,429
Numbers of the form n^{15}+1 are composite for every integer n \gt 1. For positive integers n and m let s(n,m) be defined as the sum of the distinct prime factors of n^{15}+1 not exceeding m. E.g. 2^{15}+1 = 3 \times 3 \times 11 \times 331. So s(2,10) = 3 and s(2,1000) = 3+11+331 = 345. Also 10^{15}+1 = 7 \times 11 \ti...
25,430
Let H be the hyperbola defined by the equation 12x^2 + 7xy - 12y^2 = 625. Next, define X as the point (7, 1). It can be seen that X is in H. Now we define a sequence of points in H, \{P_i: i \geq 1\}, as: P_1 = (13, 61/4). P_2 = (-43/6, -4). For i \gt 2, P_i is the unique point in H that is different from P_{i-1} and s...
25,431
Let n be a positive integer. A 6-sided die is thrown n times. Let c be the number of pairs of consecutive throws that give the same value. For example, if n = 7 and the values of the die throws are (1,1,5,6,6,6,3), then the following pairs of consecutive throws give the same value: ( 1,1 ,5,6,6,6,3) (1,1,5, 6,6 ,6,3) (...
25,432
The above is an example of a cryptic kakuro (also known as cross sums, or even sums cross) puzzle, with its final solution on the right. (The common rules of kakuro puzzles can be found easily on numerous internet sites. Other related information can also be currently found at krazydad.com whose author has provided the...
25,433
Two positive numbers A and B are said to be connected (denoted by "A \leftrightarrow B") if one of these conditions holds: (1) A and B have the same length and differ in exactly one digit; for example, 123 \leftrightarrow 173. (2) Adding one digit to the left of A (or B) makes B (or A); for example, 23 \leftrightarrow ...
25,434
Consider an infinite row of boxes. Some of the boxes contain a ball. For example, an initial configuration of 2 consecutive occupied boxes followed by 2 empty boxes, 2 occupied boxes, 1 empty box, and 2 occupied boxes can be denoted by the sequence (2, 2, 2, 1, 2), in which the number of consecutive occupied and empty ...
25,435
A sequence of integers S = \{s_i\} is called an n-sequence if it has n elements and each element s_i satisfies 1 \leq s_i \leq n. Thus there are n^n distinct n-sequences in total. For example, the sequence S = \{1, 5, 5, 10, 7, 7, 7, 2, 3, 7\} is a 10-sequence. For any sequence S, let L(S) be the length of the longest ...
25,436
Let a, b and c be positive numbers. Let W, X, Y, Z be four collinear points where |WX| = a, |XY| = b, |YZ| = c and |WZ| = a + b + c. Let C_{in} be the circle having the diameter XY. Let C_{out} be the circle having the diameter WZ. The triplet (a, b, c) is called a necklace triplet if you can place k \geq 3 distinct ci...
25,437
A unitary divisor d of a number n is a divisor of n that has the property \gcd(d, n/d) = 1. The unitary divisors of 4! = 24 are 1, 3, 8 and 24. The sum of their squares is 1^2 + 3^2 + 8^2 + 24^2 = 650. Let S(n) represent the sum of the squares of the unitary divisors of n. Thus S(4!)=650. Find S(100\,000\,000!) modulo ...
25,438
N disks are placed in a row, indexed 1 to N from left to right. Each disk has a black side and white side. Initially all disks show their white side. At each turn, two, not necessarily distinct, integers A and B between 1 and N (inclusive) are chosen uniformly at random. All disks with an index from A to B (inclusive) ...
25,439
Fred the farmer arranges to have a new storage silo installed on his farm and having an obsession for all things square he is absolutely devastated when he discovers that it is circular. Quentin, the representative from the company that installed the silo, explains that they only manufacture cylindrical silos, but he p...
25,440
Let S(n,m) = \sum\phi(n \times i) for 1 \leq i \leq m. (\phi is Euler's totient function) You are given that S(510510,10^6)= 45480596821125120. Find S(510510,10^{11}). Give the last 9 digits of your answer.
25,441
Let E(x_0, y_0) be the number of steps it takes to determine the greatest common divisor of x_0 and y_0 with Euclid's algorithm . More formally: x_1 = y_0, y_1 = x_0 \bmod y_0 x_n = y_{n-1}, y_n = x_{n-1} \bmod y_{n-1} E(x_0, y_0) is the smallest n such that y_n = 0. We have E(1,1) = 1, E(10,6) = 3 and E(6,10) = 4. Def...
25,442
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...
25,443
The Fibonacci numbers \{f_n, n \ge 0\} are defined recursively as f_n = f_{n-1} + f_{n-2} with base cases f_0 = 0 and f_1 = 1. Define the polynomials \{F_n, n \ge 0\} as F_n(x) = \displaystyle{\sum_{i=0}^n f_i x^i}. For example, F_7(x) = x + x^2 + 2x^3 + 3x^4 + 5x^5 + 8x^6 + 13x^7, and F_7(11) = 268\,357\,683. Let n = ...
25,444
Julie proposes the following wager to her sister Louise. She suggests they play a game of chance to determine who will wash the dishes. For this game, they shall use a generator of independent random numbers uniformly distributed between 0 and 1. The game starts with S = 0. The first player, Louise, adds to S different...
25,445
When we calculate 8^n modulo 11 for n=0 to 9 we get: 1, 8, 9, 6, 4, 10, 3, 2, 5, 7. As we see all possible values from 1 to 10 occur. So 8 is a primitive root of 11. But there is more: If we take a closer look we see: 1+8=9 8+9=17 \equiv 6 \bmod 11 9+6=15 \equiv 4 \bmod 11 6+4=10 4+10=14 \equiv 3 \bmod 11 10+3=13 \equi...
25,446
For an n-tuple of integers t = (a_1, \dots, a_n), let (x_1, \dots, x_n) be the solutions of the polynomial equation x^n + a_1 x^{n-1} + a_2 x^{n-2} + \cdots + a_{n-1}x + a_n = 0. Consider the following two conditions: x_1, \dots, x_n are all real. If x_1, \dots, x_n are sorted, \lfloor x_i\rfloor = i for 1 \leq i \leq ...
25,447
Let d(k) be the sum of all divisors of k. We define the function S(N) = \sum_{i=1}^N \sum_{j=1}^Nd(i \cdot j). For example, S(3) = d(1) + d(2) + d(3) + d(2) + d(4) + d(6) + d(3) + d(6) + d(9) = 59. You are given that S(10^3) = 563576517282 and S(10^5) \bmod 10^9 = 215766508. Find S(10^{11}) \bmod 10^9.
25,448
We want to tile a board of length n and height 1 completely, with either 1 \times 2 blocks or 1 \times 1 blocks with a single decimal digit on top: For example, here are some of the ways to tile a board of length n = 8: Let T(n) be the number of ways to tile a board of length n as described above. For example, T(1) = 1...
25,449
For an integer M, we define R(M) as the sum of 1/(p \cdot q) for all the integer pairs p and q which satisfy all of these conditions: 1 \leq p \lt q \leq M p + q \geq M p and q are coprime. We also define S(N) as the sum of R(i) for 2 \leq i \leq N. We can verify that S(2) = R(2) = 1/2, S(10) \approx 6.9147 and S(100) ...
25,450
An integer is called eleven-free if its decimal expansion does not contain any substring representing a power of 11 except 1. For example, 2404 and 13431 are eleven-free, while 911 and 4121331 are not. Let E(n) be the nth positive eleven-free integer. For example, E(3) = 3, E(200) = 213 and E(500\,000) = 531563. Find E...
25,451
Let g(n) be a sequence defined as follows: g(4) = 13, g(n) = g(n-1) + \gcd(n, g(n-1)) for n \gt 4. The first few values are: n 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... g(n) 13 14 16 17 18 27 28 29 30 31 32 33 34 51 54 55 60 ... You are given that g(1\,000) = 2524 and g(1\,000\,000) = 2624152. Find g(10^{15}).
25,452
A group of p people decide to sit down at a round table and play a lottery-ticket trading game. Each person starts off with a randomly-assigned, unscratched lottery ticket. Each ticket, when scratched, reveals a whole-pound prize ranging anywhere from £1 to £p, with no two tickets alike. The goal of the game is for all...
25,453
For every integer n>1, the family of functions f_{n,a,b} is defined by f_{n,a,b}(x)\equiv a x + b \mod n\,\,\, for a,b,x integer and 0< a <n, 0 \le b < n,0 \le x < n. We will call f_{n,a,b} a retraction if \,\,\, f_{n,a,b}(f_{n,a,b}(x)) \equiv f_{n,a,b}(x) \mod n \,\,\, for every 0 \le x < n. Let R(n) be the number ...
25,454
For every integer n>1, the family of functions f_{n,a,b} is defined by f_{n,a,b}(x)\equiv a x + b \mod n\,\,\, for a,b,x integer and 0< a <n, 0 \le b < n,0 \le x < n. We will call f_{n,a,b} a retraction if \,\,\, f_{n,a,b}(f_{n,a,b}(x)) \equiv f_{n,a,b}(x) \mod n \,\,\, for every 0 \le x < n. Let R(n) be the number ...
25,455
For every integer n>1, the family of functions f_{n,a,b} is defined by f_{n,a,b}(x)\equiv a x + b \mod n\,\,\, for a,b,x integer and 0< a <n, 0 \le b < n,0 \le x < n. We will call f_{n,a,b} a retraction if \,\,\, f_{n,a,b}(f_{n,a,b}(x)) \equiv f_{n,a,b}(x) \mod n \,\,\, for every 0 \le x < n. Let R(n) be the number ...
25,456
The function \operatorname{\mathbf{lcm}}(a,b) denotes the least common multiple of a and b. Let A(n) be the average of the values of \operatorname{lcm}(n,i) for 1 \le i \le n. E.g: A(2)=(2+2)/2=2 and A(10)=(10+10+30+20+10+30+70+40+90+10)/10=32. Let S(n)=\sum A(k) for 1 \le k \le n. S(100)=122726. Find S(99999999019) \b...
25,457
Phil the confectioner is making a new batch of chocolate covered candy. Each candy centre is shaped like an ellipsoid of revolution defined by the equation: b^2 x^2 + b^2 y^2 + a^2 z^2 = a^2 b^2. Phil wants to know how much chocolate is needed to cover one candy centre with a uniform coat of chocolate one millimeter th...
25,458
A hypocycloid is the curve drawn by a point on a small circle rolling inside a larger circle. The parametric equations of a hypocycloid centered at the origin, and starting at the right most point is given by: x(t) = (R - r) \cos(t) + r \cos(\frac {R - r} r t) y(t) = (R - r) \sin(t) - r \sin(\frac {R - r} r t) Where R ...
25,459
Consider the number 15. There are eight positive numbers less than 15 which are coprime to 15: 1, 2, 4, 7, 8, 11, 13, 14. The modular inverses of these numbers modulo 15 are: 1, 8, 4, 13, 2, 11, 7, 14 because 1 \cdot 1 \bmod 15=1 2 \cdot 8=16 \bmod 15=1 4 \cdot 4=16 \bmod 15=1 7 \cdot 13=91 \bmod 15=1 11 \cdot 11=121 \...
25,460
Define F(m,n) as the number of n-tuples of positive integers for which the product of the elements doesn't exceed m. F(10, 10) = 571. F(10^6, 10^6) \bmod 1\,234\,567\,891 = 252903833. Find F(10^9, 10^9) \bmod 1\,234\,567\,891.
25,461
A simple quadrilateral is a polygon that has four distinct vertices, has no straight angles and does not self-intersect. Let Q(m, n) be the number of simple quadrilaterals whose vertices are lattice points with coordinates (x,y) satisfying 0 \le x \le m and 0 \le y \le n. For example, Q(2, 2) = 94 as can be seen below:...
25,462
In the following equation x, y, and n are positive integers. \dfrac{1}{x} + \dfrac{1}{y} = \dfrac{1}{n} For a limit L we define F(L) as the number of solutions which satisfy x \lt y \le L. We can verify that F(15) = 4 and F(1000) = 1069. Find F(10^{12}).
25,463
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{0007...
25,464
Define: x_n = (1248^n \bmod 32323) - 16161 y_n = (8421^n \bmod 30103) - 15051 P_n = \{(x_1, y_1), (x_2, y_2), \dots, (x_n, y_n)\} For example, P_8 = \{(-14913, -6630),(-10161, 5625),(5226, 11896),(8340, -10778),(15852, -5203),(-15165, 11295),(-1427, -14495),(12407, 1060)\}. Let C(n) be the number of triangles whose ver...
25,465
Let f(n) = n^2 - 3n - 1. Let p be a prime. Let R(p) be the smallest positive integer n such that f(n) \bmod p^2 = 0 if such an integer n exists, otherwise R(p) = 0. Let SR(L) be \sum R(p) for all primes not exceeding L. Find SR(10^7).
25,466
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!=81850...
25,467
The flipping game is a two player game played on an N by N square board. Each square contains a disk with one side white and one side black. The game starts with all disks showing their white side. A turn consists of flipping all disks in a rectangle with the following properties: the upper right corner of the rectangl...
25,468
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 fol...
25,469
Let f_n(k) = e^{k/n} - 1, for all non-negative integers k. Remarkably, f_{200}(6)+f_{200}(75)+f_{200}(89)+f_{200}(226)=\underline{3.1415926}44529\cdots\approx\pi. In fact, it is the best approximation of \pi of the form f_n(a) + f_n(b) + f_n(c) + f_n(d) for n=200. Let g(n)=a^2 + b^2 + c^2 + d^2 for a, b, c, d that mini...
25,470
A 3-smooth number is an integer which has no prime factor larger than 3. For an integer N, we define S(N) as the set of 3-smooth numbers less than or equal to N. For example, S(20) = \{ 1, 2, 3, 4, 6, 8, 9, 12, 16, 18 \}. We define F(N) as the number of permutations of S(N) in which each element comes after all of its ...
25,471
The function f is defined for all positive integers as follows: f(1)=1 f(3)=3 f(2n)=f(n) f(4n + 1)=2f(2n + 1) - f(n) f(4n + 3)=3f(2n + 1) - 2f(n) The function S(n) is defined as \sum_{i=1}^{n}f(i). S(8)=22 and S(100)=3604. Find S(3^{37}). Give the last 9 digits of your answer.
25,472
The Möbius function , denoted \mu(n), is defined as: \mu(n) = (-1)^{\omega(n)} if n is squarefree (where \omega(n) is the number of distinct prime factors of n) \mu(n) = 0 if n is not squarefree. Let P(a, b) be the number of integers n in the interval [a, b] such that \mu(n) = 1. Let N(a, b) be the number of integers n...
25,473
The kernel of a polygon is defined by the set of points from which the entire polygon's boundary is visible. We define a polar polygon as a polygon for which the origin is strictly contained inside its kernel. For this problem, a polygon can have collinear consecutive vertices. However, a polygon still cannot have self...
25,474
Let P(m,n) be the number of distinct terms in an m\times n multiplication table. For example, a 3\times 4 multiplication table looks like this: \times 1 2 3 4 1 1 2 3 4 2 2 4 6 8 3 3 6 9 12 There are 8 distinct terms \{1,2,3,4,6,8,9,12\}, therefore P(3,4) = 8. You are given that: P(64,64) = 1263, P(12,345) = 1998, and ...
25,475
An integer s is called a superinteger of another integer n if the digits of n form a subsequence A subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. of the digits of s. For example, 2718281828 is a superinteger of 18828, w...
25,476
An integer is called B -smooth if none of its prime factors is greater than B. Let S_B(n) be the largest B-smooth divisor of n. Examples: S_1(10)=1 S_4(2100) = 12 S_{17}(2496144) = 5712 Define \displaystyle F(n)=\sum_{B=1}^n \sum_{r=0}^n S_B(\binom n r). Here, \displaystyle \binom n r denotes the binomial coefficient. ...
25,477
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. W...
25,478
Consider a single game of Ramvok: Let t represent the maximum number of turns the game lasts. If t = 0, then the game ends immediately. Otherwise, on each turn i, the player rolls a die. After rolling, if i \lt t the player can either stop the game and receive a prize equal to the value of the current roll, or discard ...
25,479
The triangle \triangle ABC is inscribed in an ellipse with equation \frac {x^2} {a^2} + \frac {y^2} {b^2} = 1, 0 \lt 2b \lt a, a and b integers. Let r(a, b) be the radius of the incircle of \triangle ABC when the incircle has center (2b, 0) and A has coordinates \left( \frac a 2, \frac {\sqrt 3} 2 b\right). For example...
25,480
There are N seats in a row. N people come one after another to fill the seats according to the following rules: No person sits beside another. The first person chooses any seat. Each subsequent person chooses the seat furthest from anyone else already seated, as long as it does not violate rule 1. If there is more than...
25,481
Let \varphi be the golden ratio: \varphi=\frac{1+\sqrt{5}}{2}. Remarkably it is possible to write every positive integer as a sum of powers of \varphi even if we require that every power of \varphi is used at most once in this sum. Even then this representation is not unique. We can make it unique by requiring that no ...
25,482
For a positive integer n and digits d, we define F(n, d) as the number of the divisors of n whose last digits equal d. For example, F(84, 4) = 3. Among the divisors of 84 (1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84), three of them (4, 14, 84) have the last digit 4. We can also verify that F(12!, 12) = 11 and F(50!, 123) ...
25,483
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 previou...
25,484
Let R(a, b, c) be the maximum area covered by three non-overlapping circles inside a triangle with edge lengths a, b and c. Let S(n) be the average value of R(a, b, c) over all integer triplets (a, b, c) such that 1 \le a \le b \le c \lt a + b \le n. You are given S(2) = R(1, 1, 1) \approx 0.31998, S(5) \approx 1.25899...
25,485
The number sequence game starts with a sequence S of N numbers written on a line. Two players alternate turns. The players on their respective turns must select and remove either the first or the last number remaining in the sequence. A player's own score is (determined by) the sum of all the numbers that player has ta...
25,486
Let us consider mixtures of three substances: A , B and C . A mixture can be described by a ratio of the amounts of A , B , and C in it, i.e., (a : b : c). For example, a mixture described by the ratio (2 : 3 : 5) contains 20\% A , 30\% B and 50\% C . For the purposes of this problem, we cannot separate the individual ...
25,487
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(...
25,488
Consider all the words which can be formed by selecting letters, in any order, from the phrase: thereisasyetinsufficientdataforameaningfulanswer Suppose those with 15 letters or less are listed in alphabetical order and numbered sequentially starting at 1. The list would include: 1 : a 2 : aa 3 : aaa 4 : aaaa 5 : aaaaa...
25,489
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 specificall...
25,490
ABC is an integer sided triangle with incenter I and perimeter p. The segments IA, IB and IC have integral length as well. Let L = p + |IA| + |IB| + |IC|. Let S(P) = \sum L for all such triangles where p \le P. For example, S(10^3) = 3619. Find S(10^7).
25,491
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 1 st and 2 nd elements P_3 = exchange the...
25,492
The arithmetic derivative is defined by p^\prime = 1 for any prime p (ab)^\prime = a^\prime b + ab^\prime for all integers a, b (Leibniz rule) For example, 20^\prime = 24. Find \sum \operatorname{\mathbf{gcd}}(k,k^\prime) for 1 \lt k \le 5 \times 10^{15}. Note: \operatorname{\mathbf{gcd}}(x,y) denotes the greatest comm...
25,493
Let d(n) be the number of divisors of n. Let M(n,k) be the maximum value of d(j) for n \le j \le n+k-1. Let S(u,k) be the sum of M(n,k) for 1 \le n \le u-k+1. You are given that S(1000,10)=17176. Find S(100\,000\,000, 100\,000).
25,494
Let F_5(n) be the number of strings s such that: s consists only of '0's and '1's, s has length at most n, and s contains a palindromic substring of length at least 5. For example, F_5(4) = 0, F_5(5) = 8, F_5(6) = 42 and F_5(11) = 3844. Let D(L) be the number of integers n such that 5 \le n \le L and F_5(n) is divisib...
25,495
Let f_k(n) be the sum of the k th powers of the first n positive integers. For example, f_2(10) = 1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2 + 7^2 + 8^2 + 9^2 + 10^2 = 385. Let S_k(n) be the sum of f_k(i) for 1 \le i \le n. For example, S_4(100) = 35375333830. What is \sum (S_{10000}(10^{12}) \bmod p) over all primes p between ...
25,496
Alice and Bob have enjoyed playing Nim every day. However, they finally got bored of playing ordinary three-heap Nim. So, they added an extra rule: - Must not make two heaps of the same size. The triple (a, b, c) indicates the size of three heaps. Under this extra rule, (2,4,5) is one of the losing positions for the ne...
25,497
Let G(a, b) be the smallest non-negative integer n for which \operatorname{\mathbf{gcd}} Greatest common divisor (n^3 + b, (n + a)^3 + b) is maximized. For example, G(1, 1) = 5 because \gcd(n^3 + 1, (n + 1)^3 + 1) reaches its maximum value of 7 for n = 5, and is smaller for 0 \le n \lt 5. Let H(m, n) = \sum G(a, b) for...
25,498
There are n stones in a pond, numbered 1 to n. Consecutive stones are spaced one unit apart. A frog sits on stone 1. He wishes to visit each stone exactly once, stopping on stone n. However, he can only jump from one stone to another if they are at most 3 units apart. In other words, from stone i, he can reach a stone ...
25,499