task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Given a non-square integer d, any real x can be approximated arbitrarily close by quadratic integers a+b\sqrt{d}, where a,b are integers. For example, the following inequalities approximate \pi with precision 10^{-13}: 4375636191520\sqrt{2}-6188084046055 < \pi < 721133315582\sqrt{2}-1019836515172 We call BQA_d(x,n) th... | 25,600 |
For any N, let f(N) be the last twelve hexadecimal digits before the trailing zeroes in N!. For example, the hexadecimal representation of 20! is 21C3677C82B40000, so f(20) is the digit sequence 21C3677C82B4. Find f(20!). Give your answer as twelve hexadecimal digits, using uppercase for the digits A to F. | 25,601 |
We define two sequences S = \{S(1), S(2), ..., S(n)\} and S_2 = \{S_2(1), S_2(2), ..., S_2(n)\}: S(k) = (p_k)^k \bmod 10007 where p_k is the kth prime number. S_2(k) = S(k) + S(\lfloor\frac{k}{10000}\rfloor + 1) where \lfloor \cdot \rfloor denotes the floor function. Then let M(i, j) be the median of elements S_2(i) th... | 25,602 |
For a polygon P, let t(P) be the number of ways in which P can be tiled using rhombi and squares with edge length 1. Distinct rotations and reflections are counted as separate tilings. For example, if O is a regular octagon with edge length 1, then t(O) = 8. As it happens, all these 8 tilings are rotations of one anoth... | 25,603 |
A deck of cards numbered from 1 to n is shuffled randomly such that each permutation is equally likely. The cards are to be sorted into ascending order using the following technique: Look at the initial sequence of cards. If it is already sorted, then there is no need for further action. Otherwise, if any subsequence... | 25,604 |
Let T(r) be the number of integer quadruplets x, y, z, t such that x^2 + y^2 + z^2 + t^2 \le r^2. In other words, T(r) is the number of lattice points in the four-dimensional hyperball of radius r. You are given that T(2) = 89, T(5) = 3121, T(100) = 493490641 and T(10^4) = 49348022079085897. Find T(10^8) \bmod 10000000... | 25,605 |
The Torpids are rowing races held annually in Oxford, following some curious rules: A division consists of n boats (typically 13), placed in order based on past performance. All boats within a division start at 40 metre intervals along the river, in order with the highest-placed boat starting furthest upstream. The boa... | 25,606 |
Consider the number 48. There are five pairs of integers a and b (a \leq b) such that a \times b=48: (1,48), (2,24), (3,16), (4,12) and (6,8). It can be seen that both 6 and 8 have 4 divisors. So of those five pairs one consists of two integers with the same number of divisors. In general: Let C(n) be the number of pai... | 25,607 |
The well-known Rubik's Cube puzzle has many fascinating mathematical properties. The 2×2×2 variant has 8 cubelets with a total of 24 visible faces, each with a coloured sticker. Successively turning faces will rearrange the cubelets, although not all arrangements of cubelets are reachable without dismantling the puzzle... | 25,608 |
Let H(n) be the number of distinct integer sided equiangular convex hexagons with perimeter not exceeding n. Hexagons are distinct if and only if they are not congruent . You are given H(6) = 1, H(12) = 10, H(100) = 31248. Find H(55106). Equiangular hexagons with perimeter not exceeding 12 | 25,609 |
For every positive number n we define the function \mathop{streak}(n)=k as the smallest positive integer k such that n+k is not divisible by k+1. E.g: 13 is divisible by 1 14 is divisible by 2 15 is divisible by 3 16 is divisible by 4 17 is NOT divisible by 5 So \mathop{streak}(13) = 4. Similarly: 120 is divisible by 1... | 25,610 |
Alice enlists the help of some friends to generate a random number, using a single unfair coin. She and her friends sit around a table and, starting with Alice, they take it in turns to toss the coin. Everyone keeps a count of how many heads they obtain individually. The process ends as soon as Alice obtains a Head. At... | 25,611 |
Let S(n) be the sum of all contiguous integer-substrings that can be formed from the integer n. The substrings need not be distinct. For example, S(2024) = 2 + 0 + 2 + 4 + 20 + 02 + 24 + 202 + 024 + 2024 = 2304. Let P(n) be the integer formed by concatenating the first n primes together. For example, P(7) = 2357111317.... | 25,612 |
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 ... | 25,613 |
Consider an n-player game played in consecutive pairs: Round 1 takes place between players 1 and 2, round 2 takes place between players 2 and 3, and so on and so forth, all the way up to round n, which takes place between players n and 1. Then round n+1 takes place between players 1 and 2 as the entire cycle starts aga... | 25,614 |
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, ... | 25,615 |
Frodo and Sam need to travel 100 leagues due East from point A to point B. On normal terrain, they can cover 10 leagues per day, and so the journey would take 10 days. However, their path is crossed by a long marsh which runs exactly South-West to North-East, and walking through the marsh will slow them down. The marsh... | 25,616 |
Let D(m,n)=\displaystyle\sum_{d\mid m}\sum_{k=1}^n\sigma_0(kd) where d runs through all divisors of m and \sigma_0(n) is the number of divisors of n. You are given D(3!,10^2)=3398 and D(4!,10^6)=268882292. Find D(200!,10^{12}) \bmod (10^9 + 7). | 25,617 |
For every n \ge 1 the prime-counting function \pi(n) is equal to the number of primes
not exceeding n. E.g. \pi(6)=3 and \pi(100)=25. We say that a sequence of integers u = (u_0,\cdots,u_m) is a \pi sequence if u_n \ge 1 for every n u_{n+1}= \pi(u_n) u has two or more elements For u_0=10 there are three distinct \pi s... | 25,618 |
A random generator produces a sequence of symbols drawn from the set { I , V , X , L , C , D , M , # }. Each item in the sequence is determined by selecting one of these symbols at random, independently of the other items in the sequence. At each step, the seven letters are equally likely to be selected, with probabili... | 25,619 |
Peter moves in a hallway with N + 1 doors consecutively numbered from 0 through N. All doors are initially closed. Peter starts in front of door 0, and repeatedly performs the following steps: First, he walks a positive square number of doors away from his position. Then he walks another, larger square number of doors ... | 25,620 |
Let's call two numbers friend numbers if their representation in base 10 has at least one common digit. E.g. 1123 and 3981 are friend numbers. Let f(n) be the number of pairs (p,q) with 1\le p \lt q \lt n such that p and q are friend numbers. f(100)=1539. Find f(10^{18}) \bmod 1000267129. | 25,621 |
Dave is doing his homework on the balcony and, preparing a presentation about Pythagorean triangles, has just cut out a triangle with side lengths 30cm, 40cm and 50cm from some cardboard, when a gust of wind blows the triangle down into the garden. Another gust blows a small ant straight onto this triangle. The poor an... | 25,622 |
An integer partition of a number n is a way of writing n as a sum of positive integers. Partitions that differ only by the order of their summands are considered the same. We call an integer partition special if 1) all its summands are distinct, and 2) all its even summands are also divisible by 4. For example, the spe... | 25,623 |
Consider the natural numbers having at least 5 prime factors, which don't have to be distinct. Sorting these numbers by size gives a list which starts with: 32=2 \cdot 2 \cdot 2 \cdot 2 \cdot 2 48=2 \cdot 2 \cdot 2 \cdot 2 \cdot 3 64=2 \cdot 2 \cdot 2 \cdot 2 \cdot 2 \cdot 2 72=2 \cdot 2 \cdot 2 \cdot 3 \cdot 3 80=2 \c... | 25,624 |
Alice plays the following game, she starts with a list of integers L and on each step she can either: remove two elements a and b from L and add a^b to L or conversely remove an element c from L that can be written as a^b, with a and b being two integers such that a, b > 1, and add both a and b to L For example startin... | 25,625 |
For two integers n,e \gt 1, we define an (n,e)-MPS (Mirror Power Sequence) to be an infinite sequence of integers (a_i)_{i\ge 0} such that for all i\ge 0, a_{i+1} = \min(a_i^e,n-a_i^e) and a_i \gt 1. Examples of such sequences are the two (18,2)-MPS sequences made of alternating 2 and 4. Note that even though such a se... | 25,626 |
Consider the numbers 15, 16 and 18: 15=3\times 5 and 3+5=8. 16 = 2\times 2\times 2\times 2 and 2+2+2+2=8. 18 = 2\times 3\times 3 and 2+3+3=8. 15, 16 and 18 are the only numbers that have 8 as sum of the prime factors (counted with multiplicity). We define S(k) to be the sum of all numbers n where the sum of the prime f... | 25,627 |
For a set of positive integers \{a, a+1, a+2, \dots , b\}, let C(a,b) be the number of non-empty subsets in which the product of all elements is a perfect square. For example C(5,10)=3, since the products of all elements of \{5, 8, 10\}, \{5, 8, 9, 10\} and \{9\} are perfect squares, and no other subsets of \{5, 6, 7, ... | 25,628 |
A circle C of circumference c centimetres has a smaller circle S of circumference s centimetres lying off-centre within it. Four other distinct circles, which we call "planets", with circumferences p, p, q, q centimetres respectively (p<q), are inscribed within C but outside S, with each planet touching both C and S ta... | 25,629 |
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 triangul... | 25,630 |
A riffle shuffle is executed as follows: a deck of cards is split into two equal halves, with the top half taken in the left hand and the bottom half taken in the right hand. Next, the cards are interleaved exactly, with the top card in the right half inserted just after the top card in the left half, the 2nd card in t... | 25,631 |
The lambda-calculus is a universal model of computation at the core of functional programming languages. It is based on lambda-terms , a minimal programming language featuring only function definitions, function calls and variables. Lambda-terms are built according to the following rules: Any variable x (single letter,... | 25,632 |
An unbiased coin is tossed repeatedly until two consecutive heads are obtained. Suppose these occur on the (M-1)th and Mth toss. Let P(n) be the probability that M is divisible by n. For example, the outcomes HH, HTHH, and THTTHH all count towards P(2), but THH and HTTHH do not. You are given that P(2) =\frac 3 5 and P... | 25,633 |
G(N)=\sum_{j=1}^N\sum_{i=1}^j \gcd(i,j). You are given: G(10)=122. Find G(10^{11}). Give your answer modulo 998244353. | 25,634 |
A binary matrix is a matrix consisting entirely of 0s and 1s. Consider the following transformations that can be performed on a binary matrix: Swap any two rows Swap any two columns Flip all elements in a single row (1s become 0s, 0s become 1s) Flip all elements in a single column Two binary matrices A and B will be co... | 25,635 |
Consider the set S of all possible products of n positive integers not exceeding m, that is S=\{ x_1x_2\cdots x_n \mid 1 \le x_1, x_2, \dots, x_n \le m \}. Let F(m,n) be the number of the distinct elements of the set S. For example, F(9, 2) = 36 and F(30,2)=308. Find F(30, 10001) \bmod 1\,000\,000\,007. | 25,636 |
A position in chess is an (orientated) arrangement of chess pieces placed on a chessboard of given size. In the following, we consider all positions in which n pawns are placed on a n \times n
board in such a way, that there is a single pawn in every row and every column. We call such a position an open position, if... | 25,637 |
Alice and Bob are playing a modified game of Nim called Scatterstone Nim, with Alice going first, alternating turns with Bob. The game begins with an arbitrary set of stone piles with a total number of stones equal to n. During a player's turn, he/she must pick a pile having at least 2 stones and perform a split operat... | 25,638 |
Given a set, L, of unique lines, let M(L) be the number of lines in the set and let S(L) be the sum over every line of the number of times that line is crossed by another line in the set. For example, two sets of three lines are shown below: In both cases M(L) is 3 and S(L) is 6: each of the three lines is crossed by ... | 25,639 |
Let (p_1 p_2 \ldots p_k) denote the permutation of the set {1, ..., k} that maps p_i\mapsto i. Define the length of the permutation to be k; note that the empty permutation () has length zero. Define an occurrence of a permutation p=(p_1 p_2 \cdots p_k) in a permutation P=(P_1 P_2 \cdots P_n) to be a sequence 1\leq t_1... | 25,640 |
For an integer n, we define the square prime factors of n to be the primes whose square divides n. For example, the square prime factors of 1500=2^2 \times 3 \times 5^3 are 2 and 5. Let C_k(N) be the number of integers between 1 and N inclusive with exactly k square prime factors. You are given some values of C_k(N) in... | 25,641 |
For an integer n, we define the square prime factors of n to be the primes whose square divides n. For example, the square prime factors of 1500=2^2 \times 3 \times 5^3 are 2 and 5. Let C_k(N) be the number of integers between 1 and N inclusive with exactly k square prime factors. It can be shown that with growing N th... | 25,642 |
Define F(n) to be the number of integers x≤n that can be written in the form x=a^2b^3, where a and b are integers not necessarily different and both greater than 1. For example, 32=2^2\times 2^3 and 72=3^2\times 2^3 are the only two integers less than 100 that can be written in this form. Hence, F(100)=2. Further you ... | 25,643 |
Let A_q(n) be the number of subsets, B, of the set \{1, 2, ..., q \cdot n\} that satisfy two conditions: 1) B has exactly n elements; 2) the sum of the elements of B is divisible by n. E.g. A_2(5)=52 and A_3(5)=603. Let S_q(L) be \sum A_q(p) where the sum is taken over all primes p \le L. E.g. S_2(10)=554, S_2(100) mod... | 25,644 |
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... | 25,645 |
Given any positive integer n, we can construct a new integer by inserting plus signs between some of the digits of the base B representation of n, and then carrying out the additions. For example, from n=123_{10} (n in base 10) we can construct the four base 10 integers 123_{10}, 1+23=24_{10}, 12+3=15_{10} and 1+2+3=... | 25,646 |
Let P_{a,b} denote a path in a a\times b lattice grid with following properties: The path begins at (0,0) and ends at (a,b). The path consists only of unit moves upwards or to the right; that is the coordinates are increasing with every move. Denote A(P_{a,b}) to be the area under the path. For the example of a P_{4,3}... | 25,647 |
A multiplicative function f(x) is a function over positive integers satisfying f(1)=1 and f(a b)=f(a) f(b) for any two coprime positive integers a and b. For integer k let f_k(n) be a multiplicative function additionally satisfying f_k(p^e)=p^k for any prime p and any integer e>0. For example, f_1(2)=2, f_1(4)=2, f_1(1... | 25,648 |
Bob plays a single-player game of chance using two standard 6-sided dice and twelve cards numbered 1 to 12. When the game starts, all cards are placed face up on a table. Each turn, Bob rolls both dice, getting numbers x and y respectively, each in the range 1,...,6. He must choose amongst three options: turn over card... | 25,649 |
Consider a row of n dice all showing 1. First turn every second die, (2,4,6,\ldots), so that the number showing is increased by 1. Then turn every third die. The sixth die will now show a 3. Then turn every fourth die and so on until every nth die (only the last die) is turned. If the die to be turned is showing a 6 th... | 25,650 |
Let f(n) be the largest prime factor of n and \displaystyle F(n) = \sum_{i=2}^n f(i). For example F(10)=32, F(100)=1915 and F(10000)=10118280. Find F(201820182018). Give your answer modulus 10^9. | 25,651 |
Two positive integers a and b are 2-friendly when \gcd(a,b) = 2^t, t \gt 0. For example, 24 and 40 are 2-friendly because \gcd(24,40) = 8 = 2^3 while 24 and 36 are not because \gcd(24,36) = 12 = 2^2\cdot 3 not a power of 2. Let f(n) be the number of pairs, (p,q), of positive integers with 1\le p\lt q\le n such that p a... | 25,652 |
Sam and Tom are trying a game of (partially) covering a given line segment of length L by taking turns in placing unit squares onto the line segment. As illustrated below, the squares may be positioned in two different ways, either "straight" by placing the midpoints of two opposite sides on the line segment, or "diago... | 25,653 |
On planet J, a year lasts for D days. Holidays are defined by the two following rules. At the beginning of the reign of the current Emperor, his birthday is declared a holiday from that year onwards. If both the day before and after a day d are holidays, then d also becomes a holiday. Initially there are no holidays. L... | 25,654 |
Let n be a natural number and p_1^{\alpha_1}\cdot p_2^{\alpha_2}\cdots p_k^{\alpha_k} its prime factorisation. Define the Liouville function \lambda(n) as \lambda(n) = (-1)^{\sum\limits_{i=1}^{k}\alpha_i}. (i.e. -1 if the sum of the exponents \alpha_i is odd and 1 if the sum of the exponents is even. ) Let S(n,L,H) b... | 25,655 |
It is possible to find positive integers A and B such that given any triangular number, T_n, then AT_n +B is always a triangular number. We define F_3(N) to be the sum of (A+B) over all such possible pairs (A,B) with \max(A,B)\le N. For example F_3(100) = 184. Polygonal numbers are generalisations of triangular numbers... | 25,656 |
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, ... | 25,657 |
Alice and Bob are taking turns playing a game consisting of c different coins on a chessboard of size n by n. The game may start with any arrangement of c coins in squares on the board. It is possible at any time for more than one coin to occupy the same square on the board at the same time. The coins are distinguishab... | 25,658 |
Let B(n) = \displaystyle \prod_{k=0}^n {n \choose k}, a product of binomial coefficients. For example, B(5) = {5 \choose 0} \times {5 \choose 1} \times {5 \choose 2} \times {5 \choose 3} \times {5 \choose 4} \times {5 \choose 5} = 1 \times 5 \times 10 \times 10 \times 5 \times 1 = 2500. Let D(n) = \displaystyle \sum_{... | 25,659 |
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 supp... | 25,660 |
Consider the values of \log_2(8), \log_4(64) and \log_3(27). All three are equal to 3. Generally, the function f(m,n)=\log_m(n) over integers m,n \ge 2 has the property that f(m_1,n_1)=f(m_2,n_2) if \, m_1=a^e, n_1=a^f, m_2=b^e,n_2=b^f \, for some integers a,b,e,f \, \, or \, m_1=a^e, n_1=b^e, m_2=a^f,n_2=b^f \, for s... | 25,661 |
Consider a horizontal frictionless tube with length L millimetres, and a diameter of 20 millimetres. The east end of the tube is open, while the west end is sealed. The tube contains N marbles of diameter 20 millimetres at designated starting locations, each one initially moving either westward or eastward with common ... | 25,662 |
Let T(n, m) be the number of m-tuples of positive integers such that the sum of any two neighbouring elements of the tuple is \le n. For example, T(3, 4)=8, via the following eight 4-tuples: (1, 1, 1, 1) (1, 1, 1, 2) (1, 1, 2, 1) (1, 2, 1, 1) (1, 2, 1, 2) (2, 1, 1, 1) (2, 1, 1, 2) (2, 1, 2, 1) You are also given that T... | 25,663 |
The numbers 545, 5\,995 and 15\,151 are the three smallest palindromes divisible by 109. There are nine palindromes less than 100\,000 which are divisible by 109. How many palindromes less than 10^{32} are divisible by 10\,000\,019\, ? | 25,664 |
Given an irrational number \alpha, let S_\alpha(n) be the sequence S_\alpha(n)=\lfloor {\alpha \cdot n} \rfloor - \lfloor {\alpha \cdot (n-1)} \rfloor for n \ge 1. (\lfloor \cdots \rfloor is the floor-function.) It can be proven that for any irrational \alpha there exist infinitely many values of n such that the subseq... | 25,665 |
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 \Sig... | 25,666 |
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 \Sig... | 25,667 |
Consider the sequence n^2+3 with n \ge 1. If we write down the first terms of this sequence we get: 4, 7, 12, 19, 28, 39, 52, 67, 84, 103, 124, 147, 172, 199, 228, 259, 292, 327, 364, \dots . We see that the terms for n=6 and n=7 (39 and 52) are both divisible by 13. In fact 13 is the largest prime dividing any two su... | 25,668 |
We call an integer sided triangle n-pandigital if it contains one angle of 120 degrees and, when the sides of the triangle are written in base n, together they use all n digits of that base exactly once. For example, the triangle (217, 248, 403) is 9-pandigital because it contains one angle of 120 degrees and the sides... | 25,669 |
Two friends A and B are great fans of Chess. They both enjoy playing the game, but after each game the player who lost the game would like to continue (to get back at the other player) and the player who won would prefer to stop (to finish on a high). So they come up with a plan. After every game, they would toss a (bi... | 25,670 |
Alice walks on a lattice grid. She can step from one lattice point A (a,b) to another B (a+x,b+y) providing distance AB = \sqrt{x^2+y^2} is a Fibonacci number \{1,2,3,5,8,13,\ldots\} and x\ge 0, y\ge 0. In the lattice grid below Alice can step from the blue point to any of the red points. Let F(W,H) be the number of p... | 25,671 |
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_... | 25,672 |
Peter is playing a solitaire game on an infinite checkerboard, each square of which can hold an unlimited number of tokens. Each move of the game consists of the following steps: Choose one token T to move. This may be any token on the board, as long as not all of its four adjacent squares are empty. Select and discard... | 25,673 |
Two players play a game with two piles of stones, alternating turns. On each turn, the corresponding player chooses a positive integer n and does one of the following: removes n stones from one pile; removes n stones from both piles; or removes n stones from one pile and 2n stones from the other pile. The player who re... | 25,674 |
Members of a species of bacteria occur in two different types: \alpha and \beta. Individual bacteria are capable of multiplying and mutating between the types according to the following rules: Every minute, each individual will simultaneously undergo some kind of transformation. Each individual A of type \alpha will, i... | 25,675 |
After buying a Gerver Sofa from the Moving Sofa Company , Jack wants to buy a matching cocktail table from the same company. Most important for him is that the table can be pushed through his L-shaped corridor into the living room without having to be lifted from its table legs. Unfortunately, the simple square model o... | 25,676 |
A positive integer is called square root smooth if all of its prime factors are strictly less than its square root. Including the number 1, there are 29 square root smooth numbers not exceeding 100. How many square root smooth numbers are there not exceeding 10\,000\,000\,000? | 25,677 |
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 respect... | 25,678 |
A certain type of tile comes in three different sizes - 1 \times 1, 1 \times 2, and 1 \times 3 - and in four different colours: blue, green, red and yellow. There is an unlimited number of tiles available in each combination of size and colour. These are used to tile a 2\times n rectangle, where n is a positive integer... | 25,679 |
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 positiv... | 25,680 |
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\x... | 25,681 |
At Euler University, each of the n students (numbered from 1 to n) occupies a bed in the dormitory and uses a desk in the classroom. Some of the beds are in private rooms which a student occupies alone, while the others are in double rooms occupied by two students as roommates. Similarly, each desk is either a single d... | 25,682 |
We define the \mathcal{I} operator as the function
\[\mathcal{I}(x,y) = (1+x+y)^2+y-x\]
and \mathcal{I}-expressions as arithmetic expressions built only from variable names and applications of \mathcal{I}. A variable name may consist of one or more letters. For example, the three expressions x, \mathcal{I}(x,y), and \m... | 25,683 |
Let \omega(n) denote the number of distinct prime divisors of a positive integer n. So \omega(1) = 0 and \omega(360) = \omega(2^{3} \times 3^{2} \times 5) = 3. Let S(n) be \sum_{d \mid n} 2^{\omega(d)} . E.g. S(6) = 2^{\omega(1)}+2^{\omega(2)}+2^{\omega(3)}+2^{\omega(6)} = 2^0+2^1+2^1+2^2 = 9. Let F(n)=\sum_{i=2}^n... | 25,684 |
Let d(i,b) be the digit sum of the number i in base b. For example d(9,2)=2, since 9=1001_2.
When using different bases, the respective digit sums most of the time deviate from each other, for example d(9,4)=3 \ne d(9,2). However, for some numbers i there will be a match, like d(17,4)=d(17,2)=2.
Let M(n,b_1,b_2) be th... | 25,685 |
Let g(n) be the number of undirected graphs with n nodes satisfying the following properties: The graph is connected and has no cycles or multiple edges. Each node is either red, blue, or yellow. A red node may have no more than 4 edges connected to it. A blue or yellow node may have no more than 3 edges connected to i... | 25,686 |
If a triple of positive integers (a, b, c) satisfies a^2+b^2=c^2, it is called a Pythagorean triple. No triple (a, b, c) satisfies a^e+b^e=c^e when e \ge 3 (Fermat's Last Theorem). However, if the exponents of the left-hand side and right-hand side differ, this is not true. For example, 3^3+6^3=3^5. Let a, b, c, e, f ... | 25,687 |
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... | 25,688 |
Let N and K be two positive integers. F_n is the n-th Fibonacci number: F_1 = F_2 = 1, F_n = F_{n - 1} + F_{n - 2} for all n \geq 3. Let s_n = F_{2n - 1} \bmod N and let t_n = F_{2n} \bmod N. Start with an array of integers A = (A[0], \cdots, A[N - 1]) where initially every A\text{[}i] is equal to i.
Now perform K succ... | 25,689 |
Given positive integers a \le b \le c \le d, it may be possible to form quadrilaterals with edge lengths a,b,c,d (in any order). When this is the case, let M(a,b,c,d) denote the maximal area of such a quadrilateral. For example, M(2,2,3,3)=6, attained e.g. by a 2\times 3 rectangle. Let SP(n) be the sum of a+b+c+d over ... | 25,690 |
5-smooth numbers are numbers whose largest prime factor doesn't exceed 5. 5-smooth numbers are also called Hamming numbers. Let \Omega(a) be the count of prime factors of a (counted with multiplicity). Let s(a) be the sum of the prime factors of a (with multiplicity). For example, \Omega(300) = 5 and s(300) = 2+2+3+5+5... | 25,691 |
Consider the following variant of "The Chase" game. This game is played between n players sitting around a circular table using two dice. It consists of n-1 rounds, and at the end of each round one player is eliminated and has to pay a certain amount of money into a pot. The last player remaining is the winner and rece... | 25,692 |
Define s(n) to be the smallest number that has a digit sum of n. For example s(10) = 19. Let \displaystyle S(k) = \sum_{n=1}^k s(n). You are given S(20) = 1074. Further let f_i be the Fibonacci sequence defined by f_0=0, f_1=1 and f_i=f_{i-2}+f_{i-1} for all i \ge 2. Find \displaystyle \sum_{i=2}^{90} S(f_i). Give your... | 25,693 |
Writing down the numbers which have a digit sum of 10 in ascending order, we get:
19, 28, 37, 46,55,64,73,82,91,109, 118,\dots Let f(n,m) be the m^{\text{th}} occurrence of the digit sum n. For example, f(10,1)=19, f(10,10)=109 and f(10,100)=1423. Let \displaystyle S(k)=\sum_{n=1}^k f(n^3,n^4). For example S(3)=7128 an... | 25,694 |
2^7=128 is the first power of two whose leading digits are "12". The next power of two whose leading digits are "12" is 2^{80}. Define p(L, n) to be the nth-smallest value of j such that the base 10 representation of 2^j begins with the digits of L. So p(12, 1) = 7 and p(12, 2) = 80. You are also given that p(123, 45) ... | 25,695 |
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 t... | 25,696 |
We stack n plates into k non-empty piles where each pile is a different size. Define f(n,k) to be the maximum number of plates possible in the smallest pile. For example when n = 10 and k = 3 the piles 2,3,5 is the best that can be done and so f(10,3) = 2. It is impossible to divide 10 into 5 non-empty differently-size... | 25,697 |
For 0 \le x \lt 1, define d_i(x) to be the ith digit after the binary point of the binary representation of x. For example d_2(0.25) = 1, d_i(0.25) = 0 for i \ne 2. Let f(x) = \displaystyle{\sum_{i=1}^{\infty}\frac{d_i(x)}{i^2}}. Let p(a) be probability that f(x) \gt a, given that x is uniformly distributed between 0 a... | 25,698 |
Tom (the cat) and Jerry (the mouse) are playing on a simple graph G. Every vertex of G is a mousehole, and every edge of G is a tunnel connecting two mouseholes. Originally, Jerry is hiding in one of the mouseholes. Every morning, Tom can check one (and only one) of the mouseholes. If Jerry happens to be hiding there t... | 25,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.