Nemotron-IMO-Bench / data /test.jsonl
igitman's picture
Add Nemotron-IMO-Bench test split (200 problems) and dataset card
ce50797 verified
Raw History Blame Contribute Delete
315 kB
{"id":"A1","problem":"Prove that for all positive integers $n$\n$$\\sum_{k=0}^n \\frac{2^{2^k+k+1}}{2^{2^k}+3^{2^k}}<4.$$","proof":"Let $x_k=(3/2)^{2^k}-1$, so that $$x_k(x_k+2)=(x_k+1)^2-1=x_{k+1}.$$\n It follows that\n $$\\frac{2^{2^k+k+1}}{2^{2^k}+3^{2^k}}=\\frac{2^{k+1}}{(3/2)^{2^k}+1}=\\frac{2^{k+1}}{x_k+2}=$$\n $$\\frac{2^{k+1}}{x_k}-\\frac{2^{k+2}}{x_k(x_k+2)}=\\frac{2^{k+1}}{x_k}-\\frac{2^{k+2}}{x_{k+1}}.$$\n Thus \n $$\\sum_{k=0}^n \\frac{2^{2^k+k+1}}{2^{2^k}+3^{2^k}}=\\frac{2}{x_0}-\\frac{2^{n+2}}{x_{n+1}}<\\frac{2}{x_0}=4.$$","subject":"algebra"}
{"id":"A2","problem":"Let $m,n\\geq 2$ be integers and let $f\\in \\mathbb{R}[X_1,...,X_n]$ be a polynomial such that \n$$f(x_1,\\dots, x_n)=\\left\\lfloor \\frac{x_1+\\dots + x_n}{m} \\right\\rfloor,\\,\\, \\quad \\forall\\,\\, x_1,\\dots, x_n\\in \\{0,1,\\dots, m-1\\}.$$\nProve that the total degree of $f$ is at least $n$.","proof":"We start by considering the Lagrange interpolation polynomial $g$ for which $g(x)=\\lfloor x/m\\rfloor$ for $x=0,1,...,n(m-1)$, i.e. the unique polynomial of degree not exceeding $n(m-1)$ satisfying the previous equalities. Thus $f(x_1,...,x_n)=g(x_1+...+x_n)$ for \n $x_1,...,x_n\\in \\{0,1,...,m-1\\}$. Since $g(0)=0=g(1)$ and $g(m)=1$, it is clear that $\\deg(g)\\geq 2$, and the key lemma below shows that $\\deg(f)\\geq \\deg(g)$. It suffices to prove that $\\deg(g)\\geq n$. But the polynomial $g(X+m)-g(X)-1$ is nonzero (its degree is $\\deg(g)-1$) and vanishes at $0, 1,..., n(m-1)-m$, thus it has degree at least $(n-1)(m-1)$ and then \n $\\deg(g)\\geq 1+(n-1)(m-1)\\geq 1+n-1=n$. \n \n It remains to prove the following key lemma, in which we set $[a]:=\\{0,1,...,a\\}$ for all nonnegative integers $a$.\n \n \\begin{lemma}\n Let $a_1,...,a_n$ be nonnegative integers and let $G\\in \\mathbb{R}[X]$ be a nonzero polynomial with $\\deg(G)\\leq a_1+...+a_n$. If $F\\in \\mathbb{R}[X_1,...,X_n]$ satisfies $F(x_1,...,x_n)=G(x_1+...+x_n)$ for $(x_1,...,x_n)\\in [a_1]\\times...\\times [a_n]$, then \n $\\deg F\\geq \\deg G$.\n \\end{lemma}\n \n \\begin{proof}\n We argue by induction on $\\deg(G)$, the case $\\deg(G)=0$ being clear since then $F(0,...,0)=G(0)\\ne 0$ forces $\\deg(F)\\geq 0$. Suppose now that $\\deg(G)>0$ and that the result holds for polynomials of degree smaller than $\\deg(G)$. We may assume that \n $a_1>0$. Consider the polynomials \n $$F_1(X_1,...,X_n)=F(X_1+1, X_2,...,X_n)-F(X_1,...,X_n)\\,\\, G_1(X)=G(X+1)-G(X).$$\n Note that $\\deg(G_1)=\\deg(G)-1\\leq a_1-1+a_2+...+a_n$ and $G_1$ is nonzero since $G$ is not constant. Moreover for \n $(x_1,...,x_n)\\in [a_1-1]\\times [a_2]\\times...\\times [a_n]$ we have \n $F_1(x_1,...,x_n)=G_1(x_1,...,x_n)$. Thus by the inductive hypothesis $\\deg(F_1)\\geq \\deg G_1=\\deg G-1$. But then it is clear that $\\deg F\\geq 1+\\deg G-1=\\deg G$, as desired.","subject":"algebra"}
{"id":"A3","problem":"Prove that for all positive real numbers $a,b,c,d$\n$$\\frac{a+b}{1+c}\\cdot \\frac{b+c}{1+d}\\cdot \\frac{c+d}{1+a}\\cdot \\frac{d+a}{1+b}\\geq \\frac{16abcd}{(1+\\sqrt[4]{abcd})^4}.$$","proof":"The key observation is that \n $$\\frac{x+y}{(1+x)(1+y)}\\geq \\frac{2\\sqrt{xy}}{(1+\\sqrt{xy})^2}$$\n for all $x,y>0$. Indeed, writing this in the form \n $$\\frac{x+y}{2\\sqrt{xy}}-1\\geq \\frac{1+x+y+xy}{(1+\\sqrt{xy})^2}-1$$\n it becomes equivalent to\n $$\\frac{(\\sqrt{x}-\\sqrt{y})^2}{2\\sqrt{xy}}\\geq \\frac{(\\sqrt{x}-\\sqrt{y})^2}{(1+\\sqrt{xy})^2},$$\n which is obvious. \n Apply this observation twice, with $(x,y)=(a,b)$ and $(x,y)=(c,d)$. We obtain\n $$\\frac{a+b}{1+c}\\cdot \\frac{b+c}{1+d}\\cdot \\frac{c+d}{1+a}\\cdot \\frac{d+a}{1+b}=\\frac{a+b}{(1+a)(1+b)}\\cdot \n \\frac{c+d}{(1+c)(1+d)}\\cdot (b+c)(a+d)$$\n $$\\geq \\frac{4\\sqrt{abcd}}{(1+\\sqrt{ab})^2 (1+\\sqrt{cd})^2}\\cdot (\\sqrt{ab}+\\sqrt{cd})^2,$$\n where we also use the Cauchy-Schwarz inequality in the form $$(b+c)(a+d)\\geq (\\sqrt{ab}+\\sqrt{cd})^2.$$ It suffices therefore to prove that \n $$\\frac{\\sqrt{ab}+\\sqrt{cd}}{(1+\\sqrt{ab})(1+\\sqrt{cd})}\\geq \\frac{2\\sqrt[4]{abcd}}{(1+\\sqrt[4]{abcd})^2}.$$\n But this is yet another application of the key observation, with $x=\\sqrt{ab}$ and $y=\\sqrt{cd}$.","subject":"algebra"}
{"id":"A4","problem":"Let $n>1$ be an integer. Two polynomials $P,Q\\in \\mathbb{R}[X]$ are called block-similar if for each $i \\in \\{1, 2, \\ldots, n\\}$ the sequences\n$$P(2015i), P(2015i - 1), \\ldots, P(2015i - 2014) \\,\\, \\text{and}\\,\\, \nQ(2015i), Q(2015i - 1), \\ldots, Q(2015i - 2014)$$\nare permutations of each other.\n\n(a) Prove that there exist distinct block-similar polynomials of degree $n+1$.\n\n(b) Prove that there do not exist distinct block-similar polynomials of degree $n$.","proof":"For simplicity set $k=2015$. Part a) is fairly easy, since one easily checks that setting $$P(X)=X(X-k)(X-2k)...(X-nk),\\,\\, Q(X)=P(X-1)$$\n yields distinct block-similar polynomials of degree $n+1$. Part b) is much harder and will require some preparation. Suppose that \n $P\\ne Q$ are block-similar, of degree $n$. If $f\\in \\mathbf{R}[X]$ we let \n $$\\Delta f(X)=f(X)-f(X-1).$$\n If $f$ is non constant, then $\\Delta f$ has degree $\\deg(f)-1$. On the other hand, we let $\\Sigma_f$ be the unique polynomial such that $\\Sigma_f(0)=0$ and $$\\Sigma_f(n)=f(1)+...+f(n)$$\n for all $n\\geq 1$. The existence of such a polynomial and the fact that it has degree $1+\\deg(f)$ (except when $f=0$) is a standard result. We have $\\Delta (\\Sigma_f)=f$: it suffices to check that the values at all positive integers $n$ agree, which is clear by definition of $\\Sigma_f$.\n \n Now let \n $$A=P-Q,\\,\\, B=P+Q.$$\n By assumption $\\Sigma_A$ and $\\Sigma_{AB=P^2-Q^2}$ vanish at $0, k, 2k,..., nk$, since \n $P(1),..., P(ik)$ is a permutation of $Q(1),...,Q(ik)$ for $1\\leq i\\leq n$ and so they have the same sum and the same sum of squares. \n \n This motivates the study of those nonzero polynomials $F$ for which $\\Sigma_F$ vanishes at $0,k,...,nk$, i.e. for which \n $C(X):=X(X-k)...(X-nk)$ divides $\\Sigma_F(X)$. If $\\deg(F)<n$ then $\\Sigma_F$ has degree at most $n$ and so must be zero, but then $F$ must be zero as well, a contradiction. Thus $\\deg(F)\\geq n$. Write $\\Sigma_F(X)=C(X)U(X)$, then \n $\\deg U=\\deg(F)+1-(n+1)=\\deg (F)-n$ and by the preliminary discussion $F=\\Delta(\\Sigma_F)=\\Delta(CU)$.\n \n Take $F=A$ in the previous paragraph and keep the notations introduced there. By assumption $F\\ne 0$, $\\deg (F)\\leq n$ and also\n $\\deg(F)\\geq n$, thus $\\deg(F)=n$ and so $U$ is constant. Thus $A=c\\Delta C$ for some nonzero constant $c$. Now take \n $F=AB$ and suppose that $B$ is non constant. Then $\\deg F\\in (n, 2n]$ and $AB=F=\\Delta(CU)$ with $\\deg(U)\\in [1, n]$. A simple computation shows that $\\Delta(CU)\\equiv C\\Delta U\\pmod {\\Delta C}$. Since $A=c\\Delta C$, taking the equality \n $AB=\\Delta(CU)$ modulo $\\Delta C$ yields $\\Delta C\\mid C\\cdot \\Delta U$. On the other hand \n $\\gcd(\\Delta C, C)=\\gcd(C(X), C(X-1))=1$, thus $\\Delta C\\mid \\Delta U$, which is impossible for degree reasons. Thus \n $B$ is constant, say equal to $b$.\n Replacing $P$ and $Q$ by $\\frac{2P-b}{c}$ and $\\frac{2Q-b}{c}$ (which have the same properties as $P$ and \n $Q$), we may therefore assume that $P=-Q$ and $P=\\Delta C$. \n \n Consider now the sequence $P(1),...,P(k)$ and let us focus on the nonnegative terms. Since $-P(1),...,-P(k)$ is a permutation of \n $P(1),...,P(k)$, we know that there are as many positive as negative terms in the sequence. On the other hand, there is a unique change of sign in this sequence: one easily checks that $P(ik-k+1)=C(ik-k+1)$ and $P(ik)=-C(ik-1)$ have opposite signs, thus \n $P$ has a root between $ik-k+1$ and $ik$ for $1\\leq i\\leq n$, and for degree reasons it must have exactly one root in each of these intervals, proving that there is a unique sign change in the sequence $P(1),...,P(k)$. Since $k$ is odd, the only possibility is that the middle term is $0$, i.e. $P((k+1)/2)=0$, or $C((k+1)/2)=C((k-1)/2)$. But it is easy to check that \n $|C((k+1)/2)|<|C((k-1)/2)|$, yielding the desired contraction.","subject":"algebra"}
{"id":"A5","problem":"Find all periodic sequences $a_1,a_2,...$ of real numbers such that \n$|a_{n+1}-a_n|\\leq 1$ and $$a_{n+2}+a_n^2=a_n+a_{n+1}^2$$\nfor all $n\\geq 1$.","proof":"Let $x_n=a_n+a_{n+1}$, so that the recurrence relation becomes $$x_{n+1}=x_n(a_{n+1}-a_n+1).$$\n We will discuss two cases. If there is some $k$ with $x_k=0$ then $x_n=0$ for $n\\geq k$ and since \n $(x_n)$ is periodic (because $(a_n)$ is so), it follows that $x_n=0$ for all $n$ and so the sequence $(a_n)$ is of the form $x, -x, x, -x,...$ with $|x|\\leq 1/2$. All such sequences are solutions.\n Suppose now that all $x_n$ are nonzero. Let $T$ be the period of the sequence $(a_n)$. Then the above relations yield\n $$\\prod_{n=1}^{T} (a_{n+1}-a_n+1)=\\prod_{n=1}^T \\frac{x_{n+1}}{x_n}=1.$$\n On the other hand by assumption each $a_{n+1}-a_n+1$ is nonnegative and they add up to $T$ by periodicity of \n $(a_n)$. Since their product equals $1$, by the AM-GM inequality the only possibility is that each of these factors equals $1$, thus $a_1=a_2=...=a_T$ and the sequence is constant. Conversely, any constant sequence is a solution.\n Thus there are two types of solutions: constant sequences and sequences of the form \n $x,-x,x,-x,...$ with $|x|\\leq 1/2$.","subject":"algebra"}
{"id":"A6","problem":"Prove that for any polynomial $f\\in \\mathbb{R}[X]$ of degree greater than $1$ there are infinitely many positive integers $m$ for which the equation $$f(n+1)+f(n+2)+...+f(n+k)=m$$\nhas no solutions in positive integers $n,k$.","proof":"Let $d=\\deg(f)\\geq 2$ and let $a$ be the leading coefficient of $f$. If $a<0$ there is $N$ such that $f(x)<0$ for $x>N$. If \n $m,n,k$ are positive integers with $f(n+1)+...+f(n+k)=m$ then $n<N$ and $m\\leq f(n+1)+...+f(N)$, thus we are done. Thus we may assume that $a>0$. Choose $C>0$ such that $f(x)\\geq \\frac{a}{2}x^d$ for $x>C$. Take now a large integer $N$ and let us estimate the number of \n positive integers $m$ not exceeding $m$ for which the equation is solvable. For any solution $(n,k)$ with $n>C$ \n we must have \n $$N\\geq m=f(n+1)+...+f(n+k)\\geq \\frac{a}{2}(n+1)^d+...+\\frac{a}{2}(n+k)^d\\geq \\frac{a}{2}\\cdot \\max (kn^2, 1^2+...+k^2).$$\n The condition $1^2+...+k^2<2N/a$ forces $k<c\\sqrt[3]{N}$ for some constant $c$ depending only on $a$, and similarly (by letting \n $c$ get a bit smaller) the condition $N\\geq kn^2 a/2\\geq n^2 a/2$ forces $n<c\\sqrt{N}$. \n This means that at most $c^2N^{1/2+1/3}$ numbers between $1$ and $N$ can be represented in the form \n $f(n+1)+...+f(n+k)$ with $n>C$ and $k$ a positive integer. For $1\\leq j\\leq \\lfloor C\\rfloor$ we still need to consider solutions of the equation \n $f(j+1)+...+f(j+k)=m\\leq N$. If $k>C$, then $$N\\geq f(j+k)+f(j+1)+...+f(\\lfloor C\\rfloor)\\geq \\frac{a}{2} k^2+\\min_{1\\leq j\\leq \\lfloor C\\rfloor} f(j+1)+...+f(\\lfloor C\\rfloor),$$\n yielding a bound $k\\leq c' \\sqrt{N}$ for some constant $c'$. If $k\\leq C$ we have only a constant amount of integers $m$, which we can safely neglect. Thus the positive integers $m$ representable in this way cover a set with at most $\\lfloor C\\rfloor c'\\sqrt{N}$ elements and in total, for large enough $N$, at most $c_2 \\sqrt{N}+c_1 N^{1/2+1/3}$ positive integers between $1$ and $m$ are representable, finishing the proof.","subject":"algebra"}
{"id":"A7","problem":"Find the maximal value of\n\\[S = \\sqrt[3]{\\frac{a}{b+7}} + \\sqrt[3]{\\frac{b}{c+7}} + \\sqrt[3]{\\frac{c}{d+7}} + \\sqrt[3]{\\frac{d}{a+7}},\\]where $a$, $b$, $c$, $d$ are nonnegative real numbers which satisfy $a+b+c+d = 100$.","proof":"We will prove that \\[ S \\le \\frac{8}{\\sqrt[3]{7}} \\]. Note that we have equality for $(a,b,c,d)=(49, 1, 49, 1)$.\nThe shortest and trickiest proof is to observe that \\[\\sqrt[3]{\\frac{7a}{64(b+7)}}\\leq \\frac{1}{3}\\left(\\frac{a+7}{64}+\\frac{a}{a+7}+\\frac{7}{b+7}\\right)\\]\nWriting down similar inequalities for the other terms in $S$ and adding them yields the result.\n For a somewhat more natural approach note that Holder's inequality yields\n $$S\\leq \\sqrt[3]{\\sum\\frac{a}{a+7}\\sum\\frac{1}{b+7}\\sum (a+7)}.$$\n Letting $x=\\sum\\frac{1}{a+7}$, we have (thanks to AM-GM)\n $$\\sqrt[3]{\\sum\\frac{a}{a+7}\\sum\\frac{1}{b+7}\\sum(a+7)}=\\sqrt[3]{128 x(4-7x)}\\leq \\sqrt[3]{128\\cdot 4/7}=8/\\sqrt[3]{7}.$$","subject":"algebra"}
{"id":"A8","problem":"Find the smallest real number $C>1$ with the following property: for any integer $n>1$ and any non-integers \n$a_1,...,a_n>0$ with $\\sum_{i=1}^n 1/a_i=1$ there are positive integers $b_i\\in \\{\\lfloor a_i\\rfloor, \\lfloor a_i\\rfloor+1\\}$ such that \n$1<\\sum_{i=1}^n 1/b_i\\leq C$.","proof":"Take a large positive integer $n$ and set $a_1=2-\\frac{1}{2n-1}$ and $a_i=2n-1-\\frac{1}{2}$ for $2\\leq i\\leq n$. We must have \n $b_1\\in \\{1,2\\}$, $b_i\\in \\{2n-2, 2n-1\\}$ for $2\\leq i\\leq n$. We can't have $b_1=2$, since otherwise $\\sum_{i=1}^n 1/b_i$ would not exceed \n $1/2+\\frac{n-1}{2n-2}=1$, thus $b_1=1$ and \n $$C\\geq 1+\\frac{n-1}{2n-1}.$$\n Since this holds for arbitrarily large $n$, we must have $C\\geq 3/2$. Next, we prove that $C=3/2$ has the desired property. Thus let \n $a_1,...,a_n>0$ be non-integers with $\\sum_{i=1}^n 1/a_i=1$ and let $x_k=\\lfloor a_k\\rfloor$. Define \n $$c_k=\\frac{1}{x_1}+...+\\frac{1}{x_k}+\\frac{1}{x_{k+1}+1}+...+\\frac{1}{x_n+1}.$$\n Then $c_0<...<c_n$ and $1=1/a_1+...+1/a_n$ is between $c_0$ and $c_n$, thus there is a unique \n $k$ with $c_{k-1}<1<c_k$. Set $b_i=x_i$ for $i\\leq k$ and $b_i=x_i+1$ for $i>k$. Then \n $$1/b_1+...+1/b_n=c_k$$\n and $c_k>1$, while \n $$c_k=c_{k-1}+\\frac{1}{x_k(x_k+1)}<1+1/2=3/2.$$","subject":"algebra"}
{"id":"A9","problem":"Find all functions $f: \\{1,2,...\\}\\to \\mathbb{Z}$ such that for all positive integers $m,n$ we have \n $$\\lfloor f(mn)/n\\rfloor=f(m).$$","proof":"One easily checks (using the identity $\\lfloor \\frac{\\lfloor x\\rfloor}{n}\\rfloor=\\lfloor \\frac{x}{n}\\rfloor$) that all functions of the form \n $f(n)=\\lfloor nx\\rfloor$ or $f(n)=\\lceil nx\\rceil-1$ are solutions of the problem. We will prove that these are all solutions. By assumption \n $$\\lfloor f(n!(n+1))/(n+1)\\rfloor=f(n!),$$\n thus $$x_n\\leq x_{n+1}<x_n+1/n!,$$\n where\n $x_n=f(n!)/n!$. Since $\\sum_{n} 1/n!<\\infty$, the sequence $(x_n)$ must converge to some real number $x$, and $x_n\\leq x_{n+1}\\leq x$ for all $n$. Suppose that there is $k$ with $x_k=x$, then $x_n=x$ for $n\\geq k$. Let $m$ be a positive integer and pick $\\ell>k$ large enough such that $\\ell!=mn$ for some positive integer $n$. The functional equation yields $f(m)=\\lfloor x_l m\\rfloor=\\lfloor mx\\rfloor$. Thus $f$ is one of the solutions already found. \n \n Suppose now that $x_k<x$ for all $k$. Let $m$ be a positive integer. Pick $\\ell$ large enough such that \n $\\ell!=mn$ for some positive integer $n$, and $|x-x_{\\ell}|<a/m$, where $a=1$ if $mx$ is an integer and \n $a=\\{mx\\}$ otherwise. Then as above \n $$f(m)=\\lfloor mx_{\\ell}\\rfloor=\\lfloor mx-(x-x_{\\ell})m\\rfloor$$\n and the inequality $|x-x_{\\ell}|<a/m$ forces $f(m)=\\lceil mx\\rceil-1$. Thus $f$ is again one of the solutions already found.","subject":"algebra"}
{"id":"A10","problem":"Find all functions $f: (1,\\infty)\\to (1,\\infty)$ such that whenever $x,y>1$ satisfy $x^2\\leq y\\leq x^3$ we have \n$f(x)^2\\leq f(y)\\leq f(x)^3$.","proof":"It is clear that for all $k>0$ the function $f(x)=x^k$ is a solution, and we will prove that these are the only solutions. \nDefine $g: (0,\\infty)\\to (0,\\infty)$ by $g(x)=\\ln f(e^x)$. Then $2x\\leq y\\leq 3x$ (with $x,y>0$) forces $2g(x)\\leq g(y)\\leq 3g(x)$. \nIn particular $g(2x)\\geq 2g(x)$ and $g(3x)\\leq 3g(x)$ for all $x>0$. Thus if $a>0$ and $m,n$ are positive integers, we have \n$$g(3^ma/2^n)\\leq f(3^m a)/2^n\\leq 3^mg(a)/2^n.$$\nSince $\\log_2 3$ is irrational, by Kronecker's theorem the set of numbers of the form $3^m/2^n$ with $m,n$ positive integers is dense in $(0,\\infty)$. Unfortunately we don't know that $g$ is continuous, so we need to work harder. We will prove instead that \n$g$ is increasing. Otherwise there are $x>y$ with $g(x)\\leq g(y)$. For all positive integers $m,n$ we then have \n$$g(3^nx)/3^n\\leq g(x)\\leq g(y)\\leq g(2^m y)/2^m$$\nthus $g(2^my)/g(3^nx)\\geq 2^m/3^n$. Using the above density result, we can choose $m,n$ such that \n$3x/y>2^m/3^n>\\max(3, 2x/y)$. Then $2^my/(3^nx)$ is between $2$ and $3$, so by assumption \n$g(2^my)/g(3^nx)$ is between $2$ and $3$ as well, but it is greater than $2^m/3^n$, which is greater than $3$, a contradiction. \nThus $g$ is increasing. Next we prove that $g(x)\\leq xg(1)$ for all $x>0$, and a similar argument will show that $g(x)\\geq xg(1)$ for all \n$x>0$. We have already seen that $g(3^m/2^n)\\leq 3^mg(1)/2^n$ for positive integers $m,n$. Pick a sequence $(a_k)$ whose terms are of the form $3^m/2^n$ and which converges to $x$, all of whose terms being greater than $x$. Then $g(x)\\leq g(a_k)\\leq a_k g(1)$ for all $k$, which shows that $g(x)\\leq xg(1)$, as desired.","subject":"algebra"}
{"id":"A11","problem":"Is there a sequence of pairs of real numbers $(x_n, y_n)_{n\\geq 1}$ such that for any sequence \n $(b_n)_{n\\geq 1}$ of real numbers there is a polynomial $f\\in \\mathbb{R}[X,Y]$ with $f(x_n, y_n)=b_n$ for all $n$?","proof":"Suppose that such a sequence exists and note that it is unbounded, for otherwise the sequence $(f(x_n, y_n))_{n\\geq 1}$ would be bounded for any $f\\in \\mathbb{R}[X,Y]$. Let $z_n=1+\\max(|x_n|, |y_n|)$. By assumption there is $f\\in \\mathbb{R}[X,Y]$ with \n $f(x_n, y_n)=2^{z_n}$ for all $n$. Let $d=\\deg(f)$ and observe that there is a constant $c$ such that $|f(x,y)|\\leq c(1+|x|+|y|)^d$ for all real numbers $x,y$, since for any monomial $a x^i y^j $ appearing in $f$ we have $i+j\\leq d$, and $$|ax^i y^j |\\leq |a|\\cdot (1+|x|+|y|)^{i+j}\\leq |a|\n (1+|x|+|y|)^d.$$\n Thus $$2^{z_n}=|f(x_n, y_n)|\\leq c(1+|x_n|+|y_n|)^d\\leq c(2z_n)^d$$\n for all $n$. But since $(z_n)_{n\\geq 1}$ is unbounded, this is clearly impossible.","subject":"algebra"}
{"id":"A12","problem":"Find all functions $f: \\mathbb{Q}[X]\\to \\mathbb{Q}[X]$ such that \n $f(P)+f(Q)=f(P+Q)$ for all $P,Q\\in \\mathbb{Q}[X]$ and such that \n $\\gcd(P, f(P))=1$ if and only if $P$ is squarefree.","proof":"It is easy to see that any function of the form $f(P)=AP+bP'$ with $b\\in \\mathbb{Q}$ nonzero and \n $A\\in \\mathbb{Q}[X]$ is a solution of the problem. We will prove that these are the only solutions. Let \n $f$ be a solution and note that $f$ is actually $\\mathbb{Q}$-linear. Let $P_n=f(X^n)\\in \\mathbb{Q}[X]$. By linearity of \n $f$, it suffices to prove that there is a nonzero constant $b$ such that $P_n(X)=X^n P_0(X)+nbX^{n-1}$ for all \n $n\\geq 1$. For $n>1$ and $a\\in \\mathbf{Q}$ by assumption $f((X-a)^n)$ must vanish at $a$, yielding \n $$\\sum_{k=0}^n (-1)^{n-k}\\binom{n}{k} a^{n-k} P_k(a)=0.$$\n Since this holds for all rational numbers $a$, it holds for all real numbers $a$ as well. Using this identity and induction, we obtain \n $$P_n(X)=nX^{n-1}P_1(X)-(n-1)X^n P_0(X)$$\n for all $n$. Thus if we prove that $F(X):=P_1(X)-XP_0(X)$ is a nonzero constant, then we are done. Note that if $F=0$ then \n the above relation yields $P_n(X)=X^n P_0(X)$ and by linearity $f(P)=P_0 P$ for all $P$, which obviously is not a solution of the problem. \n Suppose that $F(z)=0$ for some complex number $z$. Since $F$ has rational coefficients, there is an irreducible polynomial \n $Q$ with rational coefficients vanishing at $z$ (the minimal polynomial of $z$). The condition $P_1(z)=zP_0(z)$ yields \n $P_n(z)=z^n P_0(z)$ for all $n$ and then by linearity of $f$ we deduce that $f(Q)$ vanishes at $z$. In particular\n $\\gcd(Q, f(Q))\\ne 1$, yet $Q$ is irreducible, in particular squarefree. This contradiction shows that \n $F$ never vanishes, so it is a nonzero rational number.","subject":"algebra"}
{"id":"A13","problem":"Prove that for all real numbers $x,y,z$\n $$(x+y+z)^2+\\sum \\frac{(y+x)(y+z)}{1+|x-z|}\\geq xy+yz+zx.$$","proof":"With the substitutions $y+z=2a, z+x=2b, x+y=2c$ the inequality is equivalent to \n $$a^2+b^2+c^2+2\\sum \\frac{ab}{1+2|a-b|}\\geq 0$$\n for all real numbers $a,b,c$. We will actually prove that \n the second sum is already nonnegative. Renaming $2a, 2b, 2c$ into $a,b,c$, it suffices to check that \n $$\\sum \\frac{ab}{1+|a-b|}\\geq 0$$\n for all real numbers $a,b,c$.\n \n Observe that for all $t\\in [0,1]$ we have \n $$abt^{|a-b|}\\geq ab t^{|a|+|b|}.$$\n Indeed, if $ab\\leq 0$ then $|a-b|=|a|+|b|$ and we have equality, otherwise this simply follows from $|a-b|\\leq |a|+|b|$. Thus \n $$\\frac{ab}{1+|a-b|}=ab\\int_0^1 t^{|a-b|}dt\\geq ab\\int_0^1 t^{|a|+|b|}dt$$\n and so \n $$\\sum \\frac{ab}{1+|a-b|}\\geq \\sum \\int_0^1 a t^{|a|} b t^{|b|}dt=\\int_0^1 (\\sum a t^{|a|})^2 dt\\geq 0.$$","subject":"algebra"}
{"id":"A14","problem":"Let $n\\geqslant 2$ be an integer. Prove that for any positive real numbers $a_1, a_2,\\ldots, a_n$, \\[\\frac{1}{2\\sqrt{2}}\\sum_{i=1}^{n}2^{i}a_i^2 \\geqslant\\sum_{1 \\leqslant i < j \\leqslant n}a_i a_j.\\]","proof":"We use AM-GM in a slightly tricky way: for $i<j$ we have \n$$a_i^2 \\cdot \\frac{1}{2^{j-i-1}}+a_j^2 \\cdot \\frac{1}{2^{i-j}}\\ge 2a_ia_j\\cdot \\sqrt{2}.$$\nAdding these inequalities yields \n$$\\frac{1}{2\\sqrt{2}}\\cdot \\sum_{i=1}^{n} a_i^2\\cdot \\sum_{j=1}^{n-1} \\frac{1}{2^{j-i}}\\ge \\sum_{i<j} a_ia_j.$$\nSince $\\sum_{j=1}^{n-1} \\frac{1}{2^{j}}<1$, the result follows.","subject":"algebra"}
{"id":"A15","problem":"The first derivative of an infinite sequence $(a_n)_{n\\geq 1}$ is the sequence $(a'_n)_{n\\geq 1}$ with $a'_n=a_{n+1}-a_n$ for $n\\geq 1$. Define the $k$th derivative as the first derivative of the $(k-1)$th derivative for $k\\geq 2$. Say the sequence $(a_n)_{n\\geq 1}$ is good if the sequence itself and all of its derivatives consist of positive numbers. Prove that if $(a_n)_{n\\geq 1}$ and $(b_n)_{n\\geq 1}$ are good sequences, then so is the sequence $(a_nb_n)_{n\\geq 1}$.","proof":"Write $a^{(k)}$ for the $k$th derivative of the sequence $a$ (with the convention that $a^{(0)}=a$). Since \n $$a_{i+1}b_{i+1}-a_ib_i=(a_{i+1}-a_i)(b_{i+1}-b_i)+a_i(b_{i+1}-b_i)+b_i(a_{i+1}-a_i),$$\n we have $(ab)'=a'b'+a'b+ab'$ for any sequences $a,b$. It is also clear that taking derivatives is a linear operations. \n Let $a,b$ be two good sequences. We will prove by strong induction that for all \n $k\\geq 0$ the sequence $(ab)^{(k)}$ is a finite positive linear combination of the sequences \n $a^{(i)}b^{(j)}$ with $i,j\\geq 0$. This is clear for $k=0$, so assume that \n $$(ab)^{(k)}=\\sum_{i,j\\geq 0} c_{i,j} a^{(i)} b^{(j)}$$\n for some nonnegative constants $c_{i,j}$, almost all equal to $0$. Then by the above remarks \n $$(ab)^{(k+1)}=\\sum_{i,j\\geq 0} c_{i,j} ( a^{(i+1)}b^{(j+1)}+a^{(i)}b^{(j+1)}+a^{(i+1)}b^{(j)}),$$\n yielding the inductive step. It is now clear that $ab$ is a good sequence as well.","subject":"algebra"}
{"id":"A16","problem":"Prove that for all positive real numbers $a,b,c$ $$\\frac{b+c}{a^2}+\\frac{c+a}{b^2}+\\frac{a+b}{c^2}+\\frac{45}{a+b+c}\\geq \\frac{7}{a}+\\frac{7}{b}+\\frac{7}{c}.$$","proof":"We may assume that $a+b+c=1$. The inequality is equivalent to \n$$\\frac{1}{a^2}+\\frac{1}{b^2}+\\frac{1}{c^2}+45\\geq \\frac{8}{a}+\\frac{8}{b}+\\frac{8}{c},$$\nor $$\\sum a^2b^2-abc+abc(1-3\\sum ab)\\geq 5abc(\\sum ab-9abc).$$ Using the identities\n$$\\sum a^2b^2-abc=\\sum a^2b^2-abc(a+b+c)=\\sum \\frac{a^2}{2}(b-c)^2,$$\n$$1-3\\sum ab=(\\sum a)^2-3\\sum ab=\\sum \\frac{(a-b)^2}{2}$$\nand \n$$\\sum ab-9abc=(\\sum a)(\\sum ab)-9abc=\\sum a(b-c)^2,$$\nwe can rewrite the inequality in the form $$x(b-c)^2+y(c-a)^2+z(a-b)^2\\geq 0$$ with \n$$x=\\frac{a^2+abc}{2}-5a^2bc, \\,\\, y=\\frac{b^2+abc}{2}-5ab^2c, \\,\\, z=\\frac{c^2+abc}{2}-5abc^2.$$\nIt suffices to check that $x,y,z\\geq 0$, and by symmetry only that $x\\geq 0$, or equivalently $$a+bc\\geq 10abc.$$ But \n$$a+bc\\geq 2\\sqrt{abc}\\geq 10abc,$$ since $$abc\\leq (a+b+c)^3/27=1/27.$$","subject":"algebra"}
{"id":"A17","problem":"Let $n\\geq 2$, and let $a_1,...,a_n$ be positive real numbers such that there are real numbers $c,d$ and $b_1,...,b_n$ with $$\\sum_{i=1}^n \\lfloor a_ix+b_i\\rfloor=\\lfloor cx+d\\rfloor$$ for all $x\\in \\mathbb{R}$. Prove that $a_1,...,a_n$ are not pairwise distinct.","proof":"Since the left-hand side is unbounded, we must have $c\\ne 0$. Replacing $x$ by $\\frac{x-d}{c}$ and the \n$a_i$'s by $a_i/c$ (and $b_i$ by $b_i-a_id/c$), we may assume that $c=1$ and $d=0$. \nLet $f_i(x)=\\lfloor a_ix+b_i\\rfloor$. Then $f_i$ is non-degreasing and increases by $1$ if $x$ belongs to an arithmetic progression of common difference $1/a_i$. Since $\\lfloor x\\rfloor$ increases by $1$ at all positive integers, each $d_i:=1/a_i$ must be a positive integer and the corresponding arithmetic progressions must form a partition of $\\mathbb{Z}$. But it is classical that if finitely many arithmetic progressions partition the integers, then two must have the same common difference, finishing the proof.","subject":"algebra"}
{"id":"A18","problem":"Find the largest real number $k$ such that for all positive real numbers $a,b,c,d$ with $ab+bc+cd+da=1$ $$\\frac{1}{a^2}+\\frac{1}{b^2}+\\frac{1}{c^2}+\\frac{1}{d^2}-4\\geq k(a^2+b^2+c^2+d^2-4).$$","proof":"If $k$ has this property, by taking $b=d=x$, $c=1$ and $a=(2-x)/x$ with $x>0$ very small yields $k\\leq 1/2$. Next, we show that \n$k=1/2$ has the required property. Let $a,b,c,d$ be as in the statement and write $$a+c=2x,\\, \\, b+d=2y,$$ where without loss of generality\n$x\\ge y$. Let $$p=ac\\,\\, \\text{and}\\,\\, q=bd$$ and note that $x^2\\geq p$, $y^2\\geq q$ and by assumption $xy=1$, thus $y\\leq 1$ and $q\\leq 1$. Rewrite the inequality in the form \n$$\\frac{2(a^2+c^2)}{p^2}+(b^2+d^2)(\\frac{2}{q^2}-1)\\geq a^2+c^2+4.$$\nNote that $$(b^2+d^2)(\\frac{2}{q^2}-1)\\geq 2y^2(\\frac{2}{q^2}-1)\\geq \\frac{4}{y^2}-2y^2=4x^2-2y^2,$$\nsince $y^2\\geq q$. Since $a^2+c^2=4x^2-2p$, it suffices to prove that \n$$\\frac{a^2+c^2}{p^2}-y^2\\geq -p+2,$$\nwhich follows from $a^2+c^2\\geq 2p$, $y^2=1/x^2\\leq 1/p$ and $p+1/p\\geq 2$.","subject":"algebra"}
{"id":"A19","problem":"Let $a_1, a_2, \\dots$ and $b_1, b_2, \\dots$ be sequences of real numbers for which $a_1 > b_1$ and $$a_{n+1}= a_n^2 - 2b_n,\\,\\, \\quad b_{n+1}= b_n^2 - 2a_n$$ for all positive integers $n$. Prove that $a_1, a_2, \\dots$ is eventually increasing, i.e. there exists a positive integer $N$ for which $a_k < a_{k+1}$ for all $k > N$.","proof":"Choose complex numbers $x,y,z$ such that $$xyz=1, \\quad a_1=x+y+z,\\quad b_1=1/x+1/y+1/z,$$ namely the roots of the polynomial \n$$p(t)=t^3-a_1t^2+b_1t-1.$$ A simple induction then shows that $$a_n=x^{2^{n-1}}+y^{2^{n-1}}+z^{2^{n-1}}$$ and \n$$b_n=x^{-2^{n-1}}+y^{-2^{n-1}}+z^{-2^{n-1}}$$ for all $n$. Note that since $p(1)<0$ by assumption, $p$ has a root greater than $1$. We may assume that \n$x$ is the largest real root of $p$, so $x>1$. If $y$ and $z$ are both real, then clearly $(a_n)$ is eventually increasing. Otherwise \n$y$ and $z$ are complex conjugate and each has magnitude $1/\\sqrt{x}<1$, thus $|a_n-x^{2^{n-1}}|<2$ and so clearly for \n$n$ large enough $a_{n+1}>a_n$.","subject":"algebra"}
{"id":"A20","problem":"Let $f, g:\\mathbb{Z}\\rightarrow [0,\\infty )$ be two functions such that $f(n)=g(n)=0$ for all but finitely many $n$. Define $h:\\mathbb{Z}\\rightarrow [0,\\infty )$ by \\[h(n)=\\max \\{f(n-k)g(k): k\\in\\mathbb{Z}\\}.\\] Let $p$ and $q$ be two positive reals such that $1/p+1/q=1$. Prove that \\[ \\sum_{n\\in\\mathbb{Z}}h(n)\\geq \\Bigg(\\sum_{n\\in\\mathbb{Z}}f(n)^p\\Bigg)^{1/p}\\Bigg(\\sum_{n\\in\\mathbb{Z}}g(n)^q\\Bigg)^{1/q}.\\]","proof":"Set \n$$\\|f\\|_{\\infty} = \\max_{i\\in \\mathbb{Z}}|f(i)|$$\nand for $p<\\infty$ set \n$$\\|f\\|_{p} = \\left( \\sum_{i\\in \\mathbb{Z}} |f(i)|^p \\right)^{\\frac{1}{p}}.$$\nA first key remark is that \n$$\\sum_{n\\in\\mathbb{Z}}h(n) \\geq \\|f\\|_{\\infty} \\|g\\|_1\\,\\, \\text{and}\\,\\, \\sum_{n\\in\\mathbb{Z}}h(n) \\geq \\|g\\|_{\\infty} \\|1\\|_1.$$\nIndeed, if $\\|f\\|_{\\infty}=f(k)$ for some $k$ (which certainly exists since $f$ has finite support), then \n$h(n)\\geq f(k)g(n-k)$ for all $n$, and summing over all $n$ yields the first inequality, the second being proved in the same way (or by exchanging the roles of \n$f$ and $g$).\n\nSince $1/p+1/q=1$, by the above inequalities we obtain (by weighted AM-GM) \n$$\\sum_{n\\in\\mathbb{Z}}h(n) \\geq \\frac{1}{q} \\|f\\|_{\\infty} \\|g\\|_1 + \\frac{1}{p} \\|g\\|_{\\infty} \\|f\\|_1 \\geq \\left( \\|f\\|_{\\infty} \\|g\\|_1 \\right)^{\\frac{1}{q}} \\left( \\|g\\|_{\\infty} \\|f\\|_1 \\right)^{\\frac{1}{p}}.$$\n\nIt suffices therefore to prove that \n$$\\|f\\|_{\\infty}^{\\frac{1}{q}} \\|f\\|_1^{\\frac{1}{p}} \\geq \\|f\\|_p\\,\\, \\text{and}\\,\\, \\|g\\|_{\\infty}^{\\frac{1}{p}} \\|g\\|_1^{\\frac{1}{q}} \\geq \\|g\\|_q .$$\nBut this is clear, since\n$$\\sum_{n\\in \\mathbb{Z}} |f(n)|^p \\leq \\|f\\|_{\\infty}^{p-1}\\|f\\|_1.$$","subject":"algebra"}
{"id":"A21","problem":"Let $P,Q\\in \\mathbb{R}[X]$ be polynomials of degree not exceeding $n$ such that $$P(X)X^{n+1}+Q(X)(X+1)^{n+1}=1.$$ What are the possible values of $Q(-1/2)$?","proof":"Note that such $P,Q$ do exist since $X^{n+1}$ and $(X+1)^{n+1}$ are relatively prime. Moreover, they are unique, for if $P_1,Q_1$ is another such pair then $$X^{n+1}(P-P_1)=(X+1)^{n+1}(Q_1-Q),$$ thus \n$X^{n+1}$ divides $Q_1-Q$ and for degree reasons we must have $Q_1=Q$ and then $P_1=P$. Next, replacing $X$ by $-1-X$ yields \n$$Q(-1-X)(-1)^{n+1}X^{n+1}+(-1)^{n+1}P(-1-X) (1+X)^{n+1}=1.$$\nApplying the uniqueness result established above to $$P_1(X):=Q(-1-X)(-1)^{n+1},\\,\\, Q_1(X):=(-1)^{n+1} P(-1-X)$$ we deduce that $$P(X)=(-1)^{n+1}Q(-1-X)$$ and $$Q(X)=(-1)^{n+1}P(-1-X).$$ Setting $X=-1/2$ then yields \n$$P(-1/2)=(-1)^{n+1}Q(-1/2).$$\nSetting $X=-1/2$ in the initial equation gives \n$$P(-1/2)(-1/2)^{n+1}+Q(-1/2)(1/2)^{n+1}=1.$$\nWe deduce that \n$$Q(-1/2)/2^{n+1}+Q(-1/2)/2^{n+1}=1$$\nand so $Q(-1/2)=2^n$ is the only possible value.","subject":"algebra"}
{"id":"A22","problem":"Let $\\{x\\}$ denote the fractional part of $x$. If $\\alpha$ is a real number such that there are only finitely many distinct numbers in the sequence $\\{\\alpha\\}, \\{\\alpha^2\\}, \\{\\alpha^3\\}, \\cdots $, prove that $\\alpha$ is an integer.","proof":"Let $x_n=\\{\\alpha^n\\}$. Since there are only finitely many distinct terms in the sequence $x_1,x_2,...$, there are only finitely many distinct pairs of numbers of the form $(x_n, x_{n+1})$, thus we can find $i<j$ with $$x_i=x_j\\,\\, \\text{and}\\,\\, x_{i+1}=x_{j+1}.$$ It follows that $$\\alpha^{j}-\\alpha^i\\,\\,\\text{and}\\,\\,\\alpha^{j+1}-\\alpha^{i+1}\\in\\mathbf{Z}.$$\n\nWe may assume that $\\alpha\\ne -1,0,1$, so that $\\alpha^i-\\alpha^j\\ne 0$. Then \n$$\\alpha=\\frac{\\alpha^{j+1}-\\alpha^{i+1}}{\\alpha^{j}-\\alpha^i}$$ is a rational number and $\\alpha^j-\\alpha^i$ is an integer. By the rational root theorem, \n$\\alpha$ must be an integer as well.","subject":"algebra"}
{"id":"A23","problem":"Find all sets $A,B\\subset\\mathbb{R}$ with the following property: if $f: A\\times B\\to \\mathbb{R}$ is a function such that $b\\mapsto f(a,b)$ is a polynomial function on $B$ for all $a\\in A$ and $a\\mapsto f(a,b)$ is a polynomial function on $A$ for all $b\\in B$, then $f$ is a polynomial function.","proof":"The answer is: at least one of $A,B$ is finite or at least one of $A,B$ is uncountable. First assume that $A$ is finite, say \n$A=\\{a_1,...,a_n\\}$. By assumption there are polynomials $P_i$ such that $f(a_i, b)=P_i(b)$ for $b\\in B$. By Lagrange interpolation we can pick polynomials \n$Q_j$ such that $Q_j(a_i)=1_{i=j}$. Then $f(a,b)=\\sum_{i=1}^n Q_i(a)P_i(b)$ for all $a\\in A$ and $b\\in B$, so $f$ is a polynomial map. \n\nNext assume that $A$ is uncountable and $B$ is infinite (if $B$ is finite we are in the setting of the previous paragraph). Choose polynomials $P_a$, say of degree $d_a$ such that $f(a, b)=P_a(b)$ for all $b\\in B$. Since $A$ is uncountable, there is a nonnegative integer $N$ such that $d_a=N$ for infinitely many $a\\in A$. For each such $a$ write $P_a(b)=\\sum_{i=0}^N c_i(a) b^i$ with $c_i(a)\\in \\mathbb{R}$. Choose pairwise distinct $b_0,...,b_N\\in B$. By Lagrange interpolation there are polynomials $Q_0,...,Q_N$ such that $Q=\\sum_{i=0}^N Q(b_i) Q_i$ for all $Q\\in \\mathbb{R}[X]$ of degree at most $N$. Thus for \n$a$ with $d_a=N$ and $b\\in B$ we have \n$$f(a,b)=P_a(b)=\\sum_{i=0}^N P_a(b_i) Q_i(b)=\\sum_{i=0}^N f(a, b_i) Q_i(b).$$\nLet $$R(a,b):=f(a,b)-\\sum_{i=0}^N f(a, b_i) Q_i(b).$$\nFor all $b\\in B$ the map $a\\mapsto R(a,b)$ is polynomial and vanishes at all $a\\in A$ with $d_a=N$, thus at infinitely many elements of $A$, thus it must be the zero map and so \n$$f(a,b)=\\sum_{i=0}^N f(a,b_i) Q_i(b)$$\nfor all $a\\in A, b\\in B$, showing that $f$ is a polynomial map since each of $a\\mapsto f(a,b_i)$ is polynomial.\n\nFinally, assume that $A$ and $B$ are both countably infinite, and enumerate their elements $a_1, a_2,...$ and $b_1,b_2,...$. \nDefine $f$ by \n$$f(a,b)=\\sum_{n\\geq 1} (a-a_1)...(a-a_n)(b-b_1)...(b-b_n),$$\nnoting that for each $a,b$ all but finitely many terms in the sum are zero. It is clear that $a\\mapsto f(a,b)$ and $b\\mapsto f(a,b)$ are polynomial functions for \nall $b\\in B$ and $a\\in A$. Since $a\\mapsto f(a,b_n)$ has degree $n-1$, it is clear that $f$ cannot be polynomial.","subject":"algebra"}
{"id":"A24","problem":"Evaluate the product $$\\sin \\frac{\\pi}{42} \\sin \\frac{5\\pi}{42}\\sin \\frac{13\\pi}{42}\\sin \\frac{17\\pi}{42}\\sin \\frac{19\\pi}{42}\\sin \\frac{31\\pi}{42}.$$","proof":"Let $P$ be the given product and note that \n$$P=\\cos \\frac{\\pi}{21} \\cos \\frac{2\\pi}{21}\\cos \\frac{4\\pi}{21}\\cos \\frac{5\\pi}{21}\\cos \\frac{8\\pi}{21}\\cos \\frac{10\\pi}{21},$$\nsince we easily see that \n$$\\sin \\frac{\\pi}{42}=\\cos \\frac{10\\pi}{21},\\, \\sin \\frac{5\\pi}{42}=\\cos \\frac{8\\pi}{21},\\, \\sin \\frac{13\\pi}{42}=\\cos \\frac{4\\pi}{21}$$\nand \n$$\\sin \\frac{17\\pi}{42}=\\cos \\frac{2\\pi}{21},\\, \\sin \\frac{19\\pi}{42}=\\cos \\frac{\\pi}{21},\\, \\sin \\frac{31\\pi}{42}=\\cos \\frac{5\\pi}{21}.$$\nLetting \n$$Q=\\sin \\frac{\\pi}{21} \\sin \\frac{2\\pi}{21}\\sin \\frac{4\\pi}{21}\\sin \\frac{5\\pi}{21}\\sin \\frac{8\\pi}{21}\\sin \\frac{10\\pi}{21},$$\nthe formula $2\\sin x\\cos x=\\sin 2x$ yields \n$$2^6 PQ=\\sin \\frac{2\\pi}{21}\\sin \\frac{4\\pi}{21}\\sin \\frac{8\\pi}{21}\\sin \\frac{10\\pi}{21}\\sin \\frac{16\\pi}{21}\\sin \\frac{20\\pi}{21}.$$\nSince $$\\sin \\frac{16\\pi}{21}=\\sin \\frac{5\\pi}{21},\\,\\, \\sin \\frac{20\\pi}{21}=\\sin \\frac{\\pi}{21},$$\nit follows that $2^6PQ=Q$. Since $Q$ is obviously nonzero, it follows that $P=1/64$.","subject":"algebra"}
{"id":"A25","problem":"Let $n$ be a positive integer. Find the largest positive integer $K_n$ for which there is a set $S=\\{z_1,z_2,\\dots,z_n\\}$ of $n$ complex numbers, stable under complex conjugation, not containing $0$ and such that $z_1^k+...+z_n^k\\leq 0$ for all $1\\leq k\\leq K_n$.","proof":"The answer is $K_n=2n-1$. It is not difficult to see that the set $S$ of solutions of the equation $z^n=-1$ has the desired properties for $K_n=2n-1$. Suppose we can find a set $S$ as in the problem such that $p_k\\leq 0$ for $1\\leq k\\leq 2n$, where \n$p_k=z_1^k+...+z_n^k$. Note that since $S$ is stable under complex conjugation the coefficients \nof the polynomial \n$$P(X)=\\prod_{i=1}^n (X-z_i)=\\sum_{k=0}^n (-1)^k s_k X^{n-k}$$\nare real. We will prove by strong induction that $(-1)^k s_k\\geq 0$ for all $k$. This is clear for $k=0,1$ since $p_1\\leq 0$. On the other hand by Newton's identities\n$$k(-1)^ks_k=\\sum_{j=1}^k(-1)^{k-j}s_{k-j}(-p_j)\\geq 0$$\nsince $(-1)^{k-j}s_{k-j}$ is nonnegative while $p_j$ is $\\leq 0$.\n\nUsing again Newton's identities, this time for $k>n$, we obtain \n$$p_k=\\sum_{j=1}^n(-1)^{j}s_j(-p_{k-j}).$$\nEvery term in the sum is nonnegative by the previous step, thus $p_k\\geq 0$. It follows that $p_k=0$ for $n<k\\leq 2n$.\nWe will prove that $p_k=0$ for $k\\leq n$ as well. Indeed, note that $s_n\\ne 0$ (since $0\\notin S$) and the identities above give\nfor $k>n$ \n\\[p_{k-n}=\\frac{(-1)^{n-1}}{s_n}\\sum_{j=0}^{n-1}(-1)^{j}s_jp_{k-j}.\\]\nUsing this identity for $k=2n-m$, one easily proved by strong induction on $m$ that $p_{n-m}=0$ for $0\\leq m\\leq n-1$. Thus \n$p_k=0$ for $1\\leq k\\leq n$, which by Newton's identities again yields $s_n=0$, a contradiction.","subject":"algebra"}
{"id":"A26","problem":"Let $n$ be an even positive integer and let $z$ be a complex number such that $z^{2^{n+1}-1}=1$. Evaluate $\\prod_{i=0}^n ({\\rm Re}(z^{2^i})-\\frac{1}{2})$.","proof":"We will prove that the desired product $P$ is always equal to $\\frac{1}{2^{n+1}}$. \nThis is obvious if $z=1$, so assume that this is not the case.\nObserve that \n$$2^{n+1}(z+z^{-1}+1)P=(z+z^{-1}+1)\\prod_{i=0}^n (z^{2^i}+z^{-2^i}-1)$$\n$$=(z^2+z^{-2}+1)\\prod_{i=1}^n (z^{2^i}+z^{-2^i}-1)=(z^4+z^{-4}+1)\\prod_{i=2}^n (z^{2^i}+z^{-2^i}-1)=$$\n$$=...=z^{2^{n+1}}+z^{-2^{n+1}}+1=z+z^{-1}+1.$$\nIf $z+z^{-1}+1=0$ then $z^2+z+1=0$ and $z^3=1$, and since $z\\ne 1$ we must have \n$3\\mid 2^{n+1}-1$, which is impossible since $n+1$ is odd.","subject":"algebra"}
{"id":"A27","problem":"Let $n\\geq 4$ and let $a_1\\geq a_2\\geq\\ldots\\geq a_n$ be real numbers such that $a_1=a_2$ and $a_{n-1}=a_n$. Prove that $$n\\sum_{i=1}^n a_ia_{i+1}\\geq (\\sum_{i=1}^n a_i)^2,$$ where $a_{n+1}=a_1$.","proof":"We may assume that $n>4$, since for $n=4$ we actually always have equality. Let \n$$x=\\frac{a_2+a_{n-1}}{2},\\,\\, y=\\frac{a_3+\\ldots+a_{n-2}}{n-4}.$$\nSince $a_1=a_2$ and $a_{n-1}=a_n$, the inequality is equivalent to \n$$n(4x^2-a_2a_{n-1}+a_2a_3+\\ldots+a_{n-2}a_{n-1})\\geq (4x+(n-4)y)^2.$$\nChebyshev's inequality yields\n$$a_2a_3+\\ldots+a_{n-2}a_{n-1}\\geq \\frac{(a_2+\\ldots+a_{n-2})(a_3+\\ldots+a_{n-1})}{n-3}=$$\n$$=\\frac{(a_2+(n-4)y)(a_{n-1}+(n-4)y)}{n-3}.$$\nThe weaker inequality\n$$4x^2-a_2a_{n-1}+\\frac{(a_2+(n-4)y)(a_{n-1}+(n-4)y)}{n-3}\\geq \\frac{(4x+(n-4)y)^2}{n}$$\nis equivalent, after brutal expansion, to \n$$4(n-3)x^2-6(n-4)xy+3(n-4)y^2\\geq na_2a_{n-1}.$$\nSince $a_2\\geq y\\geq a_{n-1}$, we have $a_2a_{n-1}\\leq 2xy-y^2$, thus it suffices to prove that \n$$4(n-3)x^2-6(n-4)xy+3(n-4)y^2\\geq n(2xy-y^2).$$\nBut this is equivalent to $(n-3)(x-y)^2\\geq 0$, which is obvious.","subject":"algebra"}
{"id":"A28","problem":"Let $n$ be a positive integer and let $a\\in (0,1)$. What is the minimal value of $x_0^2+...+x_n^2$ among all tuples $(x_0,...,x_n)$ of positive real numbers with sum $n+a$ and such that $\\sum_{i=0}^n \\frac{1}{x_i}=n+\\frac{1}{a}$?","proof":"We first prove that $x_j\\in [a, 1/a]$ for all $j$. By symmetry we may assume that $j=0$. Note that\n$$(n+a-x_0)(n+\\frac{1}{a}-x_0)=(x_1+...+x_n)(1/x_1+...+1/x_n)\\geq n^2,$$\nby Cauchy-Schwarz. Expanding and simplifying yields \n$$n(a+1/a)+2\\geq n(x_0+1/x_0)+a/x_0+x_0/a\\geq n(x_0+1/x_0)+2,$$\nwhich immediately yields $x_0\\in [a,1/a]$. \n\nNext, since $x_j\\geq a$ we have $$(x_j-a)(x_j-1)^2\\geq 0.$$ Expanding and dividing by $x_j$ we obtain \n$$x_j^2\\geq (a+2)x_j+\\frac{a}{x_j}-(2a+1).$$\nAdding up yields \n$$\\sum_{j=0}^n x_j^2\\geq n+a^2.$$\nThis value is achievable: it suffices to take one $x_j$ equal to $a$ and the others equal to $1$.","subject":"algebra"}
{"id":"A29","problem":"Let $P\\in \\mathbb{Q}[X]$ be a nonconstant irreducible polynomial of degree $n$. Prove that there are at most $n$ polynomials $Q\\in \\mathbb{Q}[X]$ of degree less than $n$ such that $P(X)$ divides $P(Q(X))$.","proof":"Since $P$ is nonconstant and irreducible, its roots $z_1,...,z_n$ are pairwise distinct. If $P(X)$ divides \n$P(Q(X))$ then $P(Q(z_1))=0$, thus $Q(z_1)=z_i$ for some $i$. Suppose that $Q_1,...,Q_{n+1}$ have rational coefficients, degree less than $n$ and $P(X)$ divides $P(Q_i(X))$. Let $Q_i(z_1)=z_{k_i}$ for $1\\leq i\\leq n+1$, with $k_i\\in \\{1,...,n\\}$. By the pigeonhole principle there are $i<j$ with $k_i=k_j$, thus $Q_i(z_1)=Q_j(z_1)$. But then $Q_i-Q_j$ is nonzero, has rational coefficients and degree less than $n$, yet it has a common root with $P$, thus $P$ divides $Q_i-Q_j$ (since $P$ is irreducible). This is obviously impossible, finishing the proof.","subject":"algebra"}
{"id":"A30","problem":"Let $m,n$ be nonnegative integers and let $a_0,\\ldots, a_m, b_0,\\ldots, b_n$ nonnegative real numbers. Let $c_k:=\\max_{i+j=k}a_ib_j.$ Prove that $$\\frac 1{m+n+1}\\sum_{k=0}^{m+n}c_k\\ge\\frac 1{(m+1)(n+1)}\\sum_{i=0}^{m}a_i\\sum_{j=0}^{n}b_j.$$","proof":"We will induct on $m+n$, the cases $m=0$ or $n=0$ being immediate. We may assume that $$\\sum_{i=0}^m a_i=\\sum_{j=0}^n b_j=1,$$ by homogeneity. Note that if \n$\\sum_{i=0}^m a_i=0$ or $\\sum_{j=0}^n b_j=0$ the inequality is clear. Applying the induction hypothesis to $a_1,...,a_m$ and $b_0,...,b_n$ we obtain \n$$\\frac{1}{m+n}\\sum_{k=1}^{m+n}c_k\\geq \\frac{1}{m(n+1)}(1-a_0)$$\nand \n$$ \\frac{1}{m+n}\\sum_{k=1}^{m+n}c_k\\geq \\frac{1}{(m+1)n}(1-b_0).$$\nIt suffices therefore to prove that \n$$a_0b_0+(m+n)\\max (\\frac{1-a_0}{m(n+1)}, \\frac{1-b_0}{n(m+1)})\\geq \\frac{m+n+1}{(m+1)(n+1)},$$\nor equivalently \n$$(m+1)(n+1)a_0b_0+(m+n)\\max (\\frac{(1-a_0)(m+1)}{m}, \\frac{(1-b_0)(n+1)}{n})\\geq m+n+1.$$\nLetting $$\\alpha=\\max (\\frac{(1-a_0)(m+1)}{m}, \\frac{(1-b_0)(n+1)}{n}),$$\nwe have $a_0\\geq 1-\\frac{m\\alpha}{m+1}$ and $b_0\\geq 1-\\frac{n\\alpha}{n+1}$, thus it suffices to check that \n$$(m+1-m\\alpha)(n+1-n\\alpha)+(m+n)\\alpha\\geq m+n+1,$$\nbut this reduces immediately to $mn(1-\\alpha)^2\\geq 0$.","subject":"algebra"}
{"id":"A31","problem":"Let $a,b,c,d$ be real numbers such that $a^2+b^2+c^2+d^2=1$. Determine the minimum value of $(a-b)(b-c)(c-d)(d-a)$, as well as all values of $(a,b,c,d)$ realizing the minimum.","proof":"We will prove that the minimum is $-1/8$, achieved for the tuple \n$$(a,b,c,d)=(\\frac{1+\\sqrt{3}}{4}, -\\frac{1+\\sqrt{3}}{4}, \\frac{1-\\sqrt{3}}{4}, -\\frac{1-\\sqrt{3}}{4}),$$\nthe tuples obtained by cyclic shifting as well the tuples obtained from these four ones by performing the operation \n$(a,b,c,d)\\mapsto (-a,-b,-c,-d)$.\n\nFirst note that the minimum exists since the condition $a^2+b^2+c^2+d^2=1$ determines a compact subset of \n$\\mathbf{R}^4$, on which $$f(a,b,c,d):=(a-b)(b-c)(c-d)(d-a)$$ is continuous. Let $(a,b,c,d)$ be a tuple achieving the minimum value of $f$. Let $$m=\\frac{a+b+c+d}{4}$$ and assume that $m\\ne 0$. A simple computation shows that \n$(a-m)^2+(b-m)^2+(c-m)^2+(d-m)^2$ is smaller than $1$: \n$$(a-m)^2+(b-m)^2+(c-m)^2+(d-m)^2=(a^2+b^2+c^2+d^2)-2m(a+b+c+d)+4m^2$$\n$$=1-8m^2+4m^2=1-4m^2<1.$$\nShifting the $a$'s by $m$ and then renormalizing so that the sum of squares becomes $1$, we obtain a new tuple with a smaller value of $f$, a contradiction. Thus $m=0$. Now set \n$$x=ac+bd,\\,\\, y=ab+cd, \\,\\, z=ad+bc.$$\nSince $a+b+c+d=0$ we have \n$$0=a^2+b^2+c^2+d^2+2(x+y+z)$$\nthus $x+y+z=-1/2$. Also \n$$2x+1=2x+a^2+b^2+c^2+d^2=(a+c)^2+(b+d)^2\\geq 0$$\nand similarly $y,z\\geq -1/2$. Then \n$$(x-y)(x-z)=(2y+z+1/2)(2z+y+1/2)=$$\n$$=\\frac{(4y+4z+1)^2-1}{8}+(y+1/2)(z+1/2)\\geq -1/8,$$\nwith equality if and only if $x=-1/4$ and $\\{y,z\\}=\\{1/4, -1/2\\}$. Coming back to our substitutions yields the result.","subject":"algebra"}
{"id":"A32","problem":"Prove that if real numbers $a,b,c,d$ add up to $2$, then \n$$ \\frac{a}{a^2-a+1}+ \\frac{b}{b^2-b+1}+ \\frac{c}{c^2-c+1}+ \\frac{d}{d^2-d+1}\\leq \\frac{8}{3}.$$","proof":"Let $$x=a-1/2,\\,\\, y=b-1/2, \\,\\, z=c-1/2, \\,\\, t=d-1/2,$$ so that $$x+y+z+t=0.$$ We need to prove that \n$$\\sum \\frac{x+2}{4x^2+3}\\leq \\frac{8}{3}.$$\nThis is equivalent to \n$$\\sum \\frac{(2x-1)^2}{4x^2+3}\\geq \\frac{4}{3}.$$\nSince \n$$4x^2=3x^2+(y+z+t)^2\\leq 3(x^2+y^2+z^2+t^2),$$\nwe have\n$$\\sum \\frac{(2x-1)^2}{4x^2+3}\\geq \\frac{\\sum (2x-1)^2}{3(1+x^2+y^2+z^2+t^2)}=\\frac{4}{3}.$$\nWe have equality if $x=y=z=t=0$ or when three of $x,y,z,t$ are $1/2$ and the other is $-3/2$.","subject":"algebra"}
{"id":"A33","problem":"Let $\\mathbf{Z}_{>0}$ be the set of positive integers. Find all functions $f:\\mathbb{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that $f(m)\\geq m$ and $$f(m+n) \\mid f(m)+f(n)$$ for all $m,n\\in \\mathbb{Z}_{>0}$.","proof":"We will prove below that $L:=\\lim_{n\\to\\infty} f(n)/n$ exists, is finite and satisfies $f(n)\\geq nL$ for all \n$n$. Pick $k$ such that $|f(n)-nL|<n/2$ for $n\\geq k$. If $m,n\\geq k$ then $f(m+n), f(m), f(n)$ are at distance less than \n$\\frac{m+n}{2}, \\frac{m}{2}, \\frac{n}{2}$ from $L(m+n), Lm, Ln$ respectively. Thus\n$$|f(m+n)-f(m)-f(n)|<m+n.$$\nOn the other hand $f(m)+f(n)=df(m+n)$ for some positive integer $d$, thus $$m+n>|d-1|f(m+n)\\geq |d-1|(m+n).$$ This forces \n$d=1$ and so $f(m+n)=f(m)+f(n)$ for $m,n\\geq k$. In particular $f(tn)=tf(n)$ for $t\\geq 1$ and $n\\geq k$. Fixing\n$n\\geq k$ and letting $t\\to\\infty$, the equality $f(n)/n=f(tn)/(tn)$ yields $f(n)=nL$. Thus $f(n)=nL$ for $n\\geq k$. In particular \n$L$ is a positive integer. If $n$ is a positive integer, then for all $m\\geq k$ we know that $$L(m+n)=f(m+n)\\mid f(m)+f(n)=mL+f(n),$$ thus $L(m+n)\\mid f(n)-nL$ and since this happens for infinitely many $m$, we must have $f(n)=nL$. Thus $f(n)=nL$ for all positive integers $n$, and all these are clearly solutions of the problem.\n\nNow let us prove the initial claim. Let $L=\\inf_{n\\geq 1} f(n)/n$. Since $f(n)\\geq n$ for all $n$, it is clear that \n$L$ is a real number $\\geq 1$ and $f(n)\\geq nL$ for all $n$. Let $\\varepsilon>0$, we need to prove that \nfor $n$ large enough $f(n)/n<L+\\varepsilon$. By definition there is $m$ with $f(m)/m<L+\\varepsilon/2$. If \n$n>m$ write $n=qm+r$ with $0\\leq r<m$, then using that $f(m+n)\\leq f(m)+f(n)$ for all $m,n$\n$$\\frac{f(n)}{n}\\leq \\frac{f(qm)+f(r)}{qm}\\leq \\frac{qf(m)+f(r)}{qm}<L+\\varepsilon/2+\\frac{\\max_{0\\leq i<m} f(i)}{n-m}$$\nand this is clearly smaller than $L+\\varepsilon$ for $n$ large enough.","subject":"algebra"}
{"id":"A34","problem":"A sequence $(x_n)_{n\\geq 1}$ of real numbers has the property that $x_1>0$ and that for all $n\\geq 1$\n$$x_{n+1}\\geq (n+2)x_n-\\sum_{k=1}^{n-1} kx_k.$$\nProve that $x_n\\geq n!x_1$ for all $n\\geq 1$.","proof":"We prove first by induction that $$x_{n+1}>\\sum_{k=1}^n kx_k$$ for all $n$. This is trivial for $n=1$ since $x_2\\geq 3x_1$ by assumption. Assume that it holds for $n$, then \n$$x_{n+2}\\geq (n+3)x_{n+1}-\\sum_{k=1}^n kx_k=(n+1)x_{n+1}+2x_{n+1}-\\sum_{k=1}^n kx_k>$$\n$$>(n+1)x_{n+1}+2\\sum_{k=1}^n kx_k-\\sum_{k=1}^n kx_k=\\sum_{k=1}^{n+1} kx_k.$$\nUsing the above inequality and the given one, we obtain \n$$x_{n+1}\\geq (n+2)x_n-\\sum_{k=1}^{n-1} kx_k>(n+2)x_n-x_n=(n+1)x_n.$$\nThis immediately yields $x_n>n! x_1$ for $n\\geq 2$.","subject":"algebra"}
{"id":"A35","problem":"Determine all polynomials $P$ with real coefficients satisfying the following condition: whenever $x$ and $y$ are real numbers such that $P(x)$ and $P(y)$ are both rational, so is $P(x + y)$.","proof":"The answer is: constant polynomials and linear polynomials with rational constant terms. It is clear that these are solutions, and it is easy to see that among polynomials of degree at most one these are the only solutions. Suppose we found a solution $P$ of degree $d\\geq 2$. Since $P$ is not constant, there is \nsome nonzero real number $\\theta$ such that $P(\\theta)$ is rational. The polynomial $Q(X)=P(\\theta X)$ has the same degree as $P$ and the same property: if $Q(x), Q(y)$ are rational then $Q(x+y)$ is rational. Thus replacing $P$ by $Q$ we may assume that $P(1)$ is rational. By assumption $P(n)$ is rational for \nall positive integers $n$, and using Lagrange interpolation (for instance) it follows that $P$ has rational coefficients. \n\nNext, we prove that there exists an irrational number $x$ such that $P(x)$ is rational. This is actually fairly standard: pick a prime $p$ which does not divide \nthe denominator of any coefficient of $P$. For a large (in magnitude, i.e. we allow negative values) integer $q$ prime to $p$ the number \n$q/p$ is in the range of $P$, so there is some real number $x$ with $P(x)=q/p$. Suppose that $x$ is rational, then necessarily $p$ must divide the denominator of $x$, but then it is not difficult to see that the denominator of $P(x)$ is divisible by $p^2$, a contradiction. Thus $x$ is not rational.\n\nFinally, using again the hypothesis we have $P(x+n)\\in \\mathbb{Q}$ for all positive integers $n$, so using Lagrange interpolation again the polynomial \n$P(x+T)$ has rational coefficients. If $P=a_d X^d+a_{d-1}X^{d-1}+...$ then the coefficient of $T^{d-1}$ in $P(x+T)$ is $a_{d-1}+dxa_d$, which is irrational, yielding the desired contradiction.","subject":"algebra"}
{"id":"A36","problem":"Let $n>1$ be an integer. Find the largest positive integer $k$ such that for all \nreal numbers $a_1\\geq a_2\\geq\\ldots\\geq a_n\\geq 0$ $$\\left(\\frac{a_1+\\ldots+a_k}{k}\\right)^2\\geq \\frac{a_1^2+\\ldots+a_n^2}{n}.$$","proof":"Taking $a_1=1$ and $a_2=\\ldots=a_n=0$ we obtain $k\\leq \\lfloor \\sqrt{n}\\rfloor$. We will prove that \nthe inequality holds for $k=\\lfloor \\sqrt{n}\\rfloor$, thus the answer is $\\lfloor \\sqrt{n}\\rfloor$. Write \n$n=k^2+i$ with $0\\leq i\\leq 2k$ and rewrite the inequality in the form\n$$(k^2+i)(a_1+\\ldots+a_k)^2\\geq k^2 \\sum_{i=1}^n a_i^2.$$\nIf $i=0$ this inequality is clear since $$(a_1+\\ldots+a_k)^2=(a_1^2+\\ldots+a_k^2)+(a_1a_2+a_1a_3+\\ldots+a_1a_k)+$$\n$$+(a_2a_3+a_2a_4+\\ldots+a_2a_k)+\\ldots+a_{k-1}a_k\\geq (a_1^2+\\ldots+a_k^2)+(a_{k+1}^2+a_{k+2}^2+\\ldots+a_{2k-1}^2)+\\ldots+a_{k^2}^2.$$\nAssume now that $i>0$ and rewrite the inequality in the form\n$$k^2((a_1+\\ldots +a_k)^2-(a_1^2+\\ldots+a_{k^2}^2))+(i (a_1+\\ldots+a_k)^2-k^2 \\sum_{j=k^2+1}^{n} a_j^2)\\geq 0.$$\nBy the above discussion the first term is nonnegative. Thus it suffices to check that \n$$i(a_1+\\ldots+a_k)^2\\geq k^2\\sum_{j=k^2+1}^{k^2+i} a_j^2.$$\nBut the right-hand side is bounded from above by $ik^2 a_{k^2+1}^2$, which is obviously bounded by \n$i(a_1+\\ldots+a_k)^2$.","subject":"algebra"}
{"id":"A37","problem":"Let $n$ be an integer greater than $1$. Find the minimum value of $$\\left( \\sum_{i=1}^n x_i^2\\right) \\left( \\sum_{i=1}^n x_i^{-2} \\right)$$ over all families of nonzero real numbers $x_1,...,x_n$ for which $x_1+...+x_n=0$.","proof":"By symmetry, we may assume that $x_1,...,x_k$ are positive and $x_{k+1},...,x_n$ are negative, for some $1\\leq k<n$. Let $m=n-k$ and $y_i=-x_{i+k}$ for $1\\leq i\\leq n-k$, so that $y_1,...,y_m$ are positive and $S:=x_1+...+x_k=y_1+...+y_m$. Note that if $z_1,...,z_c$ are positive then \n$$\\sum_{i=1}^c \\frac{1}{z_i^2}\\geq \\frac{c^3}{(z_1+...+z_c)^2},$$\nby two applications of Cauchy-Schwarz (or using Holder's inequality). Also, \n$$(\\sum_{i=1}^c \\frac{1}{z_i^2})\\cdot (\\sum_{i=1}^c z_i^2)\\geq c^2\\,\\, \\text{and}\\,\\, \\sum_{i=1}^c z_i^2\\geq \\frac{(z_1+...+z_c)^2}{c}.$$\nThus \n$$\\left( \\sum_{i=1}^n x_i^2\\right) \\left( \\sum_{i=1}^n x_i^{-2} \\right)=(\\sum_{i=1}^k x_i^2)(\\sum_{i=1}^k 1/x_i^2)+(\\sum_{i=1}^m y_i^2)(\\sum_{i=1}^m 1/y_i^2)+\n$$\n$$+(\\sum_{i=1}^k x_i^2)(\\sum_{i=1}^m 1/y_i^2)+(\\sum_{i=1}^m y_i^2)(\\sum_{i=1}^k 1/x_i^2)\\geq k^2+m^2+\\frac{S^2}{k}\\cdot \\frac{m^3}{S^2}+\\frac{S^2}{m}\\cdot \\frac{k^3}{S^2}.$$\nMoreover, we have equality precisely when $x_1=...=x_k$ and $x_{k+1}=...=x_n$. Thus it suffices to find the minimum value of \n$k^2+m^2+\\frac{k^3}{m}+\\frac{m^3}{k}$ over all pairs $(m,k)$ of positive integers with $m+k=n$. Note that \n$$k^2+m^2+\\frac{k^3}{m}+\\frac{m^3}{k}=\\frac{k^3+m^3}{k}+\\frac{k^3+m^3}{m}=\\frac{(m+k)(m^3+k^3)}{km}=\\frac{n^2(n^2-3km)}{km},$$\nthus the problem reduces to maximizing $km$ under the constraint $k+m=n$. This happens for $k=\\lfloor n/2\\rfloor$ and $m=\\lceil n/2\\rceil$, yielding \nthe answer: $n^2$ if $n$ is even and $\\frac{n^2 (n^2+3)}{n^2-1}$ if $n$ is odd.","subject":"algebra"}
{"id":"A38","problem":"Let $f: [0,1]\\to \\mathbf{R}$ be a non-decreasing function. What is the maximal possible value of the expression \n$$\\sum_{k=1}^n f(|x_k-\\frac{2k-1}{2n}|)$$ over all possible $n$-tuples $(x_1,\\ldots, x_n)$ such that $0\\leq x_1\\leq x_2\\leq\\ldots\\leq x_n\\leq 1$?","proof":"The answer is $\\sum_{k=1}^n f(a_k)$, with $a_k=\\frac{2k-1}{2n}$, attained for instance when all $x_i$'s are zero or when all are equal to $1$. Let us prove that indeed $$\\sum_{k=1}^n f(|x_k-\\frac{2k-1}{2n}|)\\leq \\sum_{k=1}^n f(a_k)$$\nfor all $0\\leq x_1\\leq x_2\\leq\\ldots\\leq x_n\\leq 1$. Let $A: \\{1,\\ldots, n\\}\\to \\{1,\\ldots, n\\}$ be defined by $$A(k)=\\max\\{j|\\, a_j\\leq x_k+\\frac{1}{2n}\\}.$$\nNote that $A$ is non-decreasing and that for all $1\\leq k\\leq n$\n$$|x_k-a_k|\\leq |a_k-a_{A(k)}|+|a_{A(k)}-a_k|\\leq \\frac{1}{2n}+\\frac{|A(k)-k|}{n}=a_{1+|A(k)-k|}.$$\nOn the other hand, we can easily prove by induction that for any non-decreasing function $g: \\{1,\\ldots, n\\}\\to \\{1,\\ldots, n\\}$ there is a permutation \n$\\sigma$ of $\\{1,\\ldots, n\\}$ such that $|g(k)-k|\\leq \\sigma(k)-1$ for all $k$. This is trivial for $n=1$ and in order to prove the inductive hypothesis we discuss two cases. If \n$g(n)<n$ by the inductive hypothesis applied to the restriction of $g$ to $\\{1,\\ldots, n-1\\}$ there is a permutation \n$\\sigma$ of $\\{1,\\ldots, n-1\\}$ with $|g(k)-k|\\leq \\sigma(k)-1$ for $k<n$, and it suffices to set $\\sigma(n)=n$. If $g(n)=n$ we define a map \n$h: \\{1,\\ldots, n-1\\}\\to \\{1,\\ldots, n-1\\}$ by setting $h(k)=g(k)$ when $g(k)<n$ and $h(k)=n-1$ otherwise. Applying the inductive hypothesis yields a permutation \n$\\tau$ of $\\{1,\\ldots, n-1\\}$ with $|h(k)-k|\\leq \\tau(k)-1$ for $k<n$. We then have $|g(k)-k|\\leq 1+\\tau(k)$ for $k<n$, and it suffices to set \n$\\sigma(n)=1$ and $\\sigma(k)=1+\\tau(k)$ for $k<n$.\nApply the above result to $A$, so there is a permutation $\\sigma$ of $\\{1,\\ldots, n\\}$ with $|A(k)-k|\\leq \\sigma(k)-1$ for ll $k$, so that by the above\n$$|x_k-a_k|\\leq a_{\\sigma(k)}$$\nfor all $k$ and since $f$ is non-decreasing, we obtain \n$$\\sum_{k=1}^n f(|x_k-\\frac{2k-1}{2n}|)\\leq \\sum_{k=1}^n f(a_{\\sigma(k)})=\\sum_{k=1}^n f(a_k),$$\nas desired.","subject":"algebra"}
{"id":"A39","problem":"Let $a,b,c,d$ be positive real numbers such that $ab+bc+cd+da=4$ and at most one of $a,b,c,d$ is smaller than $1$. Prove that $$\\frac{1}{ab+3}+\\frac{1}{bc+3}+\\frac{1}{cd+3}+\\frac{1}{da+3}+\\frac{1}{ac+3}+\\frac{1}{bd+3}\\geq \\frac{3}{2}.$$","proof":"We may assume that $a\\leq 1$ and $b,c,d\\geq 1$. Write $b+d=2x$ with $x\\geq 1$, so that $a+c=2/x$. Then \n$$\\frac{1}{ab+3}+\\frac{1}{bc+3}+\\frac{1}{cd+3}+\\frac{1}{da+3}+\\frac{1}{ac+3}+\\frac{1}{bd+3}=\\left(\\frac{1}{ab+3}+\\frac{1}{ad+3}\\right)+$$ $$+\\left(\\frac{1}{bc+3}+\\frac{1}{cd+3}\\right)+\\frac{1}{ac+3}+\\frac{1}{bd+3}\\geq \\frac{2}{ax+3}+\\frac{2}{cx+3}+\\frac{1}{ac+3}+\\frac{1}{x^2+3}.$$\nIt suffices to prove that the last quantity is at least $3/2$, and since $$\\frac{1}{ax+3}+\\frac{1}{cx+3}=\\frac{8}{acx^2+15},$$\nit suffices to prove that \n$$\\frac{1}{ac+3}+\\frac{16}{acx^2+8}+\\frac{1}{x^2+3}\\geq \\frac{3}{2}.$$\nOn the other hand the inequality $(a-1)(c-1)\\leq 0$ yields $ac\\leq a+c-1=\\frac{2}{x}-1$, so it suffices to check the inequality\n$$\\frac{x}{2(x+1)}+\\frac{16}{15+2x-x^2}+\\frac{1}{x^2+3}\\geq \\frac{3}{2},$$\nwhich by painful direct computation turns out to be equivalent to \n$$(x-1)^3(2x^2+5x+9)\\geq 0.$$\nThis is clear, since $x\\geq 1$.","subject":"algebra"}
{"id":"A40","problem":"Find all functions $f: (0,\\infty)\\to (0,\\infty)$ such that for all $x,y>0$ \n$$f(x+y)\\geq f(x)+yf(f(x)).$$","proof":"We will prove that there is no such function. Suppose that $f$ is a solution of the problem, and let $a=f(f(1))$. Setting \n$x=1$ yields $f(y+1)>ya$, thus $$\\lim_{y\\to\\infty} f(y)=\\infty.$$ Setting $y=1$ yields $$f(x+1)-f(x)\\geq f(f(x)),$$ thus also \n$$\\lim_{x\\to\\infty} f(x+1)-f(x)=\\infty.$$ Since $f(x+y)>f(x)$ for all $x,y>0$, $f$ is increasing. Since $f(x+1)>f(f(x))$, we must therefore have $f(x)<x+1$. But since \n$\\lim_{n\\to\\infty} f(n+1)-f(n)=\\infty$, we have $f(n+1)-f(n)>2$ for $n$ large enough, and then a telescopic sum shows that $f(n)>2n-c$ for a suitable constant $c$ and large enough \n$n$. This clearly contradicts the inequality $f(n)<n+1$.","subject":"algebra"}
{"id":"A41","problem":"A function $f: \\mathbf{R}\\to \\mathbf{R}$ is called additive if $f(x+y)=f(x)+f(y)$ for all $x,y\\in \\mathbf{R}$. Let $a$ be a real number, $n$ a positive integer and let $f_1,\\ldots, f_n$ be additive functions such that $f_1(x)f_2(x)\\ldots f_n(x)=ax^n$ for all $x\\in \\mathbf{R}$. Prove that at least one of the functions $f_1,\\ldots, f_n$ is linear (i.e. of the form $x\\mapsto cx$ for some constant $c$).","proof":"Suppose first that $a\\ne 0$ and take $x\\in \\mathbf{R}$. For an integer $k$ we have \n$$a(1+kx)^n=\\prod_{i=1}^n f_i(1+kx)=\\prod_{i=1}^n (f_i(1)+kf_i(x)).$$\nThis is a polynomial equality in the variable $k$, which holds for infinitely many values of $k$, thus it is a polynomial identity. Since the left-hand side is a power of a linear polynomial in $k$, each of the factors in the right-hand side must be a constant times the polynomial $1+kx$ (seen as a polynomial in $k$), say $f_i(1)+kf_i(x)=c_i(1+kx)$ for all $i$ and all $k$. Then $c_i=f_i(1)$ and $f_i(x)=c_ix$, thus $f_i(x)=f_i(1)x$ for all $i$. Since \n$x$ was arbitrary, it follows that all $f_i$'s are linear.\n\nSuppose now that $a=0$ and let us prove that some $f_i$ is zero. If this is not the case, we can find real numbers $a_i$ with $f_i(a_i)\\ne 0$. Let \n$k$ be an integer and let $x_k=a_1+ka_2+\\ldots+k^{n-1} a_n$. Then \n$$0=\\prod_{i=1}^n f_i(x_k)=\\prod_{i=1}^n (f_i(a_1)+f_i(a_2)k+\\ldots+f_i(a_n)k^{n-1}).$$\nThis is again a polynomial equality which holds for all integers $k$, thus which holds as a polynomial equality. Since a product of nonzero polynomials is nonzero, it follows that there must be some \n$i$ such that $$f_i(a_1)+f_i(a_2)k+\\ldots+f_i(a_n) k^{n-1}=0$$ as polynomials in $k$. But this is obviously impossible since $f_i(a_i)\\ne 0$ by construction.","subject":"algebra"}
{"id":"A42","problem":"Prove that for all non-degenerate subintervals $ I_{1},\\dots, I_{k} $ of the interval $ [0, 1]$\nwe have \\[ \\sum \\frac{1}{\\left | I_{i}\\cup I_{j} \\right |} \\geq k^{2},\\] where the summation is over all pairs $ (i, j) $ of indices such that $I_i\\cap I_j\\neq \\emptyset$.","proof":"Let $S$ be the set of pairs $(i,j)$ for which $I_i\\cap I_j\\neq \\emptyset$.\nWe first claim that for all $(i,j)\\in S$ we have \n$$\\dfrac{1}{|I_i \\cup I_j|} \\ge \\dfrac{|I_i \\cap I_j|}{|I_i| \\cdot |I_j|}.$$\nIndeed, we have $|I_i\\cup I_j|+|I_i\\cap I_j|=|I_i|+|I_j|$ and \n$|I_i\\cap I_j|\\leq \\min (|I_i|, |I_j|)$. But if $a,b,c,d\\geq 0$ satisfy $a+b=c+d$ and $b\\leq \\min (c,d)$, then $ab\\leq cd$ (write \n$c=b+x$ and $d=b+y$ with $x,y\\geq 0$ and expand). \nSince by definition $|I_i\\cap I_j|=0$ whenever $(i,j)\\notin S$, it follows that \n$$\\sum_{(i,j)\\in S} \\frac{1}{\\left | I_{i}\\cup I_{j} \\right |} \\geq \\sum_{(i,j)\\in S} \\frac{|I_i\\cap I_j|}{|I_i|\\cdot |I_j|}=\\sum_{i,j=1}^k \\frac{|I_i\\cap I_j|}{|I_i|\\cdot |I_j|}.$$\n\nLet $f_i$ be the indicator function of $I_i$ (thus $f_i(x)=1$ if $x\\in I_i$ and $f_i(x)=0$ otherwise). Note that \n$|I_i\\cap I_j|=\\int_0^1 f_i f_j$, so that \n$$\\sum_{i,j=1}^k \\frac{|I_i\\cap I_j|}{|I_i|\\cdot |I_j|}=\\int_0^1 (\\sum_{i,j=1}^k \\frac{f_i}{|I_i|} \\frac{f_j}{|I_j|})=\\int_0^1 (\\sum \\frac{f_i}{|I_i|})^2.$$\nNext, by Cauchy-Schwarz \n$$\\int_0^1 (\\sum \\frac{f_i}{|I_i|})^2\\geq (\\int_0^1 \\sum \\frac{f_i}{|I_i|})^2=(\\sum \\frac{1}{|I_i|} \\int_0^1 f_i)^2=k^2.$$","subject":"algebra"}
{"id":"A43","problem":"Let $p$ be an odd prime number, and let $\\mathbb{F}_p[X]$ be the ring of polynomials over the field $\\mathbb{F}_p$ of integers modulo $p$. Let $q\\in \\mathbb{F}_p[X]$ be given by $$q(X) = \\sum_{k=1}^{p-1} k^{\\frac{p-1}{2}} X^k.$$ Find the greatest nonnegative integer $n$ such that $(X-1)^n$ divides $q$ in $\\mathbb{F}_p[X]$.","proof":"The condition $(X-1)^n\\mid q$ is equivalent to saying that $$q^{(m)}(1)=0, \\,\\, \\forall \\,\\, 0\\leq m<n,$$ where $q^{(m)}$ is the $k$th (formal) derivative of \n$q$. We have \n$$q^{(m)}(1)=\\sum_{k=1}^{p-1} k^{\\frac{p-1}{2}}k(k-1)...(k-m+1).$$\nLet $$P_m(X)=X^{\\frac{p-1}{2}}X(X-1)...(X-m+1),$$ thus we want to find the largest $n$ for which $$\\sum_{k=1}^{p-1} P_m(k)=0$$ in $\\mathbb{F}_p$, for $0\\leq m<n$. Recall that $$\\sum_{k=1}^{p-1} k^j=0$$ in $\\mathbb{F}_p$ for $1\\leq j<p-1$, and \n$$\\sum_{k=1}^{p-1} k^{p-1}=-1.$$ Since $$\\deg P_m=\\frac{p-1}{2}+m,$$ it follows that $$\\sum_{k=1}^{p-1} P_m(k)=0$$ for \n$m=0,1,...,\\frac{p-1}{2}-1$. On the other hand $$\\sum_{k=1}^{p-1} P_{\\frac{p-1}{2}}(k)=-1.$$ Thus we must have \n$n=\\frac{p-1}{2}$.","subject":"algebra"}
{"id":"A44","problem":"Let $a,b,c,d$ be positive real numbers such that $$\\frac{1-c}{a}+\\frac{1-d}{b}+\\frac{1-a}{c}+\\frac{1-b}{d}\\geq 0.$$ Prove that $$a(1-b)+b(1-c)+c(1-d)+d(1-a)\\geq 0.$$","proof":"The inequality we want to prove is equivalent to \n$$\\frac{1}{a+c}+\\frac{1}{b+d}\\geq 1$$\nand it is clear if $a+c\\leq 1$ or $b+d\\leq 1$, so assume that $a+c>1$ and $b+d>1$. By assumption \n$$0\\leq \\frac{1-c}{a}+\\frac{1-a}{c}+\\frac{1-d}{b}+\\frac{1-d}{b}=\\frac{a+c-a^2-c^2}{ac}+\\frac{b+d-b^2-d^2}{bd}$$\n$$=\\frac{(a+c)(1-a-c)}{ac}+\\frac{(b+d)(1-b-d)}{bd}+4.$$\nUsing the inequality $ac\\leq (a+c)^2/4$ and $bd\\leq (b+d)^2/4$, it follows that \n$$1\\geq \\frac{a+c-1}{a+c}+\\frac{b+d-1}{b+d},$$\nyielding the result.","subject":"algebra"}
{"id":"A45","problem":"Let $n>3$ be an integer and let $M$ be a set of $n$ points in the plane, no three being collinear. Suppose that there is no circle that contains all points of $M$. Find all functions $f: M\\to \\mathbf{R}$ such that for any circle $C$ containing at least three points of $M$ we have $$\\sum_{P\\in C\\cap M} f(P)=0.$$","proof":"We will prove that the zero function is the only solution. Suppose that $f$ is a nonzero solution. Let $A\\ne B\\in M$ and let $C_{A,B}$ be the set of circles passing through $A,B$ and some other point of $M$. By assumption \n$k:=|C_{A,B}|\\geq 2$ and also for all $C\\in C_{A,B}$ we have $\\sum_{P\\in C\\cap M} f(P)=0$. It follows that \n$$\\sum_{C\\in C_{A,B}} \\sum_{P\\in C\\cap M} f(P)=0.$$\nOn the other hand, we have $$\\sum_{C\\in C_{A,B}} \\sum_{P\\in C\\cap M} f(P)=\\sum_{P\\in M} f(P)+(k-1)(f(A)+f(B)).$$ Letting $$S=\\sum_{P\\in M} f(P),$$ the above equation yields \n$$(k-1)(f(A)+f(B))=-S$$\nfor all $A\\ne B\\in S$. Assume that $S>0$ (the case $S<0$ is similar, or we can simply replace $f$ by $-f$ to reduce to this case), then by the above \n$f(A)+f(B)<0$ for all $A\\ne B\\in M$. If $M=\\{A_1,\\ldots, A_n\\}$, it follows that $f(A_i)+f(A_{i+1})<0$ for all $1\\leq i\\leq n$ (with $A_{n+1}=A_1$), and adding these inequalities yields \n$2S<0$, a contradiction. Thus $S=0$ and then $f(A)+f(B)=0$ for all $A\\ne B\\in M$. If $f(A)\\ne 0$ for some $A\\in M$, say without loss of generality \n$f(A)>0$, then for all $B\\ne C\\ne A\\in M$ we have $f(B)=-f(A)<0$ and $f(C)=-f(A)<0$, but then $0=f(B)+f(C)<0$, a contradiction. Thus \n$f(A)=0$ for all $A\\in M$ and we are done.","subject":"algebra"}
{"id":"A46","problem":"Let $n$ be a positive integer. Prove that\n$$\\sum_{k=1}^n (-1)^{\\lfloor k (\\sqrt{2} - 1) \\rfloor} \\geq 0.$$","proof":"Let $a_k=\\lfloor k (\\sqrt{2} - 1) \\rfloor$. The sequence $(-1)^{a_k}$ starts as follows: $1,1,1, -1, -1, 1,1,1,...$. It consists of groups of $1$ and $-1$, whose lengths are denoted \n$c_0=3, c_1=2, c_2=3,...$. For each $n$ the sum $c_0+c_1+...+c_n$ counts the number of indices \n$k$ with $a_k<n+1$, or equivalently $k<(n+1)(1+\\sqrt{2})$, thus $$c_0+c_1+...+c_n=\\lfloor (n+1)(1+\\sqrt{2})\\rfloor+1=2n+3+a_{n+1}$$ and $c_n=a_{n+1}-a_n+2$ for $n>0$. It is not difficult to see that $a_{n+1}-a_n$ is $1$ or $0$ according to whether there is $j$ with $n(\\sqrt{2}-1)<j<(n+1)(\\sqrt{2}-1)$, therefore \n$c_n=3$ if $n$ is of the form $\\lfloor k(\\sqrt{2}+1)\\rfloor$ for some $k$ and $c_n=2$ otherwise. We will prove that if the inequality $(-1)^{a_1}+...+(-1)^{a_n}\\geq 0$ holds for $n\\leq N$, then it also holds for $n\\leq 4N$, which will be enough to conclude. It suffices to check that $c_0-c_1+...+(-1)^mc_m\\geq 0$ whenever \n$c_0+c_1+...+c_{m-1}<4N+3$. In particular we must have $m<2N+2$. Using the above explicit formula for $c_n$, it follows that if $m$ is odd then \n$$\\sum_{i=0}^m (-1)^i c_i=\\sum_{i=0}^m (-1)^i(c_i-2)=\\sum_{j} (-1)^{a_j},$$\nthe sum being over those $j$ with $j(1+\\sqrt{2})<m$, i.e. $j<m(\\sqrt{2}-1)$. Since \n$m(\\sqrt{2}-1)<N+1$, we know that $\\sum_{j} (-1)^{a_j}\\geq 0$, so we are done. If $m$ is even, we have \n$$\\sum_{i=0}^m (-1)^ic_i=c_m+\\sum_j (-1)^{a_j}\\geq 0,$$\nfinishing the proof.","subject":"algebra"}
{"id":"A47","problem":"A polynomial $P=a_0+a_1X+...+a_nX^n$ with complex coefficients and degree $n$ has the property that \n$|P(z)|\\leq 1$ for all $|z|=1$. Prove that $|a_k|\\leq 1-|a_n|^2$ for all $0\\leq k\\leq n-1$.","proof":"By a standard argument, if $Q=b_dX^d+...+b_0$ is a polynomial and $z_1,...,z_N$ are the $N$th roots of unity with $N>d$ then \n$$\\frac{1}{N}\\sum_{i=1}^N|Q(z_i)|^2=|b_0|^2+\\cdots+|b_d|^2.$$\nLet $t$ be a complex number and apply the above observation to $$Q=P(1+t X^k)=a_0+...+(a_n+ta_{n-k})X^n+...+ta_n X^{n+k}$$\nand to the polynomial $1+tX^k$. Thus for $N$ large \n$$|a_0|^2+...+|a_n+ta_{n-k}|^2+...+|ta_n|^2=\\frac{1}{N}\\sum_{i=1}^N |P(z_i)|^2 |1+t z_i^k|^2\\leq \\frac{1}{N} \\sum_{i=1}^N |1+t z_i^k|^2=1+|t|^2.$$\nThus \n$$|t a_n|^2+|a_n+ta_{n-k}|^2\\leq 1+|t|^2$$\nfor all $t$. Now simply choose $t$ such that $|ta_n|=1$ and $$|a_n+ta_{n-k}|=|a_n|+|t| |a_{n-k}|.$$ It is easy to see that such $t$ exists by considering the argument of $a_{n-k}/a_n$, then $$|a_n|+|t||a_{n-k}|\\leq |t|$$ simplifies to $$|a_{n-k}|\\leq 1-|a_n|^2.$$ Since $k$ was arbitrary, we are done.","subject":"algebra"}
{"id":"A48","problem":"Is there an irreducible monic polynomial $f\\in \\mathbf{Z}[X]$ such that $\\deg(f)>1$ and $f(X^2+aX)$ is reducible in $\\mathbf{Q}[X]$ for infinitely many integers $a$?","proof":"The answer is negative. Suppose that $f$ is such a polynomial and let $d=\\deg(f)$. Let $a$ be an integer for which \n$f(X^2+aX)$ is reducible and let $u$ be a root of $f(X^2+aX)$. Then $z=u^2+au\\in \\mathbf{Q}(u)$ is a root of $f$ and since \n$f$ is irreducible we must have $[\\mathbf{Q}(z): \\mathbf{Q}]=d$. On the other hand since $f(X^2+aX)$ is reducible, we must have \n$[\\mathbf{Q}(u): \\mathbf{Q}]<2d$, which becomes $[\\mathbf{Q}(u): \\mathbf{Q}(z)]<2$ and forces $\\mathbf{Q}(u)=\\mathbf{Q}(z)$. In particular, there must be a polynomial\n$g\\in \\mathbf{Q}[X]$ such that $a^2+4z=g(z)^2$, since $a^2+4z=(a+2u)^2$ is a square in $\\mathbf{Q}(u)$. Since $z$ is a root of the irreducible polynomial \n$f$, the equality $a^2+4z=g(z)^2$ must hold for any other root $z'$ of $f$. If $z_1,\\ldots, z_d$ are the roots of $f$, it follows that \n$$\\prod_{i=1}^d (a^2+4z_i)=(\\prod_{i=1}^n g(z_i))^2.$$\nBy the theorem of symmetric polynomials the right-hand side is the square of a rational number, thus \n$(-4)^d f(-a^2/4)$ is the square of a rational number, which must be an integer actually since $f$ has integer coefficients. Since this happens for infinitely many \nintegers $a$ and since $(-4)^d f(-X^2/4)$ has even degree and leading coefficient a perfect square, this polynomial must be the square of some polynomial \n$h$, i.e. $$(-4)^d f(-X^2/4)=h(X)^2.$$\nTake now a nonzero root $r$ of $f$ and set $t=\\sqrt{-4r}$, then $h(t)=0$ and $$(-4)^d (-t/2)f'(r)=2h(t)h'(t)=0,$$ hence $f'(r)=0$. But then \n$f$ and $f'$ have a common root, are both nonzero and $f$ is irreducible. This is clearly impossible.","subject":"algebra"}
{"id":"A49","problem":"For which integers $M$ can the polynomial $MX$ be written as the sum of cubes of some polynomials with integer coefficients?","proof":"Note that \n$$6X=(X+1)^3+(X-1)^3+(-X)^3+(-X)^3,$$\nthus any multiple of $6$ is a solution of the problem. We will prove that these are the only solutions. Let $M$ be an integer and suppose that \nwe can write $$MX=f_1(X)^3+\\ldots+f_n(X)^3$$\nfor some polynomials $f_1,\\ldots, f_n$ with integer coefficients. Taking the derivative yields \n$$M=3\\sum_{i=1}^n f_i(X)^2 f_i'(X)$$\nand so $M$ is divisible by $3$. We still need to prove that $M$ is even. Let $x,y$ be the two roots of the equation $z^2+z+1=0$. \nIf $P$ is a polynomial with integer coefficients and if $z^2+z+1=0$, it is clear that we can write $P(z)=az+b$ for some integers $a,b$. Thus \nwe can find integers $a_i, b_i$ such that $f_i(x)=a_ix+b_i$. Passing to conjugates gives $f_i(y)=a_iy+b_i$ and so \n$$-M=M(x+y)=Mx+My=\\sum_{i=1}^n (f_i(x)^3+f_i(y)^3).$$\nOn the other hand \n$$f_i(x)^3+f_i(y)^3=(a_ix+b_i)^3+(a_iy+b_i)^3=2(a_i^3+b_i^3)-3a_ib_i(a_i+b_i)$$\nis clearly an even integer. Thus $M$ is even and we are done.","subject":"algebra"}
{"id":"A50","problem":"Prove that for all $a_1,\\ldots, a_n\\in (-1,1)$ we have \n$$\\prod_{i=1}^n \\prod_{j=1}^n \\frac{1+a_i a_j}{1-a_ia_j}\\geq 1.$$","proof":"Let\n$$S_k=a_1^{2k-1}+\\ldots+a_n^{2k-1}$$\nand note that $$|S_k|\\leq n (\\max_{i} |a_i|)^{2k-1}$$ by assumption. It follows that the series \n$\\sum_{k\\geq 1} \\frac{1}{2k-1} S_k^2$ converges and we will prove that \n$$\\ln \\prod_{i=1}^n \\prod_{j=1}^n \\frac{1+a_i a_j}{1-a_ia_j}=2\\sum_{k\\geq 1} \\frac{1}{2k-1} S_k^2,$$\nwhich will immediately yield the result (the right-hand side being obviously nonnegative). \nIndeed, using the expansion \n$$\\ln (1-x)=-\\sum_{n\\geq 1} x^n/n$$\nfor $x\\in (-1,1)$ (and its variant obtained by replacing $x$ by $-x$), we obtain \n$$\\ln \\prod_{i=1}^n \\prod_{j=1}^n \\frac{1+a_i a_j}{1-a_ia_j}=\\sum_{i,j=1}^n \\sum_{k\\geq 1} \\frac{(a_ia_j)^k}{k} (1+(-1)^{k-1})$$\n$$=\\sum_{i,j=1}^n \\sum_{k\\geq 1} \\frac{2a_i^{2k-1} a_j^{2k-1}}{2k-1}=2\\sum_{k\\geq 1} \\frac{1}{2k-1}(\\sum_{i=1}^n a_i^{2k-1})^2$$\n$$=2\\sum_{k\\geq 1} \\frac{1}{2k-1} S_k^2,$$\nas desired.","subject":"algebra"}
{"id":"C1","problem":"In a chess tournament with $n\\geq 5$ players, each player played all other players. One gets a point for a win, half a point for a draw, and zero points for a loss. At the end of the tournament, each player had a different number of points. Prove that the second and third ranked players had together more points than the winner of the tournament.","proof":"Let $x_i$ be the score of player ranked $i$. By assumption $x_1,\\ldots, x_n$ are pairwise distinct, thus \n $x_i\\geq x_{i+1}+1/2$ for all $i$, in particular $$x_{k+3}\\leq \\min(x_2-\\frac{k+1}{2}, x_3-\\frac{k}{2})\\leq \\frac{x_2+x_3}{2}-\\frac{2k+1}{2}$$\n for $1\\leq k\\leq n-3$. Adding the previous inequalities yields\n $$x_4+\\ldots+x_n\\leq (n-3)\\frac{x_2+x_3}{2}-\\frac{(n-1)(n-3)}{2}.$$\n Note that $$x_2+\\ldots+x_n\\geq \\binom{n-1}{2},$$\n since there are $\\binom{n-1}{2}$ matches among players ranked $2,\\ldots, n$ and each match gives a total of one point to both players. \n \n It follows that \n $$\\binom{n-1}{2}\\leq (n-1)\\frac{x_2+x_3}{2}-\\frac{(n-1)(n-3)}{2}$$\n and then \n $$x_2+x_3\\geq 2n-5\\geq n>x_1,$$\n the last inequality being clear since player ranked $1$ played $n-1$ matches.","subject":"combinatorics"}
{"id":"C2","problem":"A graph $G$ has $n>1$ vertices. Prove that \n$$\\sum_{e} \\frac{c(e)}{c(e)-1}\\leq \\frac{n^2}{2},$$\nthe sum being taken over all edges of $G$ and $c(e)$ being the number of vertices of the largest complete subgraph of $G$ containing $e$.","proof":"We induct on $n$, the case $n=2$ being trivial. We may assume that $G$ has at least one edge. Let \n$k$ be the maximal size of a clique (i.e. complete subgraph) of $G$ and pick a $k$-clique $K$ in $G$. There are $\\binom{k}{2}$ edges $e$ within \n$K$, and for each of them $c(e)=k$ by maximality of $K$. Thus the contribution of such edges to the sum is $\\binom{k}{2} \\frac{k}{k-1}=k^2/2$. \n\nNext, by induction the contribution of the edges within $G\\setminus K$ is bounded by $(n-k)^2/2$. We are done if we can show that the contribution of edges $e$ connecting a vertex in $K$ and one outside $K$ is bounded by $k(n-k)$.\n\n For each vertex\n$v$ of $G$ which is not a vertex of $K$ let $K_v$ be the set of neighbors of $v$ in $K$. Then $K_v\\cup \\{v\\}$ is a clique, thus by maximality\n$|K_v|\\leq k-1$. Moreover $c(e)\\geq |K_v|+1$ for any edge $e$ connecting $v$ to a vertex of $K$. Thus the contribution of \nedges connecting a vertex in $K$ and one outside $K$ is bounded above by $$\\sum_{v\\in G\\setminus K} |K_v|\\cdot \\frac{|K_v|+1}{|K_v}\\leq \\sum_{v\\in G\\setminus K} k=k(n-k),$$\nas desired.","subject":"combinatorics"}
{"id":"C3","problem":"Let $T$ be a finite set of integers greater than $1$. \n A subset $S$ of $T$ is good\nif for any $t\\in T$ one can find $s\\in S$ such that $\\gcd(s,t)>1$.\n Prove that the number\nof good subsets of $T$ is odd.","proof":"We will count in two ways pairs $(A,B)$, where any element of $A$ is relatively prime to any element of $B$. \n If $S$ is a subset of $T$, let $\\bar{S}$ be the set of $t\\in T$ which are relatively prime to all elements of $S$.\n Given $A$, there are $2^{|\\bar{A}|}$ possibilities for $B$, since it can (and should) be any subset of \n $\\bar{A}$.\n \n Now $2^{|\\bar{A}|}$ is odd if and only if $A$ is a good subset. \n So the parity of the total number of pairs is the same as that of the number of good subsets \n On the other hand, if $(A,B)$ is such a pair, then so is $(B,A)$, and there is only one pair for which \n $A=B$. Thus the total number of pairs is odd and we are done.","subject":"combinatorics"}
{"id":"C4","problem":"Let $n$ be a positive integer and let \n $S_n$ (respectively $T_n$) be the set of all bijections (respectively all maps) from $[n]:=\\{1,\\ldots, n\\}$ to $[n]$. For $\\tau\\in T_n$ let ${\\rm ord}(\\tau)$ be the \n number of distinct maps in the set $\\{\\tau, \\tau \\circ \\tau, \\tau \\circ \\tau \\circ \\tau, \\ldots\\}$, where o denotes composition. Prove that for sufficiently large $n$\n $$g(n)=\\max _{\\tau \\in T_n} \\operatorname{ord}(\\tau)<\\max _{\\tau \\in S_n} \\operatorname{ord}(\\tau)+n^{0.501}.$$","proof":"Set $$\nf(n)=\\max _{\\tau \\in S_n} \\operatorname{ord}(\\tau)$$\nand \n$$g(n)=\\max _{\\tau \\in T_n} \\operatorname{ord}(\\tau) .$$\n\n For large enough $n$ we have $\\pi(n^{0, 501})> n^{0, 5009}$, where \n $\\pi(x)$ is the number of primes not exceeding $x$. This follows from a weak version of the prime number theorem, such as a Chebyshev-type bound.\n \n We fix such $n$ and some $\\tau\\in T_n$ and we prove that $${\\rm ord}(\\tau)<f(n)+n^{0.501},$$ which is enough to finish the proof.\n Write $\\tau^k$ for the $k$-fold composition of $\\tau$ with itself. Let \n $C$ be the set of $x\\in [n]$ for which $\\tau^k(x)=x$ for some $k>0$. Then $\\tau$ defines a permutation $\\sigma$ of $C$, say of order $d$. Indeed, it is clear that $\\tau(x)\\in C$ for $x\\in C$, and that we can recover \n $x$ from the knowledge of $\\tau(x)$, thus $\\tau|_C: C\\to C$ is injective, thus bijective.\n \n For each $x\\in [n]\\setminus C$ the sequence $x, \\tau(x), \\tau^2(x),\\ldots$ must be eventually periodic, thus there is a smallest positive integer $h(x)$ such that $\\tau^{h(x)}(x)\\in C$. Let $$R=\\max_{x\\in [n]\\setminus C} h(x),$$ then $\\tau^R(x)\\in C$ for all $x$, so that $${\\rm ord}(\\tau)\\leq R+{\\rm ord}(\\sigma)\\leq R+f(n).$$ Let us assume that ${\\rm ord}(\\tau)>f(n)+n^{0,501}$, so that \n $R>n^{0,501}$ and there is $x\\in [n]\\setminus C$ with $h(x)>n^{0,501}$. In particular $|C|\\leq n-n^{0,501}$.\n By our choice of $n$ the sum of all primes smaller than $n^{0,501}$ is greater than $n$, so there must be such a prime $p$ which does not divide any cycle length of $\\sigma$. The permutation $\\sigma'$ which equals $\\sigma$ on $C$ and has a $p$-cycle on $[n]\\setminus C$ has order at least \n $p{\\rm ord}(\\sigma)$, thus ${\\rm ord}(\\sigma)\\leq f(n)/p\\leq f(n)/2$ and hence $${\\rm ord}(\\tau)\\leq R+{\\rm ord}(\\sigma)\\leq n+f(n)/2<f(n),$$ if $n$ is large enough.","subject":"combinatorics"}
{"id":"C5","problem":"Let $0<a_1<a_2<\\ldots$ be an increasing sequence of positive integers such that for any \n $n>1$ and any $\\varepsilon_1,\\ldots, \\varepsilon_{n-1}\\in \\{0,1\\}$\n $$a_n\\ne \\varepsilon_1a_1+\\ldots+\\varepsilon_{n-1} a_{n-1}.$$ Let $N_M$ be the number of terms of the sequence $(a_n)_{n\\geq 1}$ not exceeding $M$. Prove that for all $M>k$\n $$N_M\\leq a_k+\\frac{M}{k+1}.$$","proof":"We will prove the stronger inequality \n $$N_M\\leq \\frac{M}{k+1}+\\frac{a_1+\\ldots+a_k}{k+1}+\\frac{k}{2}.$$\n This is indeed stronger, since $a_i\\leq a_k-(k-i)$ for $i\\leq k$, thus \n $$\\frac{a_1+\\ldots+a_k}{k+1}+\\frac{k}{2}\\leq \\frac{1}{k+1}\\sum_{i=1}^k (a_k-k+i)+\\frac{k}{2}=\\frac{ka_k+k}{k+1}\\leq a_k.$$\n In order to prove the stronger inequality, fix $M>k$ and let $n=N_M$, so that $a_n\\leq M$.\n Consider the numbers \n $$x_{p,q}=a_q+a_1+\\ldots+a_p$$\n with $0\\leq p\\leq k$ and $p<q\\leq n$. There are \n $(k+1)n-\\frac{k(k+1)}{2}$ such numbers, since this is the number of \n pairs $(p,q)$ satisfying the above inequalities. All of these numbers are \n smaller than or equal to $a_n+a_1+\\ldots+a_k$, and the hypothesis of the problem immediately implies that these numbers are pairwise distinct, so that \n $$(k+1)n-\\frac{k(k+1)}{2}\\leq a_n+a_1+\\ldots+a_k\\leq M+a_1+\\ldots+a_k.$$\n Dividing by $k+1$ yields the desired inequality.","subject":"combinatorics"}
{"id":"C6","problem":"Let $p_1,\\ldots, p_s$ be pairwise distinct primes and let \n $x_1,\\ldots, x_n$ be integers, with $n\\geq \\max p_i$. Let $P_i=\\frac{p_1\\ldots p_s}{p_i}$ and let \n $P'_i$ be an integer such that $P_iP'_i\\equiv 1\\pmod {p_i}$. For $1\\leq j\\leq n$ let $M^{(j)}$ be the number of sums of $j$ numbers among $x_1,\\ldots, x_n$ which are relatively prime to $p_1\\ldots p_s$ and let \n $$M=M^{(1)}-M^{(2)}+\\ldots+(-1)^{n-1}M^{(n)}.$$\n For $1\\leq i\\leq s$ and $1\\leq j\\leq n$ let $N_i^{(j)}$ be the number of sums of $j$ numbers among \n $x_1,\\ldots, x_n$ which are relatively prime to $p_i$, but not to $P_i$ and let \n $$N_i=N_i^{(1)}-N_i^{(2)}+\\ldots+(-1)^{n-1}N_i^{(n)}.$$\n Prove that \n $$p_1\\ldots p_s\\mid M+\\sum_{i=1}^n P_i P_i'N_i.$$","proof":"Since $p_1,\\ldots, p_s$ are pairwise distinct, it suffices to prove that $X:=M+\\sum_{i=1}^n P_i P_i'N_i$ is divisible by \n $p_i$ for each $1\\leq i\\leq s$. Fix such $i$ and observe that by definition $X\\equiv M+N_i\\pmod {p_i}$, thus it suffices to prove that $M\\equiv -N_i\\pmod {p_i}$. \n For each subset $A$ of $\\{1,\\ldots, n\\}$ let $x_A=\\sum_{i\\in A} x_i$. It is well-known that for each positive integer \n $\\ell<n$ we have (set $[n]=\\{1,\\ldots, n\\}$)\n $$x_{[n]}^{\\ell}-\\sum_{|A|=n-1} x_A^{\\ell}+\\sum_{|A|=n-2} x_A^{\\ell}+\\ldots+(-1)^{n-1} \\sum_{|A|=1} x_A^{\\ell}=0.$$\n Since $n>p_i-1$, we can take $\\ell=p_i-1$. Note that $M^{(j)}+N_i^{(j)}$ is the number of sums \n $x_A$ with $|A|=j$ which are not divisible by $p_i$. For each such sum we have $x_A^{p_i-1}\\equiv 1\\pmod {p_i}$. Thus taking the above relation modulo $p_i$ we obtain \n $$M^{(1)}+N_i^{(1)}-(M^{(2)}+N_i^{(2)})+\\ldots+(-1)^{n-1}(M^{(n)}+N_i^{(n)})\\equiv 0\\pmod {p_i},$$\n as desired.","subject":"combinatorics"}
{"id":"C7","problem":"Let $S$ be the set of sequences of length 2018 whose terms are in the set $\\{1, 2, 3, 4, 5, 6, 10\\}$ and sum to 3860. Prove that \n\\[|S|\\leq 2^{3860} \\cdot \\left(\\frac{2018}{2048}\\right)^{2018}.\\]","proof":"There is one very tricky observation which instantly solved the problem, namely \nthe identity\n\\[2^{-1} + 2^{-2} + 2^{-3} + 2^{-4} + 2^{-5} + 2^{-6} + 2^{-10} = \\frac{2018}{2048}.\\] Letting $A = \\{1, 2, 3, 4, 5, 6, 10\\}$, it follows that\n$$\\left(\\frac{2018}{2048}\\right)^{2018}= (2^{-1} + 2^{-2} + 2^{-3} + 2^{-4} + 2^{-5} + 2^{-6} + 2^{-10})^{2018}=$$\n$$ \\sum_{a_1, \\dots, a_{2018} \\in A} 2^{-(a_1 + \\dots + a_{2018})}\\ge \\sum_{\\substack{a_1, \\dots, a_{2018} \\in A \\\\ a_1 + \\dots + a_{2018} = 3860}} 2^{-(a_1 + \\dots + a_{2018})}= 2^{-3860} |S|.$$","subject":"combinatorics"}
{"id":"C8","problem":"Let $\\sigma(x)$ be the sum of positive divisors of the positive integer $x$. Prove that for all integers $n>1$ \n$$\\sum_{k=0}^{n-1} (-1)^k (2k+1)\\sigma (\\frac{n^2+n}{2}-\\frac{k^2+k}{2})=(-1)^{n-1}\\frac{n(n+1)(2n+1)}{6}.$$","proof":"We will use generating functions. Let \n $$P=\\prod_{n\\geq 1} (1-X^n).$$\n Note that \n $$\\sum_{n\\geq 1} \\sigma(n)X^n=\\sum_{n\\geq 1} \\sum_{d\\mid n} dX^n=\\sum_{d\\geq 1} \\frac{dX^d}{1-X^d}=-\\frac{XP'}{P}.$$\n On the other hand Jacobi's triple product identity yields\n $$P^3=\\sum_{n\\geq 0} (-1)^n (2n+1)X^{n(n+1)/2}.$$\n Thus \n $$\\sum_{n\\geq 1}\\sigma(n) X^n\\cdot \\sum_{n\\geq 0} (-1)^n (2n+1)X^{n(n+1)/2}=-XP^2P'=$$\n $$=-\\frac{X}{3} (P^3)'=-\\frac{1}{6}\\sum_{n\\geq 0} (-1)^n n(n+1)(2n+1)X^{n(n+1)/2}.$$\n It suffices now to identify the coefficients of $X^{n(n+1)/2}$ on both sides.","subject":"combinatorics"}
{"id":"C9","problem":"Let $a_1,\\ldots, a_n$ be positive integers such that \n $$\\frac{1}{a_1}+\\ldots+\\frac{1}{a_n}\\leq \\frac{1}{2}.$$\n The government of Optimistica publishes each year an annual report, with $n$ economic indicators, the values of the \n $i$th indicator being in the set $\\{1,\\ldots, a_i\\}$. We say the report is optimistic if at least $n-1$ indicators have \n equal or higher values than in the previous report. Prove that the government can publish annual reports in an infinitely long sequence.","proof":"Let $k_i$ be nonnegative integers such that $2^{k_i}\\leq a_i<2^{k_i+1}$ and note that by assumption \n $$\\sum_{i=1}^n 2^{-k_i}\\leq 1.$$ We may assume that $k_1\\leq\\ldots\\leq k_n$.\n We will prove below that for each $1\\leq i\\leq n$ there is a residue class $A_i$ modulo $2^{k_i}$ such that \n $A_1,\\ldots, A_n$ are pairwise disjoint. One then starts with the report in which all indicators are $1$. In the \n $x$'th year let the $i$th indicator drop to $1$ if $x\\in A_i$, and otherwise it increases by $1$. Note that the \n $i$th indicator never exceeds $2^{k_i}\\leq a_i$, since it increases at most $2^{k_i}-1$ times in a row, then drops to $1$. Moreover, since $A_1,\\ldots, A_n$ are pairwise disjoint, at most one indicator drops each year, so the reports are all optimistic.\n \n We still need to prove the existence of $A_1,\\ldots, A_n$. Start by picking an arbitrary residue class $A_1$. Suppose that we constructed $A_1,\\ldots, A_{i-1}$. For each $j<i$ the set $A_j$ is the union of $2^{k_i-k_j}$ different residue classes mod $2^{k_i}$, and \n $$\\sum_{j<i} 2^{k_i-k_j}<2^{k_i}$$\n by assumption, so we can always find a residue class $A_i$ as needed.","subject":"combinatorics"}
{"id":"C10","problem":"Prove that for any $n\\geq 1$ there is a subset $S$ of $\\mathbf{Z}^n$ such that no two points in $S$ are neighbors, and any point in $\\mathbf{Z}^n\\setminus S$ has exactly one neighbor in $S$. Here \ntwo points $p=(p_1,\\ldots, p_n)$ and $q=(q_1,\\ldots, q_n)$ in $\\mathbf{Z}^n$ are called neighbors if \n$$\\sum_{i=1}^n |p_i-q_i|=1.$$","proof":"Let $$f(p_1,\\ldots, p_n)=p_1+2p_2+\\ldots+np_n\\pmod {2n+1}$$\n and let $S$ be the set of points $p$ with $f(p)=0$. Note that if $p,q$ are neighbors \n there is a unique $1\\leq i\\leq n$ with $p_k=q_k$ for $k\\ne i$ and $p_i-q_i=\\pm 1$, thus \n $$f(p)-f(q)=\\sum_{k=1}^n k (p_k-q_k)=\\pm i.$$\n In particular we cannot have $f(p)=f(q)=0$ in $\\mathbf{Z}/(2n+1)$, since $i$ is not divisible by\n $2n+1$. Thus no two points in $S$ can be neighbors.\n \n Take now a point $p\\in \\mathbf{Z}^n\\setminus S$ and let us see how many neighbors \n $q$ of $p$ are in $S$. As before, say $p$ and $q$ differ exactly in the $i$th coordinate, with \n $1\\leq i\\leq n$. Then $q\\in S$ if and only if $f(q)=0$ in $\\mathbf{Z}/(2n+1)$, which by the above \n calculation is equivalent to $f(p)\\equiv \\pm i\\pmod {2n+1}$. But since $f(p)$ is nonzero mod $2n+1$, there is a unique $i$ with this property, and moreover depending on the remainder of $f(p)$ modulo $2n+1$ the sign is also fixed, which means that there is a unique neighbor $q$ of $p$ with $q\\in S$.","subject":"combinatorics"}
{"id":"C11","problem":"Let $n$ be a positive integer. A thief has $2n$ accomplices. Several policemen try to catch him, by placing his accomplices under surveillance. In the beginning no accomplice is followed by the policemen. Every morning each policeman places under his surveillance one of the accomplices and every evening the thief stops trusting one of his accomplices. Prove that if less than $2^n$ policemen are involved, then the thief can always make sure that by the $n$th evening no policeman shadows exactly those $n$ accomplices who are still trusted by the thief.","proof":"Call a policeman useless if he shadows someone not trusted by the thief. Note that such a policeman will never catch the thief (we say that the thief is caught by a policeman $P$ if by the $n$th evening $P$ shadows exactly those \n $n$ accomplices still trusted by the thief). We will prove that the thief can dismiss every evening an accomplice to make all policemen useless. On the $k$th day the thief can dismiss any of $2n+1-k$ accomplices, and each useful policeman can be made useless in $k$ ways. So in this step the ratio of policemen which can be made useless is at least $k/(2n-k+1)$. Note that \n $$\\prod_{k=1}^{n-1} (1-\\frac{k}{2n-k+1})=\\prod_{k=1}^{n-1} \\frac{2n-2k+1}{2n-k+1}=$$\n $$=\\frac{(2n-1)(2n-3)\\ldots 3}{2n(2n-1)\\ldots (n+1)}=\\frac{(2n)!}{2\\cdot 4\\ldots 2n\\cdot (n+1)\\ldots (2n)}=$$\n $$=\\frac{(2n)!}{2^n n! (n+1)\\ldots (2n)}=\\frac{1}{2^n}.$$\n Since the number of policemen is $<2^n$, all policemen will become useless at some moment.","subject":"combinatorics"}
{"id":"C12","problem":"Let $n>2^k$ and let $1\\leq a_1<a_2<\\ldots <a_n$ be integers. Prove that \n$$N:=\\prod_{1\\leq i<j\\leq n} (a_i+a_j)$$\nhas at least $k+1$ pairwise distinct prime factors.","proof":"Suppose that it has less, so there are $k$ pairwise distinct primes $p_1,\\ldots, p_k$ such that all prime factors of $N$ are among the $p_i$'s. Consider the complete graph $K_n$ and the subgraph $G_i$ of $K_n$ with the same vertex set (namely the set $[n]=\\{1,\\ldots,n\\}$), two vertices $x,y$ being adjacent if \n$$v_{p_i}(a_x+a_y)>\\min (v_{p_i}(a_x), v_{p_i}(a_y))+1_{p_i=2},$$\nwhere $1_{p_i=2}$ equals $1$ if $p_i=2$ and $0$ otherwise. Note that this forces \n$v_{p_i}(a_x)=v_{p_i}(a_y)$. \nNote that the union of the edges of the various $G_i$'s is the set of all edges of $K_n$, since otherwise we could find \n$x\\ne y$ such that for any $i$\n$$v_{p_i}(a_x+a_y)\\leq \\min (v_{p_i}(a_x), v_{p_i}(a_y))+1_{p_i=2}.$$\nIt follows that \n$$a_x+a_y=\\prod_{i} p_i^{v_{p_i}(a_x+a_y)}\\leq \\prod_{i} p_i^{\\min (v_{p_i}(a_x), v_{p_i}(a_y))}\\cdot p_i^{1_{p_i=2}}.$$\nThe right-hand side is clearly bounded from above by $2\\gcd(a_x, a_y)$, thus \n$$a_x+a_y\\leq 2\\gcd(a_x, a_y),$$\nforcing $a_x=a_y$ and then $x=y$, a contradiction.\n\n We will prove that each $G_i$ is bipartite. But it is well-known that \n $K_n$ cannot be covered by the edges of $k$ bipartite spanning subgraphs for $n>2^k$, yielding a contradiction. \n To prove our claim, it suffices to prove that $G_i$ has no odd cycle. If $x_1,x_2,\\ldots, x_d$ are the vertices of an odd cycle in $G_i$, then as we have already observed \n $$v_{p_i}(a_{x_1})=\\ldots=v_{p_i}(a_{x_d}).$$\n Call this common value $t$ and write $a_{x_j}=p_i^t b_j$ with $b_j$ relatively prime to $p_i$. Then the fact that \n $x_i$ is adjacent to $x_{i+1}$ for all $i$ implies that $p_i$ (respectively $p_i^2$ if $p_i=2$) divides \n $b_i+b_{i+1}$ for all $i$. Since $d$ is odd, this forces $p_i\\mid 2b_1$ (respectively $p_i^2\\mid 2b_1$), contradicting the fact that $b_1$ is not a multiple of $p_i$.","subject":"combinatorics"}
{"id":"C13","problem":"Prove that if $S_1,\\ldots, S_p, T_1,\\ldots, T_p$ are pairwise distinct subsets of \n$\\{1,\\ldots, n\\}$ such that $S_i\\cap T_j$ is nonempty for all $i$ and $j$, then \n$$p<\\frac{3-\\sqrt{5}}{2}\\cdot 2^n.$$","proof":"Let $\\mathcal{S}$ be the set of subsets $X$ of $[n]:=\\{1,\\ldots, n\\}$ which contain $S_i$ for some \n$1\\leq i\\leq p$ and define similarly $\\mathcal{T}$. The hypothesis of the problem implies that whenever \n$X\\in \\mathcal{S}$ we have $X^c:=[n]\\setminus X\\notin \\mathcal{T}$. This shows that there is an injection of \n$\\mathcal{S}$ in the complement of $\\mathcal{T}$ and so \n$$|\\mathcal{S}|+|\\mathcal{T}|\\leq 2^n.$$\nOn the other hand, Kleitman's lemma yields\n$$|\\mathcal{S}\\cap \\mathcal{T}|\\geq \\frac{|\\mathcal{S}|\\cdot |\\mathcal{T}|}{2^n}.$$\nWrite $$|\\mathcal{S}|=2^nx,\\,\\, |\\mathcal{T}|=2^ny$$\nthen $0\\leq x,y\\leq 1$ and $x+y\\leq 1$. We have \n$$|\\mathcal{S}\\cap \\mathcal{T}|=2^n(x+y)-|\\mathcal{S}\\cup \\mathcal{T}|\\leq 2^n(x+y)-2p,$$\nthus \n$$2^n(x+y-xy)\\geq 2p.$$\nWrite $p=2^n\\alpha$, then $x+y-xy\\geq 2\\alpha$ and clearly $x, y\\geq \\alpha$, since \n$|\\mathcal{S}|, |\\mathcal{T}|\\geq p$. Let $$a=x-\\alpha, \\,\\, b=y-\\alpha.$$\nThen\n$$a+b+2\\alpha\\geq 2\\alpha+(a+\\alpha)(b+\\alpha)$$\nthus \n$$\\alpha^2\\leq (a+b)(1-\\alpha)\\leq (1-2\\alpha)(1-\\alpha),$$\nwhich gives $\\alpha^2-3\\alpha+1\\geq 0$. Since $\\alpha<1$, this forces \n$\\alpha \\leq \\frac{3-\\sqrt{5}}{2}$ and $p\\leq \\frac{3-\\sqrt{5}}{2}\\cdot 2^n$. It is clear that we cannot have equality.","subject":"combinatorics"}
{"id":"C14","problem":"Starting with a finite list of distinct positive integers, we may replace any pair $n, n + 1$ (not necessarily adjacent in the list) by the single integer $n-2$, now allowing negatives and repeats in the list. We may also replace any pair $n, n + 4$ by $n - 1$. We may repeat these operations as many times as we wish. What is the most negative integer which can appear in a list?","proof":"We will look for an invariant of the form $\\sum_{n\\in L} x^n$, where \n$L$ is the list of integers. To have an invariant we should at least ask that \n$x^n+x^{n+1}=x^{n-2}$\nand $x^{n}+x^{n+4}=x^{n-1}$ for all $n$. \n\n This looks like a lot to ask for, but it reduces to $x^2+x^3=1$ and $x^5+x=1$.\nIs there such $x$? Start with any $x$ such that \n$x^2+x^3=1$, then compute $x^4=x(1-x^2)=x-(1-x^2)=x^2+x-1$ and \n$$x^5=x(x^2+x-1)=x^3+x^2-x=1-x^2+x^2-x=1-x.$$\n\nAnother way is to ``observe'' the identity \n$$X^5+X-1=(X^3+X^2-1)(X^2-X+1).$$\n Now choose $x$ the unique positive solution of the equation $x^3+x^2=1$ and get the invariant $\\sum_{n\\in L} x^n$.\n\nInitially all numbers of $L$ are positive integers, thus \n$$\\sum_{n\\in L} x^n \\leq \\sum_{n\\geq 1} x^n=\\frac{x}{1-x}=x^{-4}.$$\n Thus at any step we must have $\\sum_{n\\in L} x^n<x^{-4}$. Since $0<x<1$, this \nforces $n>-4$ for all $n\\in L$, at each step.\n\n To see we can get $-3$, working backwards yields the list \n\\[-3\\to -1, 0\\to 0, 1, 2\\to 1, 1, 2, 5\\to 1, 2, 3, 4, 5.\\]","subject":"combinatorics"}
{"id":"C15","problem":"Are there two different sets $A,B$, each consisting of at most $2011^2$ positive integers, such that for all $x\\in (0,1)$\n\\[\\left| \\sum_{a \\in A} x^a - \\sum_{b \\in B} x^b \\right| < (1-x)^{2011}?\\]","proof":"The answer is positive. The first step consists in finding a simple criterion that ensures the desired inequality.\n\n Suppose that we have two different sets of at most $2011^2$ positive integers \n$A,B$ such that the polynomial \n $P(x)=\\sum_{a \\in A} x^a - \\sum_{b \\in B} x^b$ is divisible by $(1-x)^{2012}$. \n We claim that we can find a positive integer $c$ such that the translations \n $A+c=\\{a+c|\\, a\\in A\\}$ and $B+c$ are solutions of the problem. \n Note that \n$$|\\sum_{a\\in A+c} x^a-\\sum_{b\\in B+c} x^b|=|x^c P(x)|.$$\n\n Write $P(x)=(1-x)^{2012}Q(x)$ for some polynomial $Q$. We need to prove that there is \n $c$ such that for all $x\\in (0,1)$\n $$|x^c (1-x)^{2012}Q(x)|<(1-x)^{2011}.$$\n This simplifies to $|x^c(1-x)Q(x)|<1$.\n Since $(1-x)Q(x)$ vanishes at $1$, there is $r\\in (0,1)$ such that \n $|(1-x)Q(x)|<1$ for $x\\in (r,1)$. Moreover, there is $M$ such that $|(1-x)Q(x)|<M$ for all $x\\in (0,1)$. \n\n Pick $c$ large enough so that $r^cM<1$, then for all \n $x\\in (0,1)$ we have $|x^c(1-x)Q(x)|<1$, as desired. Thus we are reduced to proving the existence of sets\n $A\\ne B$ consisting of at most $2011^2$ positive integers and such that \n $$(1-x)^{2012}\\mid P(x)=\\sum_{x\\in A} x^a-\\sum_{x\\in B} x^b.$$\n This happens if and only if $P^{(k)}(1)=0$ for $0\\leq k\\leq 2011$. But \n $$P^{(k)}(1)=\\sum_{a\\in A} a(a-1)...(a-k+1)-\\sum_{b\\in B} b(b-1)...(b-k+1).$$\n \n Thus we need to find $A,B$ such that for $0\\leq k\\leq 2011$ $$\\sum_{a\\in A} a(a-1)...(a-k+1)=\\sum_{b\\in B} b(b-1)...(b-k+1).$$\n Pick a very large integer $N$ and consider all subsets $A$ of \n $[N]=\\{1,2,...,N\\}$ with $2011^2$ elements. There are \n $\\binom{N}{2011^2}$ such subsets. \nFor each such subset $A$ and $0\\leq k\\leq 2011$ we have \n $$1\\leq \\sum_{a\\in A} a(a-1)...(a-k+1)<2011^2 N^k.$$\nThus the $2012$-tuple \n $$(\\sum_{a\\in A} 1, \\sum_{a\\in A} a,..., \\sum_{a\\in A} a(a-1)...(a-2010))$$\n can take at most $(2011^2)^{2012} N^{2011\\cdot 2012/2}$ different values. \n If $N$ is big enough, we have \n $$(2011^2)^{2012} N^{2011\\cdot 2012/2}<\\binom{N}{2011^2}$$\n and so we can find two different subsets $A,B$ of $[N]$ with \n $2011^2$ elements and with the same $2012$-tuple. Thus we are done.","subject":"combinatorics"}
{"id":"C16","problem":"Let $m\\geq n\\geq 2022$ be integers and let $a_1,\\ldots, a_n$ and \n$b_1,\\ldots, b_n$ be real numbers. Prove that there are at most $3n\\sqrt{m\\log n}$ pairs \n$(i,j)$ with $1\\leq i,j\\leq n$ and \n$$|a_i+b_j-ij|\\leq m.$$","proof":"Consider the bipartite graph $G$ with two classes $A=\\{1,\\ldots, n\\}$ and $B=\\{1,\\ldots, n\\}$ of $n$ vertices each, where we declare \n$i\\in A$ adjacent to $j\\in B$ if $|a_i+b_j-ij|\\leq m$. Let us double count triples $(x,y,z)$ with \n$x\\in A$ and $y\\ne z\\in B$ such that $xy$ and $xz$ are edges in $G$. Any $x\\in A$ contributes to \n$d(x)(d(x)-1)$ such triples, where $d(x)$ is the degree of $x$, so the number of triples is \n$$N=\\sum_{x\\in A} d(x)^2-d(x)\\geq \\frac{1}{n}(\\sum_{x\\in A} d(x))^2-\\sum_{x\\in A} d(x).$$\nNote that $k:=\\sum_{x\\in A} d(x)$ is the number of pairs $(i,j)$ with $i\\in A, j\\in B$ and $|a_i+b_j-ij|\\leq m$, i.e. the number we want to estimate. Thus \n$$k^2/n-k\\leq N.$$\nOn the other hand, fix $y\\ne z\\in B$ and suppose $(x,y,z)$ and $(x', y,z)$ are two triples as above. Then \n$$|a_x+b_y-xy|\\leq m, \\,\\, |a_x+b_z-xz|\\leq m,\\,\\, |a_{x'}+b_y-x'y|\\leq m, \\,\\, |a_{x'}+b_z-zx'|\\leq m.$$\nThe first two inequalities yield (using the triangular inequality) \n$$|b_y-b_z+xz-xy|\\leq 2m$$\nand the last two yield \n$$|b_z-b_y+x'y-x'z|\\leq 2m.$$\nUsing again the triangular inequality, we obtain $$|x'-x|\\leq \\frac{4m}{|y-z|}.$$\nThus if $x_1<\\ldots<x_{\\ell}$ all contribute to triples $(x_i, y,z)$, then\n$$\\ell-1\\leq x_{\\ell}-x_1\\leq 4m/|y-z|.$$\nIt follows that \n$$k^2/n-k\\leq \\sum_{1\\leq y\\ne z\\leq n} (1+4m/|y-z|)=n^2-n+8m\\sum_{1\\leq y<z\\leq n} \\frac{1}{z-y}.$$\nThus \n$$k^2/n-k\\leq n^2-n+8m\\sum_{k=1}^{n-1} (n-k)/k=n^2-n+8mn \\sum_{k=1}^{n-1} 1/k-8m(n-1)<8mn \\ln n.$$\nThe result follows quickly from this inequality.","subject":"combinatorics"}
{"id":"C17","problem":"Let $p$ be a prime number. A flea is at point $0$ of the real line. At each minute,\nthe flea has three possibilities: to stay at its position, or to move by $1$ to the left or to the right.\nAfter $p-1$ minutes, it wants to be at $0$ again. If $f(p)$ is number of its strategies to do this, find $f(p)$ modulo $p$.","proof":"Note that $f(p)$ is nothing but the coefficient of $x^0$ in $(x+1+x^{-1})^{p-1}$, or equivalently the coefficient of $x^{p-1}$ in $(x^2+x+1)^{p-1}=\\sum_{k=0}^{p-1} \\binom{p-1}{k} x^{2k} (x+1)^{p-1-k}$. This is $\\sum_{2k+j=p-1} \\binom{p-1}{k} \\binom{p-1-k}{j}=\\sum_{k=0}^{(p-1)/2} \\frac{(p-1)!}{k!^2 (p-1-2k)!}$. Alternatively, we could have obtained this expression by observing that there must be $k$ left movements, $k$ right movements, and $p-2k$ staying in the same position. Next, using Wilson's theorem we have \n$$(p-1-2k)!\\equiv -\\frac{1}{(2k)!}\\pmod p,$$\nthus \n$$f(p)\\equiv \\sum_{k=0}^{(p-1)/2} \\binom{2k}{k}\\pmod p.$$\nOn the other hand, \n$$ \\binom{2k}{k}=\\binom{-1/2}{k} (-4)^k\\equiv \\binom{\\frac{p-1}{2}}{k} (-4)^k \\pmod{p},$$\nso that \n$$f(p)\\equiv \\sum_{k=0}^{(p-1)/2} \\binom{\\frac{p-1}{2}}{k} (-4)^k =(-3)^{\\frac{p-1}{2}} \\pmod{p}.$$\nBy a standard computation with Legendre's symbols and quadratic reciprocity, we obtain \n$f(p) = 0$ for $p=2,3$ and $f(p) = 1$ when $p \\equiv 1 \\pmod{3},$ and $f(p) = -1$ when $p \\equiv 2 \\pmod{3}$.","subject":"combinatorics"}
{"id":"C18","problem":"An operation on a graph consists in choosing a $4$-cycle (if there is one) and deleting an edge (the one you like) \n from this cycle. Let $n\\geq 4$. What is the least number of edges you can get by applying operations to $K_n$?","proof":"When you delete an edge from a cycle in a connected graph, you don't disconnect the graph, so the final graph is connected and in particular it has at least $n-1$ edges.\n The key point is that this is not optimal: we will show that the final graph is not bipartite, in particular it cannot have $n-1$ edges (as then it would be a tree, so bipartite). For this it suffices to show that if a graph becomes bipartite after an operation, then it was already bipartite. \n \n Suppose that \n$G$ is not bipartite, but the graph obtained by deleting an edge $uv$ from a $4$-cycle $C$ of $G$ is bipartite. \n $u$ and $v$ must be in the same class of a bipartition of $G-uv$, and if \n$C=uvwz$ then $w$ and $v$ are in different classes, and so are $w,z$ and $z,u$. This is obviously impossible. \nSo the minimal number of edges we can get is at least $n$. \n \n This is indeed possible: argue by induction, the case $n=4$ being easy. Suppose we can handle $K_n$, let's handle \n $K_{n+1}$. For any neighbor $i\\ne 1$ of vertex $n+1$, delete the edge $i(n+1)$ by considering a cycle that contains the edge $(n+1)1$ and \n the edge $i(n+1)$. We end up with vertex $n+1$ connected to vertex $1$ only. Now apply induction to the $K_n$ spanned by vertices \n $1,2,...,n$.","subject":"combinatorics"}
{"id":"C19","problem":"A calculator can square a number or add $1$ to it. It cannot add $1$ two times in a row. By several operations it transformed a positive integer $x$ into a number $S > x^n + 1$ for some positive integer $n$. Prove that $S\\geq x^n +x-1$.","proof":"We exclude the obvious case $x=1$. The key point is to study how the remainder of the numbers on the board changes modulo $x^2+x+1$. Playing a bit seems to show that there are only four possibilities: $\\pm x, \\pm x^2$ for these remainders. \n\n To show this consider the minimal counterexample, so the calculator gives us a number $y$ not congruent to $\\pm x$ or $\\pm x^2$ and \nthis is the first time it gives such a number. Let $z$ be the number computed just before $y$, so $z\\equiv \\pm x, \\pm x^2\\pmod {x^2+x+1}$. Then \n$y=z+1$ or $y=z^2$. \n\n But $x^4\\equiv x\\pmod {x^2+x+1}$ and $(\\pm x)^2\\equiv x^2\\pmod {x^2+x+1}$, so necessarily $y=z+1$. Let $t$ be the number computed just before $z$. Since we cannot add $1$ two times in a row, we must have \n$z=t^2$. By minimality $t\\equiv \\pm x, \\pm x^2\\pmod{x^2+x+1}$, so $z=t^2\\equiv x^2, x\\pmod {x^2+x+1}$. But then \n$y=z+1\\equiv -x, -x^2\\pmod {x^2+x+1}$, a contradiction. \n\nNow write $S=x^n+1+y$ with $y\\geq 1$, and suppose that $y<x-2$. We know that $S\\equiv \\pm x, \\pm x^2\\pmod {x^2+x+1}$. Also $x^3\\equiv 1\\pmod {x^2+x+1}$, thus \n$x^n\\equiv 1, x, x^2\\pmod {x^2+x+1}$. Painfully check through cases and obtain that $y$ is congruent to one of the following numbers modulo \n$x^2+x+1$: $x-2, -x-2, -x-3, x-1, -1, -2x-1, -2x-2, 0, 2x, -1, 2x+1$. This is easily seen to be incompatible with the hypothesis $1\\leq y<x-2$.","subject":"combinatorics"}
{"id":"C20","problem":"Let $n>1$ be an integer. Let $A,B$ be subsets of the set \n$D$ of positive divisors of $n$ such that $a\\nmid b$ and $b\\nmid a$ for any $a\\in A$ and $b\\in B$. Prove that \n$$\\sqrt{|A|}+\\sqrt{|B|}\\leq \\sqrt{|D|}.$$","proof":"Let $A^-$ be the set of positive divisors of some element of $A$ and let $A^+$ be the set of positive divisors of \n$n$ which are multiples of some element of $A$. By assumption $A^+\\cap B^-=\\emptyset$ and \n$A^-\\cap B^+=\\emptyset$, so that \n$$|A^+|+|B^-|\\leq |D|,\\,\\, |A^-|+|B^+|\\leq |D|.$$\nUsing Cauchy-Schwarz \n$$\\sqrt{|D|}\\geq \\frac{1}{\\sqrt{|D|}}\\sqrt{(|A^+|+|B^-|)(|A^-|+|B^+|)}\\geq \\frac{1}{\\sqrt{|D|}} (\\sqrt{|A^+|\\cdot |A^-|}+\\sqrt{|B^+|\\cdot |B^-|}).$$\nThus it suffices to prove that \n$$|A^+|\\cdot |A^-|\\geq |A|\\cdot |D|,$$\nsince by symmetry a similar result will hold for $B$. We prove this by strong induction on the number of distinct prime factors of \n$n$. The result is trivial if $n=1$, so assume that it holds for $n$ having $k-1$ prime factors and suppose that \n$n$ has $k$ prime factors. Pick one prime divisor $p$ of $n$ and write $n=p^tm$ with $m$ prime to $p$ and \n$t\\geq 1$. Note that $m$ has $k-1$ distinct prime factors. Let $A^+_j$ be the set of elements of \n$A^+$ with $p$-adic valuation exactly $j$ and define similarly $A^-_j$ and $D_j$. Then $A^+_0\\subset A^+_1\\subset\\ldots\\subset A^+_t$ and \n$A^-_t\\leq\\ldots\\leq A^-_0$. Thus \nChebyshev's inequality gives \n$$|A^+|\\cdot |A^-|=(\\sum_{i=0}^t |A^+_i|)(\\sum_{i=0}^t |A^-_i|)\\geq (t+1)\\sum_{i=0}^t |A^+_i|\\cdot |A^-_i|.$$\nBy the inductive hypothesis $$|A^+_i|\\cdot |A^-_i|\\geq |D_i| |A_i|.$$ Note that $|D_i|$ is the number of positive divisors of \n$m$, which is $|D|/(t+1)$. Thus \n$$|A^+|\\cdot |A^-|\\geq |D|\\cdot \\sum_{i=0}^t |A_i|=|D|\\cdot |A|,$$\nas desired.","subject":"combinatorics"}
{"id":"C21","problem":"Let $n$ be a positive integer. On each edge of $K_{2^n+1}$ we put an integer in $\\{0,1,...,2^{n-1}-1\\}$ such that for any triangle \n the number on some edge of the triangle is the sum of the numbers on the other two edges. Prove that there is a triangle having only\n zeros on its edges.","proof":"Let $V$ be the set of vertices of $K_{2^n+1}$. Let $f(e)$ be the number written on the edge $e$. We induct on $n$, the case $n=1$ being clear.\n In order to apply the inductive hypothesis, it suffices to find a subset $V'$ of $V$ with $|V'|\\geq 2^{n-1}+1$ such that $f(e)$ is even\n for all edges $e$ connecting two vertices in $V'$.\n \nConsider the graph $G$ with vertices $V$, two vertices\n$x,y$ being adjacent if $f(e)$ is odd, where $e$ is the edge connecting $x$ and $y$. We will show that $G$ is bipartite, so \nit has an independent set of size $\\geq 2^{n-1}+1$, which finishes the inductive step.\n To show that $G$ is bipartite we use the lemma below, so it suffices to check that among three elements \n $x,y,z$ of $V$ there are $0$ or $2$ edges. But this is clear since by assumption \n the sum of the numbers on the edges of triangle $xyz$ is even.\n \n \n \n\n\\begin{lemma}\n In a graph $G$ there are $0$ or $2$ edges among any three vertices. Then $G$ is bipartite.\n\\end{lemma}\n\n\n\\begin{proof} If not, pick an odd cycle of smallest length $C=v_1v_2...v_n$.\n Considering the three vertices $v_1,v_2,v_3$ we see that \n $v_1$ and $v_3$ are not adjacent. \n Considering the vertices $v_1,v_3,v_4$ we deduce that $v_1$ and $v_4$ are adjacent. But then $v_1v_4...v_n$ is a shorter odd cycle, a contradiction.\n\\end{proof}","subject":"combinatorics"}
{"id":"C22","problem":"Let $S$ be a set of $n$ points in the plane such that no four points are collinear.\n Let $\\{d_1,d_2,\\cdots ,d_k\\}$ be the set of distances between pairs of distinct points in $S$.\n Let $m_i$ be the multiplicity of $d_i$, i.e. the number of unordered pairs $\\{P,Q\\}\\subseteq S$ with $|PQ|=d_i$. \n Prove that $\\sum_{i=1}^k m_i^2\\leq n^3-n^2$.","proof":"We will count ordered triples $(P, Q, R)$, where $P,Q,R$ are distinct elements of $S$ such that $PQ=PR$. First, for any ordered pair $(Q,R)$ of elements of $S$ there are at most $3$ triples of the form $(P,Q,R)$. Indeed, the\npoints $P$ such that $PQ=PR$ all lie on a line, and no four points of $S$ are collinear. So the number of triples is at most $3n(n-1)$.\n \nFor a point $P$ in $S$ and $i\\in [k]$ let $n_i(P)$ be the number of points $Q\\in S$ such that \n $PQ=d_i$. Note that for all $P$ we have $\\sum_{i=1}^{k} n_i(P)=n-1$, since any point of $S-\\{P\\}$ satisfies\n $PQ=d_i$ for a unique $i$. \n \n Now, fix $P\\in S$. For each $i\\in [k]$ there are $n_i(P)(n_i(P)-1)$ ordered pairs\n $(Q,R)$ with $PQ=PR=d_i$. So $P$ appears in $\\sum_{i=1}^{k} n_i(P)^2-(n-1)$ triples. Taking the sum over $P$, we obtain \n $$\\sum_{P\\in S} \\sum_{i=1}^{k} n_i(P)^2\\leq 4n(n-1).$$ \n Now, \n $$\\sum_{P\\in S} \\sum_{i=1}^{k} n_i(P)^2=\\sum_{i=1}^{k} \\sum_{P\\in S} n_i(P)^2\\geq \n $$ $$\\sum_{i=1}^{k} \\frac{\\left(\\sum_{P\\in S} n_i(P)\\right)^2}{n}=\\sum_{i=1}^{k} \\frac{4m_i^2}{n}.$$\n We conclude that \n $$4n(n-1)\\geq \\sum_{i=1}^{k} \\frac{4m_i^2}{n}$$\n and the result follows.","subject":"combinatorics"}
{"id":"C23","problem":"Let $1<a_1<a_2<\\ldots < a_n < 2a_1$ be integers and let \n$m$ be the number of distinct prime factors of $a_1a_2\\cdots a_n$. Prove that\n$$(a_1a_2\\cdots a_n)^{m-1}\\geq (n!)^m.$$","proof":"Fix a prime divisor $p$ of $a_1a_2\\ldots a_n$ and write \n$$a_i = p^{k_i} \\cdot b_i,$$ \nwith $k_i\\geq 0$ and $b_i$ relatively prime to $p$. If $b_i=b_j$ for some $i\\ne j$, then by symmetry we may assume that \n$k_i>k_j$ and we have $pa_j\\mid a_i$, but then \n$$a_n\\geq a_i\\geq pa_j\\geq pa_1\\geq 2a_1,$$\na contradiction. Thus the $b_i$'s are pairwise distinct and in particular \n$$b_1b_2\\ldots b_n \\ge n!.$$\nMultiplying such inequalities for each $p$ we get $$(a_1a_2\\ldots a_n)^{m-1} \\ge (n!)^{m}.$$","subject":"combinatorics"}
{"id":"C24","problem":"A triangle-free graph on $n$ vertices and having maximal degree $\\leq d$ has an independent set of size \nat least $\\frac{\\log_2 d}{8d}n$.","proof":"For $d\\leq 15$ the bound $n/(1+d)$ given by the Caro-Wei theorem is strongly enough to conclude, so assume that \n $d>15$. Pick a random independent \nset $W$ (for the uniform distribution). \nFor a vertex $v\\in V(G)$ consider the random variable $X_v$ defined by \n$$X_v(W)=d|\\{v\\}\\cap W|+|N(v)\\cap W|.$$\n\n We will prove that $E(X_v)\\geq 1/4\\cdot \\log_2 d$ for all $v$, thus the expected value of \n$\\sum_{v\\in V(G)} X_v$ is $\\geq 1/4\\cdot n\\log_2 d$. Since\n$$\\sum_{v\\in V(G)}X_v(W)=\\sum_{v\\in W} d+\\sum_{v\\in V(G)}\\sum_{w\\in W} 1_{w\\in N(v)}$$\n$$=d|W|+\\sum_{w\\in W} d(w)\\leq 2d|W|,$$\nwe obtain $E[|W|]\\geq 1/8d\\cdot n\\log_2 d$ and this is enough to conclude. \n\n Let us prove that $E(X_v)\\geq 1/4\\cdot \\log_2 d$. Let $H$ be the subgraph of \n$G$ induced by $V(G)\\setminus (N(v)\\cup \\{v\\})$. Let $S$ range over independent sets in \n$H$ and $W$ over independent sets in $V(G)$. \n\n Say we have $N$ independent sets in $V(G)$. We have \n$$E(X_v)=\\frac{1}{N}\\sum_{W} X_v(W)=\\sum_{S} \\frac{1}{N}\\sum_{W\\cap V(H)=S} X_v(W)$$\nso it suffices to prove that for each $S$ we have \n$$\\frac{1}{N}\\sum_{W\\cap V(H)=S} X_v(W)\\geq 1/4\\cdot \\log_2 d\\cdot P(W\\cap V(H)=S).$$\n\n Fix $S$ and let $X_S$ be the set of all non-neighbors of $S$ in $N(v)$. Since $G$ is triangle-free, $N(v)$ is an independent set, thus the \n$W$ with $W\\cap V(H)=S$ are exactly $S\\cup\\{v\\}$ and all $S\\cup T$ with $T\\subset X$. If $x=|X_S|$, \nthe inequality reduces to \n$$d+\\sum_{T\\subset X_S} |T|\\geq 1/4\\cdot \\log_2 d\\cdot (2^x+1)$$\nor $d+x2^{x-1}\\geq 1/4\\cdot \\log_2 d\\cdot (2^x+1)$. \\newline\n This is an easy exercise in algebra.","subject":"combinatorics"}
{"id":"C25","problem":"Prove that if $A_1,\\ldots, A_m$ are subsets of $\\{1,\\ldots, n\\}$, then \n$$\\sum_{i,j=1}^m |A_i|\\cdot |A_i\\cap A_j|\\geq \\frac{1}{mn} (\\sum_{i=1}^m |A_i|)^3.$$","proof":"For $x\\in [n]:=\\{1,\\ldots, n\\}$ let $n_x$ be the number of $i$'s with $x\\in A_i$. Clearly \n$$\\sum_{x=1}^n n_x=\\sum_{i=1}^m |A_i|.$$\nRewrite the inequality as \n$$\\sum_{i=1}^m |A_i|(\\sum_{j=1}^m |A_i\\cap A_j|)\\geq \\frac{1}{mn}(\\sum_{x=1}^n n_x)^3.$$\nFix $1\\leq i\\leq m$ and double count pairs $(x,j)$ with $x\\in A_i\\cap A_j$. Any $x\\in A_i$ contributes to \n$n_x$ pairs, thus the number of pairs is $\\sum_{x\\in A_i} n_x$, yielding \n$$\\sum_{j=1}^m |A_i\\cap A_j|=\\sum_{x\\in A_i} n_x.$$\nNow the Cauchy-Schwarz inequality gives $$\\sum_{i=1}^m |A_i|(\\sum_{j=1}^m |A_i\\cap A_j|)=\\sum_{i=1}^m |A_i|(\\sum_{x\\in A_i} n_x)\\geq $$\n$$\\geq \\sum_{i=1}^m (\\sum_{x\\in A_i} \\sqrt{n_x})^2\\geq \\frac{1}{m} (\\sum_{i=1}^m\\sum_{x\\in A_i} \\sqrt{n_x})^2=$$\n$$=\\frac{1}{m}(\\sum_{x=1}^n n_x\\sqrt{n_x})^2\\geq \\frac{1}{mn} (\\sum_{x=1}^n n_x)^3,$$\nthe last inequality being a consequence of convexity (power-mean inequality).","subject":"combinatorics"}
{"id":"C26","problem":"The positive integers $a,\\ b,\\ c$ are pairwise relatively prime. Let $g(a, b, c)$ be the maximum integer not representable in the form $xa+yb+zc$ with positive integral $x,\\ y,\\ z$. Prove that\n\\[g(a, b, c)\\ge \\sqrt{2abc}.\\]","proof":"Let $A=\\sqrt{2abc}$ and let $X$ be the set of integers of the form \n$xa+yb+zc$ with $x,y,z\\in \\mathbb{Z}_{>0}$. Thus $g(a,b,c)=\\max(\\{1,2,...\\}\\setminus X)$. Suppose that \n$g(a,b,c)<A$, thus $X$ contains all integers greater than $A$.\n\n Choose $c$ consecutive integers greater than $A$. Each such integer \n$n$ is of the form \n$n=xa+yb+zc$ with positive integers $x,y,z$. \n Then $ax+by<A$ and $ax+by\\equiv n\\pmod c$. Varying over such \n$n$ yields at least $c$ solutions in positive integers of the inequality $xa+yb<A$. \nOne can count the number of solutions of this inequality either geometrically or algebraically. Geometrically, look \n at lattice points in the triangle determined by the first quadrant and the line $xa+yb=A$. The area is \n $1/2\\cdot A/a\\cdot A/b=c$ and we get at most $c$ lattice points in the triangle.\n \n Algebraically, for each $x<A/a$ we have less than $(A-xa)/b$ possibilities for $y$, so in total we have at most \n $$\\sum_{x<A/a} (A-xa)/b<1/2\\cdot A/b\\cdot A/a=c$$\n solutions. Combining the two observations yields the result.","subject":"combinatorics"}
{"id":"C27","problem":"$100$ circles of radius one in the plane have the property that the triangle formed by the centres of any three given circles has area at most $2017$. Prove that there is a line intersecting at least three of the circles.","proof":"We can replace $100$ by $n$ and $2017$ by some $A>0$ and prove the existence of a line intersecting at least $\\frac {n}{\\sqrt A+1}$ of the circles.\n We will prove below that there is a line $\\ell$ such that when the centers of the $n$ circles are projected onto the line, the $n$ points lie in some interval with length at most $2\\sqrt{A}$. Project the circles onto $\\ell$, then each circle projects to an interval of length $2$, and all $n$ such intervals of length $2$ are contained in a large interval of length at most $2+2\\sqrt{A}$. It suffices to show that there exists a point contained in $\\frac {n}{\\sqrt A+1}$ length $2$ intervals, as then the perpendicular to $\\ell$ passing through this point will do the job. But this is clear from the pigeonhole principle.\n \n Let us prove the existence of $\\ell$. Choose two centers $A,B$ at maximal distance and let $d=AB$. By the area condition, for any other center $C$ of a circle \n we have\n $$d(C, AB)\\leq 2A/d.$$\n Moreover, the projection of $C$ on the line $AB$ is on the segment $AB$, by maximality (if not then one of $AC, BC$ would be greater than $d$). Thus we are done if $d\\leq 2\\sqrt{A}$, as we can simply pick $\\ell$ the line $AB$. Suppose that $d>2\\sqrt{A}$ and let $\\ell$ be any line perpendicular to $AB$. If \n $C$ is a center, then \n $d(C, AB)\\leq 2A/d<\\sqrt{A}$ and so when the centers are projected onto $\\ell$ they cover an interval of length less than \n $2\\sqrt{A}$.","subject":"combinatorics"}
{"id":"C28","problem":"Let $k$ be an even positive integer, and let \n$p_1,...,p_k$ be pairwise distinct prime numbers. Finally, let \n$N=p_1...p_k$, $a,b\\in \\{1,2,...,N\\}$ and let $S_1$ (resp. $S_2$) \nbe the number of divisors $d$ of $N$ belonging to $[a,b]$ and having an even (resp. odd) number of prime \nfactors. Prove that $S_1-S_2\\leq \\binom{k}{k/2}$.","proof":"Call a divisor $d$ of $n$ even-nice (resp. odd-nice) if it belongs to $[a,b]$ and has an even (resp. odd) number of prime factors. \n Decompose the set of positive divisors of $N=p_1...p_k$ into symmetric chains. There are \n $\\binom{k}{k/2}$ such chains. \n \n Fix such a chain, say $C=\\{d_1,...,d_l\\}$, where $d_{i+1}/d_i$ is a prime number for all $i$. It suffices to show that the difference between the \n number of even-nice and odd-nice divisors of $N$ in $C$ is $\\leq 1$. \nIf $C\\cap [a,b]$ is empty, we're done, so suppose this is not the case. Let \n $d_i=\\min (C\\cap [a,b])$ and $d_j=\\max(C\\cap [a,b])$. Then obviously $C\\cap [a,b]=\\{d_i,...,d_j\\}$. \n Since $d_{k+1}/d_k$ is a prime for $i\\leq k<j$, it is clear that the difference between the number of even-nice divisors and odd-nice divisors in \n $\\{d_i,...,d_j\\}$ is $\\leq 1$ and we are done.","subject":"combinatorics"}
{"id":"C29","problem":"Label the edges of a regular icosahedron $1,2,\\ldots, 30$. Find the number of ways to paint each edge red, white or blue such that each of the $20$ triangular faces of the icosahedron has two edges of some color and a third of a different color.","proof":"We will prove that the answer is $12^{10}$. Replace colors by $0,1,2$ and work in \nthe field with $3$ elements $k=\\mathbf{F}_3$. Let $E, F$ be the sets of edges and faces of the icosahedron.\nThe set ${\\rm Col}_E$ of colorings $c: E\\to k$ has a natural structure of \n$k$-vector space of dimension $|E|=30$. Consider the linear map \n$$T: {\\rm Col}_E\\to V:=\\prod_{f\\in F} k,$$\nwhere the $f$-component of $T(c)$ is the sum of $c(e)$ over the three edges $e$ of the face $f$. We are asked to find the number of colorings $c$ for which $T(c)$ has all components nonzero. A key observation is that \n$T$ is surjective. Indeed, by symmetry it suffices to find a coloring $c$ for which $T(c)$ is one of the standard basis vectors of $V$. The coloring $c$ with values $2,1,2,1,2$ at the five edges around a vertex and value $0$ at any other edge has the property that $T(c)$ has only one nonzero component, proving the surjectivity of $T$. \n Since $T$ is surjective, $\\ker(T)$ has dimension $10$. Each of the $4^{10}=2^{20}$ elements of $V$ with no nonzero component has exactly $3^{10}$ pre-images, so the required number of colorings is $3^{10}\\cdot 4^{10}=12^{10}$.","subject":"combinatorics"}
{"id":"C30","problem":"Let $G$ be a graph with $n$ vertices, each of positive degree and let $E$ be the set of edges of $G$. Prove that there are at least $n$ and at most $n!$ of assigning an integer $f(v)$ to each each vertex $v$ such that $\\sum_{v} f(v)=|E|$ and for any nonempty subset \n$A$ of $V$ there is a vertex $v\\in A$ such that $f(v)$ is at most the number of neighbors of $v$ in $V\\setminus A$.","proof":"Let $f$ be such an assignment. Taking $A=V$ we obtain a vertex $v_1$ with $f(v_1)\\leq 0$. Taking $A=V\\setminus \\{v_1\\}$ we obtain \n$v_2\\ne v_1$ such that $f(v_2)$ is at most the number of neighbors of $v_2$ in $\\{v_1\\}$ (which is thus $0$ or $1$). Continuing like this (at the next step apply the hypothesis to $A=V\\setminus \\{v_1,v_2\\}$, etc), we obtain a permutation $\\sigma(v_1,\\ldots, v_n)$ of the set of vertices $V$ such that \n$f(v)\\leq f_{\\sigma}(v)$, where $f_{\\sigma}(v_i)$ is the number of neighbors of $v_i$ in $\\{v_1,\\ldots, v_{i-1}\\}$. By double counting it is obvious that for each permutation $\\sigma$ we have $\\sum_{i=1}^n f_{\\sigma}(v_i)=|E|$, and since $\\sum_{i=1}^n f(v_i)=|E|$ and $f(v_i)\\leq f_{\\sigma}(v_i)$ for all \n$i$, we must have $f=f_{\\sigma}$. Moreover, for any $\\sigma$ and any nonempty set $A\\subset V$ there is $v\\in A$ such that \n$f(v)$ is at most the number of neighbors of $v$ in $V\\setminus A$. Indeed, if $A=\\{v_{i_1},\\ldots, v_{i_k}\\}$ with \n$i_1<\\ldots<i_k$, then clearly $\\{v_1,\\ldots, v_{i_1-1}\\}\\subset V\\setminus A$ and $f_{\\sigma}(v_{i_1})$ is the number of neighbors of \n$v_{i_1}$ in $\\{v_1,\\ldots, v_{i_1-1}\\}$. Thus each $f_{\\sigma}$ is a valid assignment, and each valid assignment is of this form. There are \n$n!$ choices for $\\sigma$, so this already gives the upper bound. We still need to prove that when varying $\\sigma$ we obtain at least \n$n$ different assignments $f_{\\sigma}$. We reduce first to the case when $G$ is connected. Let $G_1,\\ldots, G_k$ be the connected components, say \n$G_i$ has $n_i$ vertices and observe that since each vertex has positive degree $n_i>1$. If we know that each $G_i$ has at least \n$n_i$ assignments, by patching valid assignments for each $G_i$ we obtain that the number of valid assignments for $G$ is at least $n_1\\ldots n_k$. Since $n_i>1$ for all $i$, this is at least $n_1+\\ldots+n_k=n$. So assume that $G$ is connected, we will construct for each vertex \n$v_1$ a permutation $\\sigma$ such that $f_{\\sigma}(v_1)=0$ and $f_{\\sigma}$ takes positive values at any other vertex. Varying $v_1$ we will obtain at least $n$ good assignments. But this is very since, since we can pick $v_2\\ne v_1$ adjacent to $v_1$, then \n$v_3\\ne v_1, v_2$ adjacent to at least one of $v_1, v_2$ and continue this way till we obtain a permutation of all vertices.","subject":"combinatorics"}
{"id":"C31","problem":"How many ordered $64$-tuples $(x_0,x_1,\\dots,x_{63})$ consisting of pairwise distinct elements of \n$\\{1,2,\\dots,2017\\}$ satisfy\n\\[2017\\mid x_0+x_1+2x_2+3x_3+\\cdots+63x_{63}?\\]","proof":"Note that $p:=2017$ is a prime number and $p=1+1+2+3+...+63$. We will work in $\\mathbb{F}_p$. Since \n$p=1+1+2+...+63$, if $(x_0,x_1,...,x_{63})$ is a solution of the congruence $x_0+x_1+...+63x_{63}\\equiv 0\\pmod p$ with \n$x_0,...,x_{63}$ pairwise distinct, then so are $(x_0+t, x_1+t,..., x_{63}+t)$ for all $t\\in \\mathbb{F}_p$. Thus the desired number is \n$2017$ times the number of solutions of the congruence $$x_1+2x_2+...+63x_{63}\\equiv 0\\pmod p$$ with $x_i$ pairwise distinct and nonzero modulo $p$.\n\nMore generally, consider positive integers $a_1,...,a_k$ with $a_1+...+a_k<p$ and let \n$f(k)$ be the number of solutions of the congruence $$a_1x_1+...+a_kx_k\\equiv 0\\pmod p$$ with $x_i$ non-zero and pairwise distinct. It is clear that $f(1)=0$. We will prove below that for $k>1$ we have \n$$f(k)=\\frac{(p-1)!}{(p-k)!}-kf(k-1),$$\nin particular $f(k)$ is independent of the choice of $a_1,...,a_k$.\nTake this for granted for a moment and let $g(k)=pf(k)/k!$, then $g(1)=0$ and \n$g(k)=\\binom{p}{k}-g(k-1)$. A simple induction shows that $$g(k)=\\binom{p-1}{k}+(-1)^k(p-1),$$ thus the answer to the problem is \n$$2017 f(63)=63!g(63)=63!(\\binom{2016}{63}-2016).$$ \n\nIt remains to prove the recurrence relation for $f$. We argue by induction, the base case being clear. Let \n$X$ be the set of $k$-tuples of pairwise distinct elements of $\\mathbb{F}_p$. Clearly $S$ has $p!/(p-k)!$. The group\n$\\mathbb{F}_p$ acts on $X$, an element $i\\in \\mathbb{F}_p$ acting on a $k$-tuple by shifting each entry by $i$. Using that \n$a_1+...+a_k\\in (0,p)$, we easily see that exactly one element in each orbit gives a solution of the congruence. We have to exclude those solutions for which some $x_i$ vanishes. But if $x_i$ vanishes, then all other $x_j$ are nonzero, and by the inductive hypothesis we have \n$f(k-1)$ solutions with $x_i=0$. This finishes the proof of the recurrence relation.","subject":"combinatorics"}
{"id":"C32","problem":"An airline operates flights between any two capital cities in the European Union. Each flight has a fixed price which is the same in both directions and flight prices from any given city are pairwise distinct. Anna and Bella wish to visit each city exactly once, not necessarily starting from the same city. While Anna always takes the cheapest flight from her current city to some city she hasn't visited yet, Bella always continues her tour with the most expensive flight available. Is it true that Bella's tour will surely cost at least as much as Anna's tour?","proof":"Unsurprisingly the answer is positive.\nConsider the bipartite graph $G$ with bipartition $A,B$, where vertices in $A$ (resp $B$) are the flights of Anna (resp. Bella). Connect $b\\in B$ and $a\\in A$ if $p(b)\\geq p(a)$, where $p(?)$ is the price of flight $?$.\nWe will show that $G$ has a perfect matching, so \nthere is a bijection between the flights of Bella and the flights of Anna, which maps a more expensive one to a less expensive one, which yields the result. \n\nLet us check Hall's condition. Let $b_1,b_2,\\dots,b_k\\in B$ and suppose that Bella takes these flights in this order. If $f$ is a flight, call $D$ (resp. $A$) the departure (resp. arrival) city. Look at the $k+1$ cities \n$D(b_1),...,D(b_k), A(b_k)$. Say Anna visits these cities in the order $a_1,...,a_{k+1}$. Let $f_1,...,f_k$ be the flights Anna takes from $a_1,...,a_k$. \n\nFix $i$ and assume Bella visits $a_i$ first and after that $a_{i+1}$. Then \n$p(f_i)\\leq p(a_i a_{i+1})\\leq p(f_B(a_i))$, where $f_B(a_i)$ is the flight taken by Bella from $a_i$. \nNow $f_B(a_i)\\in \\{b_1,...,b_k\\}$ and $f_i$ is a neighbor of the set $b_1,...,b_k$. Suppose now that Bella visits $a_{i+1}$ first and then $a_i$. Then \n$p(f_i)\\leq p(a_ia_{i+1})\\leq p(f_B(a_{i+1}))$ and $f_i$ is again a neighbor of $b_1,...,b_k$. \nThus in all cases $f_1,...,f_k$ are all neighbors of the set $b_1,...,b_k$ and Hall's condition holds.","subject":"combinatorics"}
{"id":"C33","problem":"Let $n\\geq 2$ be an integer and let $C_n$ be the set of points in the plane with coordinates in $\\{1,2,\\ldots, n\\}$. Let \n$S$ be a subset of $C_n$ such that any point of $C_n$ lies on a line determined by two points of $S$. Prove that \n$|S|\\geq (n/4)^{2/3}$.","proof":"Consider the slope of a line passing through two points of $C_n$. This slope is $0,\\infty$ or of the form \n$\\pm a/b$ with $a,b\\in \\{1,2,\\ldots, n\\}$ relatively prime. If the slope is $0$ or $\\infty$ the line contains $n$ points of $C_n$. Suppose that the slope is \n$\\pm a/b$, with $a,b$ as above, thus the equation of the line is $by=\\pm ax+c$ for some integer $c$. If $(x_0, y_0)$ is one point on the line, the other points are $(x_0+kb, y_0\\pm ka)$ for some integer $k$, and so that line contains at most $\\min(n/a, n/b)$ points of $C_n$. For a line $D$ as before \ndefine $f(D)=1$ if $D$ has slope $0$ or $\\infty$, and $f(D)=\\max(a,b)$ if $D$ has slope $\\pm a/b$. The above discussion shows that \n$$|D\\cap C_n|\\leq n/f(D).$$\n\nFor $1\\leq k\\leq n$ let $s_k$ be the number of lines $D$ passing through two points of $S$ and such that $f(D)=k$. By assumption and the above inequality we have \n$$n^2\\leq \\sum_{k=1}^n \\frac{n}{k}s_k,$$\nthus \n$$n\\leq \\sum_{k=1}^n \\frac{s_k}{k}.$$\nOn the other hand we have\n$$\\sum_{k=1}^n s_k\\leq \\binom{s}{2}\\leq s^2/2,$$\nwhere $s=|S|$. Moreover we clearly have $s_k\\leq 4ks$ for all $k$, since for a given point of $S$ there are at most $4k$ possibilities for the slope of the line passing through the point. \n\nWe claim that the above inequalities are enough to conclude. Indeed, if $s_1\\ne 4s$ then we can replace $(s_1, s_2)$ by $(4s, s_2+s_1-4s)$, note that this keeps $s_1+\\ldots+s_n$ constant and increases $\\sum_{k=1}^n \\frac{s_k}{k}$. Thus we may assume that $s_1=4s$ and repeating this type of process we may assume that for some $t$ the numbers $s_1,\\ldots, s_t$ take values $4s, 8s,\\ldots, 4ts$, $s_{t+1}$ takes the remaining value \nand all other $s$'s are zero. Then \nthe inequality $s_1+\\ldots+s_n\\leq s^2/2$ yields $2t<\\sqrt{s}$ and the inequality $n\\leq \\sum_{k=1}^{t+1} s_k/k$ becomes \n$$n\\leq 4(t+1)s\\leq 8ts\\leq 4 s^{3/2},$$\nyielding the desired result.","subject":"combinatorics"}
{"id":"C34","problem":"Let $m$ be a positive integer and consider a social network with a fixed finite set of users, each user having a fixed set of followers (among the other users), as well as an initial rating, a positive integer which may not be the same for all users. Every midnight, the rating of every user increases by the sum of the ratings that his followers had just before midnight.\nA hacker, who is not a user of the social network, wants all the users to have ratings divisible by $m$. Every day, he can either choose a user and increase his rating by 1, or do nothing. Prove that the hacker can achieve his goal after some number of days.","proof":"Say there are $n$ users, called $1,\\ldots, n$. \nLet $a_{ij}$ be $1$ if user $j$ follows user $i$ and let $A=(a_{ij})$ the resulting binary matrix. Each day we can record the user's ratings taken modulo $m$ by a vector. Note that by assumption if the vector recording the ratings is \n$v$ before midnight, it will be $Av$ after midnight. Let $e_i$ be the vector all of whose coordinates are \n$0$, except for a $1$ in position $i$. Thus each midnight, if the vector is $v$ before midnight, the hacker can pick some $i$ and replace $v$ by $v+e_i$ (addition being performed modulo $m$), or do nothing. \n\nNow let $a_1,\\ldots, a_n$ be the initial ratings modulo $m$, and set $b_i=m-a_i$. \nChoose positive integers $p>c_1>c_2>...>c_{b_1+...+b_n}$ such that $A^p\\equiv A^{c_j}\\pmod m$ for any $j$, which is definitely possible since the sequence $(A^n \\pmod m)_{n\\geq 1}$ can take only finitely many possible values.\nAll that the hacker has to do is to add $e_i$ in midnights $p-c_{b_1+...+b_{i-1}+1},...,p-c_{b_1+....+b_i}$ for each $i$, since then the resulting vector will be \n$$A^px+\\sum_{i=1}^{n}(A^{c_{b_1+...+b_{i-1}+1}}+....+A^{c_{b_1+....+b_i}})e_i=$$\n$$=\\sum_{i=1}^{n} (a_i\\cdot A^p+A^{c_{b_1+...+b_{i-1}+1}}+....+A^{c_{b_1+....+b_i}})e_i\\equiv 0\\pmod m,$$\nas for all $1\\leq i\\leq n$ we have \n$$(a_i\\cdot A^p+A^{c_{b_1+...+b_{i-1}+1}}+....+A^{c_{b_1+....+b_i}})e_i\\equiv 0\\pmod m.$$","subject":"combinatorics"}
{"id":"C35","problem":"A graph $G$ contains no $K_4$ and its chromatic number is $\\geq 4$. Prove that there is a partition $V(G)=A\\cup B$ such that the graphs induced by $A$ and $B$ have chromatic numbers $\\geq 3$ and $\\geq 2$.","proof":"Let $\\chi(X)$ be the chromatic number of $X$. Suppose that this is not the case, i.e. for any partition $V=A\\cup B$ of the vertices, \nthe induced subgraphs on $A$ and $B$ satisfy $\\chi(A)\\leq 2$ or $\\chi(B)\\leq 1$. \nPick an odd cycle $C$ of minimal length (it exists since $G$ is not bipartite). Since $\\chi(C)=3$, the graph induced by $V(G)\\setminus V(C)$ has chromatic number \n$\\leq 1$, i.e. $V(G)\\setminus V(C)$ is an independent set. \n\nLet $v_1,...,v_n$ be the vertices of $C$, so that $n$ is odd.\ncolor $v_1,...,v_{n-1}$ alternately red and blue, and color \n$v_n$ green. For any $x\\in V(G)-\\{v_1,...,v_n\\}$, if $x$ is not adjacent to $v_n$ give $x$ color green. \nClassify the remaining $x$'s (thus $x\\in V(G)-\\{v_1,...,v_n\\}$ is adjacent to $v_n$) into good and bad: good if the neighbors of $x$ among \n$v_1,...,v_{n-1}$ have the same color, bad otherwise. \nIf $x$ is good, give it the color among red and blue which is not used by its neighbours among\n$v_1,...,v_{n-1}$. If all $x$'s are good, we obtain this way a proper $3$-coloring of $G$, a contradiction with $\\chi(G)=4$. \n\nPick a bad vertex $x$. Thus $x$ is connected to $v_n$ as well as a red and a blue vertex among \n$v_1,...,v_{n-1}$, say $v_i$ and $v_j$. If $n=3$, we get a $K_4$ in $G$, a contradiction. Thus $n>3$. Use the edges $xv_i$, $xv_j$ and the part between $v_i$ and $v_j$ in $C$ to create a shorter odd cycle, a contradiction.","subject":"combinatorics"}
{"id":"C36","problem":"Let $n>1$ be an integer and let $a_1,\\ldots, a_n$ be positive integers. Suppose that we have an unlimited supply of coins, each with value in $\\{a_1,\\ldots, a_n\\}$ and that the sum $a_1+a_2+\\ldots+a_n$ can be collected in only one way, by taking one coin of each value.\\\\\na) Give an example of such integers $a_1,\\ldots, a_n$ such that $a_1+a_2+\\ldots+a_n<n\\cdot 2^n$.\\\\\nb) Prove that $$\\min (a_1,\\ldots, a_n)\\geq 2^{n-1}.$$","proof":"a) We will show that setting $a_i=2^n-2^{n-i}$ yields a solution. Note that \n$$a_1+\\ldots+a_n=(n-1)2^n+1<n\\cdot 2^n.$$\nSuppose that we could collect the sum $S=a_1+\\ldots+a_n$ in the form \n$$S=a_{i_1}+\\ldots+a_{i_p}.$$\nWe will prove that $j_k:=n-i_k$ are necessarily given by $j_k=k-1$, so we have uniqueness. Note that \n$j_k\\in \\{0,1,\\ldots, n-1\\}$ and \n$$(n-1)2^n+1=S=p\\cdot 2^n-(2^{j_1}+\\ldots+2^{j_p}).$$\nSince $S>(n-1)2^n$, this forces $p\\geq n$. Let us order $j_1\\leq\\ldots j_p$. Taking the above equality modulo \n$2^n$ yields $2^{j_1}+\\ldots+2^{j_p}\\equiv -1\\pmod {2^n}$. Suppose that \n$j_k\\geq k$ for some $k\\leq n$, and pick the smallest such $k$. Then $2^{j_1}+\\ldots+2^{j_{k-1}}$ is congruent to \n$-1$ modulo $2^k$ and it is positive and bounded from above by $2^{k-1}-1$, a contradiction. Thus \n$j_k\\leq k-1$ for $k\\leq n$ and then \n$$(p-n+1)2^n-1=2^{j_1}+\\ldots+2^{j_n}+2^{j_{n+1}}+\\ldots+2^{j_p}\\leq 2^n-1+(p-n)2^{n-1}.$$\nThis immediately forces $p=n$ and $j_k=k-1$ for all $k$.\n\nb) Let $X$ be the multiset of all sums that can be collected using the coins $a_2,\\ldots, a_n$, each being used at most once. This multiset consists of $2^{n-1}$ numbers, the smallest being $0$ and the largest being $a_2+\\ldots+a_n$. We will prove that the elements of $X$ are pairwise distinct modulo $a_1$, which is enough to conclude that \n$a_1\\geq 2^{n-1}$. Suppose indeed that there are two elements $x>y$ in $X$ with $a_1\\mid x-y$, say \n$x-y=ak$. Remove from the coins $a_1,\\ldots, a_n$ the collection used to form $x$, add the collection used to form \n$y$ and add $k$ coins with value $a_1$. We obtain this way a different way to collect the sum \n$S=a_1+\\ldots+a_n=S-x+y+ak$, contradicting the hypothesis.","subject":"combinatorics"}
{"id":"C37","problem":"Let $a_1,\\ldots, a_n$ be nonzero real numbers, not necessarily distinct. What is the largest possible number of subsets $A\\subset \\{1,\\ldots, n\\}$ such that $\\sum_{x\\in A} a_x=0$?","proof":"Taking the first $\\lfloor n/2\\rfloor$ $a_i$'s equal to $1$ and the others to $-1$ we obtain \n$N=\\binom{n}{\\lfloor n/2\\rfloor}$ such subsets. To prove that this is maximal set \n$a_A=\\sum_{x\\in A} a_x$ and say $A$ is good if $a_A=0$. For each good set \n$A$ let $X_A$ be the set of those \n$i\\in \\{1,\\ldots, n\\}$ for which either $a_i>0$ and $i\\in A$ or $a_i<0$ and $i\\notin A$. We will prove that if \n$A_1,A_2$ are distinct good sets then $X_{A_1}$ and $X_{A_2}$ have no inclusion relation (i.e. one is not a subset of the other). Suppose that $X_{A_1}\\subset X_{A_2}$. In particular if $i\\in A_1$ satisfies $a_i>0$ then $i\\in A_2$ and so \n$$\\sum_{i\\in A_1, a_i>0} a_i\\leq \\sum_{i\\in A_2, a_i>0} a_i$$\nand similarly \n$$\\sum_{i\\in A_1, a_i<0} a_i\\leq \\sum_{i\\in A_2, a_i<0} a_i.$$\nBut $$\\sum_{i\\in A_1, a_i>0} a_i+\\sum_{i\\in A_1, a_i<0} a_i=\\sum_{i\\in A_1} a_i=0$$\nand similarly \n$$\\sum_{i\\in A_2, a_i>0} a_i+\\sum_{i\\in A_2, a_i<0} a_i=0.$$\nThus all the above inequalities must be equalities and then $A_1=A_2$, a contradiction.\nApplying Sperner's theorem, it follows that at most $N$ sets $A$ can be good.","subject":"combinatorics"}
{"id":"C38","problem":"Let $n$ be a positive integer and let $A_1,\\ldots, A_{2^n+1}$ be finite sets. We color these sets red and blue such that there is at least one red and at least one blue set. Prove that there are at least $2^n$ different sets which can be obtained as the symmetric difference of a red set and a blue set. Here the symmetric difference of two sets as the set of objects belonging to exactly one of the two sets.","proof":"Let $d$ be the size of the union of the $A_i$'s and say $x_1,\\ldots, x_d$ are the elements of $\\cup_{i} A_i$. For each subset \n$S$ of $\\{x_1,\\ldots, x_d\\}$ let $v_S\\in\\mathbf{F}_2^d$ be the vector whose $j$th coordinate is $1$ if and only if $x_j\\in S$. \nNote that \n$$v_{A_i\\Delta A_j}=v_{A_i}+v_{A_j}.$$ Thus we are reduced to proving that if \n$R,B$ are subsets of $\\mathbb{F}_2^d$ with $|R|+|B|=2^n+1$, then $|R+B|\\ge |R|+|B|-1$. A key observation is that this is a purely group-theoretic question now, and so we can replace $\\mathbb{F}_2^d$ by a group isomorphic to it, namely $\\mathbf{F}_{2^d}$ with its additive structure. Now we can exploit that $k=\\mathbf{F}_{2^d}$ is a field. We claim that if $A,B\\subset k$ are subsets with $\\binom{|A|+|B|-2}{|A|-1}\\ne 0$ in $k$, then \n$$|A+B|\\ge|A|+|B|-1.$$ This variation on Cauchy-Davenport holds for any field and is proved in the same way as the Cauchy-Davenport theorem: take a subset $C$ of $k$ with size $|A|+|B|-2$, we want to prove that \\[f(X,Y):=\\prod_{c\\in C}(X+Y-c)\\] is not identically zero on $A\\times B$. But the\ncoefficient of $X^{|A|-1}Y^{|B|-1}$ in $f$ is $\\binom{|A|+|B|-2}{|A|-1}\\ne 0$, so the result follows by the combinatorial Nullstellensatz.\n\nIn order to finish the proof we still need to check that $\\binom{|R|+|B|-2}{|R|-1}$ is odd, but it is easy to see that $\\binom{2^n-1}{k}$ is odd for all $0\\le k\\le 2^n-1$.","subject":"combinatorics"}
{"id":"C39","problem":"Let $p>3$ be a prime and color each of the numbers $1,2,\\ldots, p-1$ in red, blue or green. Assume that all three colors are used. Prove that there are three numbers $x,y,z$ with pairwise distinct colors such that $x+y\\equiv z\\pmod p$.","proof":"Let $A,B,C$ be the sets of numbers colored red, blue or green respectively and suppose that the congruence $x+y\\equiv z\\pmod p$ has no solution with $x,y,z$ belonging to three different subsets among $A,B,C$. We work in $\\mathbf{F}_p$ from now on. For $1\\leq r\\leq p-1$ the sets \n$rA, rB, rC$ still form a partition of $\\mathbf{F}_p^*$ and the equation $x+y\\equiv z\\pmod p$ has no solutions with $x,y,z$ in three different sets among\n$rA, rB, rC$. We may assume that $A$ has the smallest size among $A,B,C$, and replacing $A$ by $rA$ for a suitable $r$ we may assume that \n$A$ contains $1$. Let $k$ be the largest positive integer for which $1,\\ldots, k\\in A$. We may assume that $k+1$ is in $B$. \nIf $c\\in C$ and $i\\in \\{1,\\ldots, k\\}$ then we can't have $c-i\\in B$ (since $i+(c-i)\\equiv c\\pmod p$) and we can't have \n$c+i\\in B$ (consider $i+c\\equiv c+i\\pmod p$). Moreover, we can't have $c+i\\in C$ and $c-(k+1-i)\\in A$ (since $c-(k+1-i)+k+1\\equiv c+i\\pmod p$). \nLet $c_1=\\min C$, then by the above observations $c-(k+1-i)\\in A$ and $\\{1,2,\\ldots,k\\} \\cup \\{c-1,c-2,\\ldots,c-k\\} \\cup \\{c+1,c+2,\\ldots,c+k\\} \\in A$. \nLet $c_2=\\min C\\setminus \\{c_1\\}$. The same argument shows that the $k$ elements either side of $c_2$ belong to $A$. Continuing in this manner it follows that for each $c\\in C$ the $k$ elements either side of $c$ belong to $A$. Since $1,\\ldots, k\\in A$ and $k+1\\in B$, it follows that $A$ has more elements than $C$, a contradiction.","subject":"combinatorics"}
{"id":"C40","problem":"A connected graph has $1998$ vertices and each vertex has degree $3$. Prove that we can delete $200$ vertices, no two of them joined by an edge, such that the resulting graph is connected.","proof":"Let $G_0=G$ be the original graph. We will construct \ngraphs $G_1=G_0-v_1$, $G_2=G_1-v_2=G-\\{v_1,v_2\\}$,..., $G_{i}=G-\\{v_1,...,v_{i}\\}$\nsuch that $d_{G_{i-1}}(v_i)=3$ and all $G_i$ are connected for $1\\leq i\\leq 200$. \nThe condition $d_{G_{i-1}}(v_i)=3$ ensures that all $3$ neighbors of $v_i$ in $G=G_0$ are in $G_{i-1}$ and so cannot be among \n$v_1,...,v_{i-1}$, thus $v_1,...,v_{200}$ are pairwise non-adjacent. \n\nSuppose we constructed $G_i=G-\\{v_1,...,v_{i}\\}$ with $i\\leq 199$ and let us construct \n$G_{i+1}$. Note that $G_i$ has $n-i$ vertices (where $n=1998$) and $|E(G_i)|=|E(G)|-3i=3n/2-3i$.\nThe bound on $i$ forces $|E(G_i)|\\geq 4/3\\cdot |V(G_i)|$, thus by the next lemma there are two intersecting cycles in $G_i$. Pick a common vertex $v$ of the two cycles. If it has degree $3$ in $G_i$, set \n$v_{i+1}=v$. We easily check that deleting this vertex keeps the graph connected.\n\nIf $v$ has degree $2$ in $G_i$, the two sides leaving from $v$ must both be sides of the two cycles intersecting at $v$. Replace $v$ by an endpoint $w$ of one of these two sides. If $w$ has degree \n$3$ in $G_i$, delete it, otherwise look at the other side of the first cycle leaving from $w$ and its endpoint different from $w$, etc. Since the two cycles are different, this process must stop at a common vertex of degree $3$ in $G_i$. Call that vertex $v_{i+1}$.\n\n\\begin{lemma}\nA connected graph on $n$ vertices with at least $4n/3$ edges contains two intersecting cycles.\n\\end{lemma}\n\n\\begin{proof} Pick a spanning tree $T$, so $T$ has $n-1$ edges. Adding any edge \n$e\\in E(G)\\setminus E(T)$ to $T$ creates a unique cycle $C_e$. \nIf no two cycles intersect, the vertices of the $C_e$ are disjoint and each \n$C_e$ has at least $3$ vertices, thus $n\\geq 3|E(G)\\setminus E(T)|$ and so \n$$4n/3\\leq |E(G)|\\leq |E(T)|+|E(G)\\setminus E(T)|\\leq n-1+n/3,$$\na contradiction. \n\\end{proof}","subject":"combinatorics"}
{"id":"C41","problem":"Prove that for all positive integers $a,b$\n\\[\\sum_{i,j \\ge 0} \\binom{i+j}{i}^2 \\binom{(a-i)+(b-j)}{a-i}^2=\\frac{1}{2} \\binom{(2a+1)+(2b+1)}{2a+1}.\\]","proof":"Set $$S=\\sum_{i,j \\ge 0} \\binom{i+j}{i}^2 \\binom{(a-i)+(b-j)}{a-i}^2.$$\nLetting $s=i+j$, we observe that \n$$S = \\sum_{s\\geq 0}\\sum_{i=0}^s \\binom{s}{i}^2 \\binom{a+b-s}{a-i}^2.$$ The generating function\n$$F(x,y) = \\sum_{s,i} \\binom{s}{i}^2 x^i y^s = (1-2y+y^2-2xy-2xy^2+x^2y^2)^{-1/2}$$ has the property that $S$ is the coefficient of $x^a y^{a+b}$ in\n$$F(x,y)^2 = (1-2y+y^2-2xy-2xy^2+x^2y^2)^{-1}$$$$ = \\frac{1}{4y\\sqrt{x}}\\left(\\frac{1}{1-y(1+x+2\\sqrt{x})} - \\frac{1}{1-y(1+x-2\\sqrt{x})}\\right)$$$$ = \\frac{1}{4y\\sqrt{x}}\\left(\\frac{1}{1-y(1+\\sqrt{x})^2} - \\frac{1}{1-y(1-\\sqrt{x})^2}\\right).$$The coefficient of $y^{a+b}$ equals\n$$[y^{a+b}]\\ F(x,y)^2\n=\\frac{1}{4} \\frac{(1+\\sqrt{x})^{2(a+b+1)} - (1-\\sqrt{x})^{2(a+b+1)}}{\\sqrt{x}}.$$ It follows that\n$$S = [x^ay^{a+b}]\\ F(x,y)^2 = \\frac{1}{2}\\binom{2(a+b+1)}{2a+1}.$$","subject":"combinatorics"}
{"id":"C42","problem":"Real numbers $x_1,...,x_n$ are attached to the $n\\geq 2$ vertices of a tree (one number per vertex). For each edge of the tree consider the product of the numbers associated to its endpoints. Prove that the sum $S$ of all products over the edges of the tree satisfies $$S\\leq \\frac{\\sqrt{n-1}}{2}\\cdot \\left(x_1^2+x_2^2+\\dots+x_n^2\\right).$$","proof":"We will induct on $n$, the base case being clear. Suppose that it holds for $n-1$. Note that we may assume that the $x_i\\geq 0$. \nPick a leaf $a$ and let $b$ be its unique neighbor. Delete $a$ and the edge $ab$ to get a new tree \n$T'=(V',E')$. We need to show that \n$$\\frac{2}{\\sqrt{n-1}} x_ax_b+\\frac{2}{\\sqrt{n-1}} \\sum_{e\\in E'} x_e\\leq x_a^2+x_b^2+\\sum_{v\\in V'-\\{b\\}} x_v^2.$$\nSince $\\frac{2}{\\sqrt{n-1}} x_ax_b\\leq x_a^2+\\frac{1}{n-1} x_b^2$ (AM-GM) this reduces to \n$$\\frac{n-2}{n-1}x_b^2+\\sum_{v\\in V'-\\{b\\}} x_v^2\\geq \\frac{2}{\\sqrt{n-1}} \\sum_{e\\in E'} x_e.$$\n\nLet $y_b=\\sqrt{\\frac{n-2}{n-1}} x_b$ and $y_v=x_v$ for $v\\ne b$. By the inductive hypothesis for \n$T'$ we have \n$$\\frac{n-2}{n-1}x_b^2+\\sum_{v\\in V'-\\{b\\}} x_v^2=\\sum_{v\\in V'} y_v^2\\geq \\frac{2}{\\sqrt{n-2}} \\sum_{e\\in E'} y_e.$$\nThus it suffices to check that \n$$\\sqrt{\\frac{n-1}{n-2}} \\sum_{e\\in E'} y_e\\geq \\sum_{e\\in E'} x_e.$$\nThis is immediate by coming back at the definition of the $y_i$ and using that \n$x_e\\geq 0$.","subject":"combinatorics"}
{"id":"C43","problem":"A graph $G$ on $n$ vertices is not complete, has no isolated vertex (i.e. of degree $0$) and each dominating set has size \n$\\geq k\\geq 1$. Prove that the chromatic number of $G$\nis $\\leq n-k$.","proof":"Let $\\Delta$ be the maximal degree of a vertex of $G$.For any vertex $v$ the set $S=V\\setminus N(v)$ is dominating, so $n-d(v)\\geq k$ and so \n$\\Delta\\leq n-k$. \nIf $\\Delta\\leq n-k-1$ we conclude thanks to the inequality \n$\\chi(G)\\leq \\Delta+1$.\n\nAssume now that $\\Delta=n-k$ and pick a vertex $v$ of degree $n-k$. \nLet $A=V\\setminus N(v)$, then $|A|=k$. We claim that $A$ is an independent set.\nIndeed, if \n$x\\ne y\\in A$ are adjacent, then $A-\\{x\\}$ is a dominating set, as one immediately checks, and it has $k-1$ elements, a contradiction. In order to prove that $\\chi(G)\\leq n-k$, it suffices to ensure that \n$N(v)$ is not a clique (i.e. complete). \nIndeed, if this is so, choose $x,y\\in N(v)$ not adjacent and color all elements in $A$ with \n$1$, $x$ and $y$ with $2$ and use pairwise different (and different from $1$ and $2$) colors for each of the elements of $N(v)\\setminus \\{x,y\\}$, yielding a proper $(n-k)$-coloring.\n\nAssume now that $N(v)$ is a clique. This forces $k\\ne 1$, otherwise the whole graph would be complete. Since $|A|=k>1$, we can pick $a\\in A-\\{v\\}$. Now $a$ is not isolated and it is not adjacent to any element of \n$A$, thus $a$ is adjacent to some $b\\in N(v)$. \nNow $b$ is adjacent to $|N(v)|-1$ elements of $N(v)$, to $v$ and to $a$, thus \n$$\\deg(b)\\geq n-k-1+1+1=n-k+1=\\Delta+1,$$\na contradiction!","subject":"combinatorics"}
{"id":"C44","problem":"Let $p$ be an odd prime. What is the largest positive integer positive integer $n$ for which there are $n$ lattice points \n$A_1,...,A_n$ in the plane, no three collinear and such that $p$ does not divide twice the area of any non-degenerate triangle with vertices among the $A_i$'s?","proof":"The answer is $n=p+1$. Let us prove first that we cannot find $p+2$ such points. Indeed, since no three points are collinear, for each $x$-coordinate $x$ of one of the points there is at most one other point with the same $x$-coordinate. Since $p+2$ is odd, it follows that there is some point \n$A_{i_0}$ whose $x$-coordinate is different from the $x$-coordinate of any other $A_i$. By performing a translation, we may assume that \n$A_{i_0}$ is the origin $O$ of the plane. The equation of the line $OA_i$ is then $y=a_i x$ for some integer $a_i$, and the $p+1$ numbers \n$a_i$ can give at most $p$ different remainders mod $p$, so that there are $i\\ne j$ with $p\\mid a_i-a_j$. A simple computation shows that \n$p$ divides twice the area of triangle $OA_iA_j$, a contradiction. \n\nWe still need to exhibit a collection of $p+1$ such points. \nLet $c$ be a quadratic non-residue modulo $p$. By standard arguments the equation $x^2-cy^2=1$ has exactly $p+1$ solutions $(x,y)\\in \\{0,1,...,p-1\\}^2$. Let $(x_i, y_i)$ be these solutions and let $A_i$ be the point with coordinates $(x_i, y_i)$. It suffices to prove that $p$ can't divide twice the area of any triangle \n$A_1A_2A_3$. Using the formula for the area in terms of coordinates, it is not difficult to see that we can find \nintegers $a,b$ such that $y_i\\equiv ax_i+b\\pmod p$ for $1\\leq i\\leq 3$. But then the quadratic congruence $x^2-c(ax+b)^2\\equiv 1\\pmod p$ would have at least three solutions, contradicting Lagrange's theorem.","subject":"combinatorics"}
{"id":"C45","problem":"Let $v_1,v_2,...,v_n$ be $n$ vectors in the plane, whose coordinates are integers of absolute value less that $\\frac{1}{100}\\sqrt{\\frac{2^n}{n}}$. Prove that there are disjoint subsets $I,J$ of $\\{1,2,...,n\\}$ such that $\\sum_{i\\in I} v_i=\\sum_{j\\in J} v_j$.","proof":"It is enough to find two distinct such subsets $I,J$,\nfor then it is enough to take out of each the common elements of $I,J$. \nAssume that this is not the case and write $v_i=(x_i,y_i)$.\nConsider a random binary sequence $(a_1,a_2,...,a_n)$, each $a_i$ being $0$ or $1$ with probability\n$1/2$ (all these events being independent), and the random variables\n$X=\\sum_{i=1}^{n} a_ix_i$ and $Y=\\sum_{i=1}^{n} a_iy_i$.\n\nWe have $$ \\text{Var} (X)=\\text{Var} (\\sum a_i x_i)\\leq\n\\sum \\frac{x_i^2}{4}<\\frac{2^n}{40000}, $$ so letting \n$m_x=E[X]$, $m_y=E[Y]$ and \n$\\sigma^2=\\frac{2^n}{40000}$, Chebyshev's inequality gives \n$$P(|X-m_x|\\geq 2\\sigma)\\leq \\frac{1}{4}, \\quad P(|Y-m_y|\\geq 2\\sigma)\\leq \\frac{1}{4}.$$\n\nWe conclude that \n$ P(|X-m_x|\\leq 2\\sigma,|Y-m_y|\\leq 2\\sigma)\\geq \\frac{1}{2}$, \nthus at least half of the (pairwise distinct) points $(X,Y)$ are located in the square\n$$|X-m_x|\\leq 2\\sigma, \\quad |Y-m_y|\\leq 2\\sigma.$$\nBut this square contains at most\n$(1+4\\sigma)^2$ lattice points, so $$25\\sigma^2\\geq (1+4\\sigma)^2\\geq\n\\frac{2^n-1}{2},$$ which is easily seen to be impossible.","subject":"combinatorics"}
{"id":"C46","problem":"Prove that for any integer $n>1$ any set $M$ of positive rational numbers with size $2n^2-3n+2$ has a subset $A$ of size $n$ such that \nfor any $k\\in \\{2,\\ldots, n\\}$ the sum of any $k$ (not necessarily distinct) numbers from $A$ is not in $A$.","proof":"Multiplying all elements of $M$ by a suitable positive integer, we may assume that the elements of $M$ are positive integers. Take a prime\n$p>\\max M$ and identify $M$ with its image in $\\mathbf{F}_p=\\{0,1,\\ldots, p-1\\}$ (note that two distinct elements of $M$ must give distinct remainders when divided by $p$). \nConsider the interval $I= \\left[\\frac{p}{2n-1}, \\frac{2p}{2n-1}\\right]$. Let $M'=I\\cap \\mathbf{Z}$, then clearly the sum of no more than $n$ elements of $M'$ is not in $M'$ when taken modulo $p$.\n\nFor $a\\in M$ consider the random variable $1_{a,I}$ taking values $0$ or $1$, $1$ exactly when for a randomly taken integer $ s\\in[1,p-1]$ we have $ s\\cdot a\\in I \\pmod{p}$. Then \n$$ \\displaystyle \\mathbb{E}[1_{a,I}]> \\frac{ \\frac{2p}{2n-1}- \\frac{p}{2n-1}-1 }{p-1}$$which yields\n$$ \\displaystyle \\mathbb{E}[1_{a,I}]>\\frac{1}{2n-1}-\\frac{1}{p}$$Let $ X$ be a random variable which equals $ \\#\\{a\\in M : s\\cdot a\\in I \\pmod{p}\\}$ where $ s$ is a randomly taken integer in $ [1,p-1]$. Since $$X=\\sum_{a\\in M} 1_{a,I},$$ linearity of expectation yields (with $m=|M|=2n^2-3n+2$)\n$$ \\displaystyle \\mathbb{E}[X]=\\sum_{a\\in M}\\mathbb{E}[1_{a,I}] > m\\cdot \\left(\\frac{1}{2n-1}-\\frac{1}{p}\\right)$$ A direct calculation shows that \n\n$$ \\displaystyle m\\cdot \\left(\\frac{1}{2n-1}-\\frac{1}{p}\\right)> n-1,$$ hence $ \\displaystyle \\mathbb{E}[X]>n-1$ and so $X$ takes $ n$ as a value. Thus, there exists $ s\\in [1..p-1]$ such that the set $ M'_s:=\\{a\\in M : s\\cdot a\\in I\\}$ satisfies $ |M'_s|\\ge n$. Hence, the elements of $ M'_s$ satisfy the requirement of the problem.","subject":"combinatorics"}
{"id":"C47","problem":"Let $n$ be a positive integer. A permutation $\\sigma$ of $\\{1,\\ldots, n\\}$ is called special if $k^4+\\sigma(k)^4$ is a prime number for $k=1,2,\\ldots, n$. Prove that the number of special permutations is a perfect square.","proof":"Let \n$\\sigma$ be a special permutation, thus $k^4+\\sigma(k)^4=p_k$ for $1\\leq k\\leq n$, with $p_1,\\ldots, p_n$ prime numbers. Then \n$$p_1+\\ldots+p_n=2(1^4+\\ldots+n^4)$$\nis even. On the other hand for $k>1$ we have $p_k>1$, thus $p_k$ is odd. It follows that $p_1+n-1$ must be even. In particular, if \n$n$ is even then $p_1$ must be odd and $\\sigma(1)\\ne 1$. If $n$ is odd $p_1$ must be $2$ and $\\sigma(1)=1$, so $\\sigma$ induces a permutation of \n$\\{2,\\ldots, n\\}$ for which $k^4+\\sigma(k)^4$ is a prime for $2\\leq k\\leq n$.\n\nSuppose now that $n$ is even and consider the graph $G$ with vertices $1,\\ldots, n$, vertices $i$ and $j$ being adjacent when $i^4+j^4$ is a prime and $(i,j)\\ne (1,1)$. Split the vertices \nof $G$ in the sets $A$ and $B$ of odd, respectively even numbers between $1$ and $n$. This partition gives a bipartition of $G$, since clearly no two vertices in $A$ and no two vertices in $B$ are adjacent. Let $P$ be the number of perfect matchings from $A$ to $B$, which is also the number of perfect matchings from $B$ to $A$. Note that giving the values of a special permutation $\\sigma$ at the odd integers comes down to giving a perfect matching from $A$ to $B$, and giving the values of $\\sigma$ at the even integers comes down to giving a perfect matching from $B$ to $A$. Thus the number of special permutations is simply $P^2$, which is a square. \nThe argument is essentially identical if $n$ is odd.","subject":"combinatorics"}
{"id":"C48","problem":"Let $\\varepsilon>0$. Prove that for all but finitely many positive integers \n$n$, a graph with $n$ vertices and at least $(1+\\varepsilon)n$ edges \nhas two different cycles of equal length.","proof":"Suppose that $G$ is a graph on $n$ vertices and at least $(1+\\varepsilon)n$ edges. For simplicity,\nsuppose that $G$ is connected and pick a spanning tree $T$.\nFor each edge $e$ of $G$ not in $T$, adding $e$ produces a unique cycle \n$C_e$ and these $C_e$ have pairwise distinct lengths by assumption. \n\nDouble count pairs $(f,e)$ where $e\\in E(G)\\setminus E(T)$ and \n$f\\in E(C_e)\\setminus \\{e\\}$. In particular $f\\in E(T)$. \nFor $f\\in E(T)$ let $$X_f=\\{e\\in E(G)\\setminus E(T)|\\, f\\in E(C_e)\\setminus \\{e\\}\\}.$$\nGiven $e\\in E(G)\\setminus E(T)$ there are $\\text{length}(C_e)-1$ such $f$, thus \n$$\\sum_{f\\in E(T)} |X_f|\\geq \\sum_{e\\in E(G)\\setminus E(T)} (\\text{length}(C_e)-1).$$\nSince $|E(G)\\setminus E(T)|\\geq (1+\\varepsilon)n-(n-1)>\\varepsilon n$ and \nthe lengths of the $C_e$'s are pairwise distinct, we obtain \n$$\\sum_{f\\in E(T)} |X_f|> \\varepsilon^2 n^2/2.$$\nSince $T$ has less than $n$ edges, it follows that there is \n$f\\in E(T)$ such that $|X_f|> \\varepsilon^2 n/2$. \n\nTake two different edges $e,e'\\in X_f$. Look at the paths in $T$ between the endpoints of \n$e$ and $e'$. These paths share the edge $f$. One easily constructs a cycle containing the edges \n$e,e'$ and all of whose other edges are in $T$. In particular the cycles associated to different pairs of edges in $X_f$ are distinct and so \n$\\binom{|X_f|}{2}\\leq C$, where $C$ is the total number of cycles in $G$.\n\nBut any cycle in $G$ has at most $n$ vertices, so length $\\leq n$, and there are no cycles of equal length, so $C\\leq n$. We conclude that $n\\geq \\binom{ \\lfloor \\varepsilon^2 n/2\\rfloor}{2}$ and this fails for $n$ big enough. This solves the problem for a connected graph. In general, simply take a spanning tree in each connected component and replace $T$ by the disjoint union of these trees. The rest of the argument goes through.","subject":"combinatorics"}
{"id":"C49","problem":"In a club with $42$ members it is known that among any $31$ members one can find a boy and a girl that know each other. \nProve that we can find $12$ pairs of boys and girls, such that the boy and the girl in each pair know each other.","proof":"Say there are $b$ boys and $g$ girls in the club, so that $b+g=42$.\nPick any $k\\in \\{1,2,...,b\\}$ boys and let $r$ be the number of girls known by at least one of these $k$ boys. \nThen $k+(g-r)\\leq 30$, otherwise these $k$ boys and the $g-r$ girls they don't know would form a group of at least $31$ persons, contradicting the hypothesis.\nThus $r\\geq k+g-30=k+12-b$. Thus Hall's condition is not satisfied, however we have the following version:\n\n\\begin{lemma}\nIf in a bipartite graph $G$ with bipartition $A,B$ the set of neighbors of any subset $S\\subset A$ has at least \n$|S|-d$ elements, then we can find a matching of size $\\geq |A|-d$. \n\\end{lemma} \n\n\nThanks to the lemma, we can find a matching of size $\\geq b-(b-12)=12$ and we are done. \nTo prove the lemma, add $d$ vertices to the class $B$, each of them being connected to each vertex in $A$. \nThen Hall's condition is obviously satisfied in the new graph, so we can find a matching of size $|A|$ in this new graph. Among the $|A|$ edges in the matching at most $d$ are incident to one of the $d$ added vertices, yielding the result.","subject":"combinatorics"}
{"id":"C50","problem":"Prove that there are $c,n_0>0$ such that for any set \n$A$ consisting of $n>n_0$ integers we have \n$$|A-A|-|A+A|\\leq n^2-cn^{8/5},$$\nwhere $A\\pm A=\\{a\\pm b|\\, a,b\\in A\\}$.","proof":"For each $x\\in A-A$ let $n_x$ be the number of pairs \n$(a,b)\\in A\\times A$ such that $a-b=x$. Define similarly \n$m_y$ for $y\\in A+A$. Double counting pairs $(a,b)\\in A\\times A$ yields \n$$\\sum_{x\\in A-A} n_x=n^2= \\sum_{y\\in A+A} m_y$$\n\nThe first key observation is that \nthere is another relation between the $n_x$ and the $m_y$, namely \n$$\\sum_{x} n_x^2=\\sum_{y} m_y^2.$$\nIndeed, the first one counts ordered $4$-tuples $(a,b,c,d)$ with \n$a-c=d-b$, the second one counts ordered $4$-tuples $(a,b,c,d)$ with \n$a+b=c+d$, and this is equivalent to $a-c=d-b$.\n\nLet $b=\\max_{x} n_x$. Then $(n_x-1)(n_x-b)\\leq 0$, thus \n$n_x^2\\leq (b+1)n_x-b$ and so \n$$\\sum_{x} n_x^2\\leq (b+1) n^2-|A-A|b.$$\nThus \n$$\\sum_{y} m_y^2\\leq (b+1) n^2-|A-A|b.$$\n\nOn the other hand \n$$\\sum_{y} m_y^2\\geq \\frac{(\\sum m_y)^2}{|A+A|}=\\frac{n^4}{|A+A|}.$$\nCombining yields \n$$|A-A|-|A+A|\\leq |A-A|-\\frac{n^4}{(b+1)n^2-b|A-A|}.$$\nUsing AM-GM one checks that $RHS\\leq n^2+n^2/b-2n^2/\\sqrt{b}$.\nThus we are done if $b\\leq cn^{4/5}$. Now assume that $b>cn^{4/5}$. Thus some difference in \n$A-A$ is realised many times, say $n_x>cn^{4/5}$. Look at the solutions of the equation $a-b=x$ with \n$a,b\\in A$. The corresponding $a$ and $b$ put together can be split into a bunch a \narithmetic progressions with common difference $x$ (we allow progressions consisting of only two terms). \n\n\nLet $B$ be the set of terms of these arithmetic progressions with even index (so we take the second term, the fourth term, etc of the corresponding progression). One easily checks that $B$ has at least $cn^{4/5}/3$ elements and \n$$B-B\\subset \\bar{B}-\\bar{B},$$\nwhere $\\bar{B}=A\\setminus B$.\nThus any difference $a-b$ in $A-A$ is of the form $x-y$ with $x\\in \\bar{B}, y\\in B$ or \n$x\\in B, y\\in \\bar{B}$ or $x,y\\in \\bar{B}$ and so \n$$|A-A|\\leq 2|B|\\cdot |\\bar{B}|+|\\bar{B}|^2=n^2-|B|^2\\leq n^2-c^2/9 n^{8/5}.$$\nThus we can also conclude in this case!","subject":"combinatorics"}
{"id":"G1","problem":"The diagonals of the convex hexagon $A_1A_2\\ldots A_6$ intersect at some point $M$ such that the circumcenters of the triangles $MA_iA_{i+1}$ ($1\\leq i\\leq 6$, with $A_7=A_1$) lie on a circle. Prove that the quadrilaterals $A_1A_2A_4A_5$, \n$A_2A_3A_5A_6$ and $A_3A_4A_6A_1$ have equal areas.","proof":"Let $H:=UVWXYZ$ be the cyclic hexagon with vertices the circumcenters of triangles $MA_6A_1, MA_1A_2,\\ldots, MA_5A_6$. Since $UV$ and $XY$ are both perpendicular to $AD$ (and similarly for other pairs), the opposite sides of this hexagon are parallel. Note that \n$A_1,\\ldots, A_6$ are the reflections of $M$ over the sides of $H$. Consider the homothethy with center $M$ and ratio $1/2$ sending\n$A_1,\\ldots, A_6$ to the projections of $M$ onto the sides $UV, VW, WX, XY, YZ, ZU$. Let \nMoreover, the isosceles trapezoids $UVXY, VWYZ, WXZU$ show that $UX=VY=WZ$. It follows that \n$${\\rm area}(A_1A_2A_4A_5)=\\frac{A_1A_4\\cdot A_2A_5}{2}\\sin \\angle(A_1A_4, A_2A_5)$$\n$$=\\frac{A_1A_4\\cdot A_2A_5}{2}\\sin \\angle \nUZW=\\frac{A_1A_4\\cdot A_2A_5\\cdot A_3A_6}{2WZ}$$\nand similarly for the other two quadrilaterals. Since $UX=VY=WZ$, these quadrilaterals have equal areas.","subject":"geometry"}
{"id":"G2","problem":"An infinite set of points in the plane is bounded and has at least two axes of symmetry. Prove that all axes of symmetry pass through a common point.","proof":"Let the set be $S$. We prove first that any two axes of symmetry $L_1,L_2$ must intersect. Suppose that they are parallel and choose coordinate system such that $L_1, L_2$ are parallel to the $x$-axis, and are given by equations $y=a$ and $y=b$. In particular if \n$P(x,y)\\in S$ then $Q=(x, 2(a-b)+y)\\in S$, since $Q$ is obtained by taking the reflection $R$ of $P$ in $L_1$ and then the reflection of \n$R$ in $L_2$. We deduce by induction that $(x, 2(a-b)n+y)\\in S$ for all positive integers $n$ and so $S$ is unbounded. \n\n Take now two axes of symmetry $L_1,L_2$ meeting at $P$ and suppose that some axis of symmetry $L$ does not pass through $P$, thus the distance $d$ from $P$ to $L$ is positive. We will prove that for any $X\\in S$ there is $Y\\in S$ with $PY^2\\geq PX^2+4d^2$. Assume that this is proved and consider any $X_0\\in S$, then apply the claim repeatedly to construct points $X_n\\in S$ with $PX_n^2\\geq PX_0^2+4d^2n$ for all positive integers $n$, contradicting again that $S$ is bounded. \n \n Let us prove the claim now and consider the combination $f$ of a reflection in $L_1$ and a reflection in $L_2$. Then \n $f$ is a nontrivial rotation with the pivot in $P$, and we may assume that its angle is $\\leq \\pi$. Let $L'$ be the parallel to $L$ passing through $P$. Applying repeatedly $R$ we obtain a point $P$ with $PX=PX'$ and $X'$ is not on the same side of $L'$ as $L$. Let\n $Y$ be the reflection of $X'$ in $L$. Note that $X'Y\\perp L$, thus letting $Z=X'Y\\cap L$ we obtain \n $$PY^2-(PX')^2=PZ^2+YZ^2-PZ^2-X'Z^2=2d(YZ+X'Z)\\geq 2d \\cdot 2d=4d^2,$$\n as desired.","subject":"geometry"}
{"id":"G3","problem":"Let $\\omega_1,\\ldots, \\omega_4$ be the incircles of the four triangles formed by three vertices of a cyclic quadrilateral $ABCD$, and suppose that their radii are pairwise distinct. For the circles $\\omega_i$ and $\\omega_j$ (with $1\\leq i<j\\leq 4$) consider the point $P_{ij}$ where their external common tangents cross. Prove that the points $P_{ij}$ lie on the same line.","proof":"Let $O_i$ be the center of $\\omega_i$. The Japanese theorem ensures that $O_1O_2O_3O_4$\nis a rectangle, say inscribed in a circle $\\omega$.\n Say $ABCD$ is inscribed in a circle $\\Omega$. Note that\n $P_{ij}$ be the exsimilicenter of $\\omega_i$ and $\\omega_j$. Without loss of generality say $\\omega_1$ corresponds to triangle \n $BCD$, $\\omega_2$ to triangle $ACD$, etc. Angle-chasing shows that the quadrilateral $CDP_1P_2$ is cyclic. Since \n $P_{12}=O_1O_2\\cap CD$, $P_{12}$ is the radical center of $\\omega$, $\\Omega$ and $(CDO_1O_2)$, therefore \n $P_{12}$ lies on the radical axis $L$ of $\\omega$ and $\\Omega$. By symmetry all $P_{i (i+1)}$ lie on this line. Monge's theorem ensures that \n $P_{13}\\in P_{12}P_{23}$ and $P_{24}\\in P_{23}P_{34}$, thus the $P_{ij}$ all lie on this line.","subject":"geometry"}
{"id":"G4","problem":"Consider all multisets of $12$ points $P_1,\\ldots, P_{12}$ in the plane such that the distance between any two of them does not exceed $1$. What is the maximal value of $\\sum_{1\\le i<j\\le 12} P_iP_j^2$?","proof":"We will prove that the answer is $48$. First place $4$ points at each vertex of an equilateral triangle. The conditions are satisfied and the sum is $48$, by a direct computation. Take now a multiset with pairwise distances at most $1$. As is well-known, there is a closed disk \n$D$ of radius $R=1/\\sqrt{3}$ containing these points. Let $O$ be the center of $D$ and choose the coordinate system with \norigin at $O$. Let $z_i$ be the complex number representing $P_i$, then \n$$\\sum_{i<j} P_iP_j^2=\\sum_{i<j} |z_j-z_i|^2=11\\sum |z_i|^2-\\sum_{i<j} (z_i\\overline{z_j}+z_j\\overline{z_i}).$$\nOn the other hand \n$$|\\sum z_i|^2=\\sum |z_i|^2+\\sum_{i<j} (z_i\\overline{z_j}+z_j\\overline{z_i}).$$\nThus \n$$\\sum_{i<j} P_iP_j^2=12\\sum |z_i|^2-|\\sum z_i|^2\\leq 12\\sum |z_i|^2\\leq 12\\cdot 12 R^2=48,$$\nas desired.","subject":"geometry"}
{"id":"G5","problem":"Prove that any set $S$ of diameter $\\leq 1$ in the plane can be included in a regulat hexagon with distance $1$ between its parallel sides (i.e. inscribed in a circle of radius $\\frac1{\\sqrt{3}}$).","proof":"Start with a directed line $L$ and let $L(\\theta)$ be its rotation by an angle $\\theta$. Fix $\\theta$ and choose lines \n$\\ell_1, \\ell_2$ parallel to $L(\\theta)$ at minimal distance such that $S$ is contained in the strip formed by these two lines. Note that the distance between\n$\\ell_1, \\ell_2$ is $\\leq 1$, since each $\\ell_i$ must contain a point of $S$. Moving $\\ell_1, \\ell_2$ by the same distance away from each other so that the new distance between the two lines is $1$, we obtain two directed lines $e_1(\\theta)$ and $e_2(\\theta)$, with $e_2(\\theta)$ being in the left half-plane of $e_1(\\theta)$ and $e_2(\\theta)=e_1(\\theta+\\pi)$. Consider the hexagon $H(\\theta)$ with sides \n$e_1(\\theta), e_1(\\theta+\\pi/3), \\ldots, e_1(\\theta+5\\pi/3))$. Then $S\\subset H(\\theta)$ and it suffices to prove that $H(\\theta)$ is regular for some \n$\\theta$. Let $a=e_1(\\theta), b=e_1(\\theta+\\pi/3),\\ldots C=e_2(\\theta+5\\pi/3)$ and let \n$$f(\\theta)=d(a\\cap B, C)-d(A\\cap b, c).$$\nIt suffices to find $\\theta$ with $f(\\theta)=0$. But $f(\\theta)+f(\\theta+\\pi)=0$, since \nchanging $\\theta$ to $\\theta+\\pi$ switches $a$ and $A$, $b$ and $B$, $c$ and $C$. We conclude that \n$f(\\theta)$ vanishes for some $\\theta$, since it is continuous.","subject":"geometry"}
{"id":"G6","problem":"A convex octagon $P$ is obtained from two rectangles of unit area that overlap. Prove that \nthe area of $P$ is at least $1/2$.","proof":"Each side of one rectangle meets the contour of the other rectangle at exactly two points situated on consecutive sides. Let $A_0A_1A_2A_3$ and $B_0B_1B_2B_3$ be circular labellings of the two rectangles such that the segments $A_iA_{i+1}$ and $B_iB_{i+1}$ have equal lengths and meet at a point labelled $C_i$. The $C_i$ are four alternative vertices of the octagon, so the area of the latter is greater than or equal to the area of the quadrangle $C_0C_1C_2C_3$. Notice that $C_i$ is equally distanced from the lines $A_{i+2}A_{i+3}$ and $B_{i+2}B_{i+3}$ to deduce that the lines $C_0C_2$ and $C_1C_3$ are perpendicular to one another. Consequently,\n\\[\\textrm{area}\\,\\,C_0C_1C_2C_3 = \\dfrac{1}{2} \\cdot C_0C_2 \\cdot C_1C_3 \\geq \\dfrac{1}{2} \\cdot A_1A_2 \\cdot A_0A_1 = \\dfrac{1}{2}. \\]\nThe conclusion follows.","subject":"geometry"}
{"id":"G7","problem":"A quadrilateral $ABCD$ is divided into cyclic quadrilaterals $P_1,\\ldots, P_n$ with pairwise disjoint interiors.\nWe assume that no vertex of any $P_i$ is an interior point of a side of any $P_j$ or of a side of $ABCD$. \n Prove that $ABCD$ is a cyclic quadrilateral.","proof":"Form the obvious bipartite graph $G$ with the vertices and sides in the corresponding figure. It suffices to check that if \n $K$ is a $h$-cycle in $G$ then $h$ is even. The interior of $K$ is also subdivided into quadrilaterals; say we have \n $m$ quadrilaterals in the interior of $K$ and let $e$ be \n the number of interior edges of $K$. Then $4m=h+2e$, since the $m$ quadrilaterals have $4m$ edges in total, but the edges of \n $K$ are counted once, while the interior edges are counted twice.\n \n Color the vertices of $G$ (i.e. the vertices of the quadrilaterals) red and blue so that adjacent vertices have different colors.\n We may assume that $A,C$ are red and $B,D$ are blue. Say we have $p$ interior red points and $k$ interior blue points. \n In each tile the sum of the red and blue angles is the same, therefore the total sum of the angles at the red vertices and the total sum of the angles at the blue vertices are equal. Summing the angles at the red and blue vertices separately, we obtain\n\\[ \\angle BAD + \\angle DCB + 2\\pi p= \\angle CBA + \\angle ADC + 2\\pi k, \\] thus\n\\[ \\angle BAD + \\angle DCB \\equiv \\angle CBA + \\angle ADC \\pmod{2\\pi}. \\]\nSince on both sides of the congruence the sum of the two angles lies between $0$ and $2\\pi$, we conclude that\n\\[ \\angle BAD + \\angle DCB = \\angle CBA + \\angle ADC, \\] finishing the proof.","subject":"geometry"}
{"id":"G8","problem":"In the convex pentagon $ABCDE$ the triangles $ABC, BCD, CDE, DEA$ and $EAB$ have the same area. Prove that there is a point $M$ inside the pentagon such that the triangles $MAB, MBC, MCD, MDE, MEA$ have the same area.","proof":"We will take for $M$ the center of gravity of the pentagon (which is inside the pentagon by convexity). Let \n$x$ be the common area of the triangles $ABC,\\ldots, EAB$. Since $P\\mapsto {\\rm area}(ABP)$ depends linearly on the coordinates of \n$P$ and since the coordinates of $M$ are the averages of those of $A,\\ldots, E$, we have (writing $S(X)$ for the area of $X$)\n$$S(ABM)=\\frac{S(ABA)+S(ABB)+S(ABC)+S(ABD)+S(ABE)}{5}=$$ \n$$=\\frac{2x+S(ABD)}{5}=\\frac{2x+S(ABCDE)-S(ADE)-S(BCD)}{5}=\\frac{S(ABCDE)}{5}$$\nand similarly for triangles $MBC, MCD, MDE$ and $MEA$.","subject":"geometry"}
{"id":"G9","problem":"Points $W,X,Y,Z$ are chosen on the sides $AB,BC,CD, DA$ of a \n parallelogram $ABCD$ such that the incenters of triangles $AWZ, BXW, CYX, DZY$ form a parallelogram. Prove that $WXYZ$ is a parallelogram.","proof":"Let $O$ be the center of $ABCD$ and let $I_A,I_B, I_C, I_D$ \n be the incenters of triangles $AWZ, BWX,CXY,DZY$. The quadrilaterals $AI_AI_DD$ and $BI_BI_CC$ have two equal sides $AB$ and \n $CD$ and have their sides pairwise parallel ($AI_A \\parallel CI_C$ and $BI_B \\parallel DI_D$ by angle-chasing, $AD \\parallel BC$ and $I_AI_D \\parallel I_BI_C$ by hypothesis), thus they must be congruent and so $AI_A=CI_C$ and $BI_B=DI_D$.\n\nLet $Z'$ and $W'$ be the reflections of $Z,W$ across $O$. Since $I_A$ maps to $I_C$ under this reflection, triangles $CXY$ and $CZ'W'$ have a common incenter and so $\\angle Z'I_CW'=\\angle XI_CY$. If $(Z'C-XC)(W'C-YC)>0$ then either $Z'C>XY$ and $W'C>YC$, or $Z'C<XY$ and $W'C<YC$. The first case leads to $\\angle CI_CY<\\angle Z'I_CW'$, while the second case leads to $\\angle CI_CY>\\angle Z'I_CW'$. Thus\n $(Z'C-XC)(W'C-YC) \\leq 0$ must hold. \n \n Let us suppose that $Z'C>XC$, then $W'C \\leq YC$, hence $AZ>XC$ and $AW \\leq YC$. Thus, $DZ<BX$, and in a similar manner (reflecting $Z,Y$ across $O$) this implies that $DY \\geq BW$, and so $AW \\geq YC$, which contradicts $AW \\leq YC$, unless $AW=YC$. However, in this case points $W'$ and $Y$ coincide, and since triangles $CXY$ and $CW'Z'$ have a common incenter, points $Z'$ and $X$ must coincide too, which implies that $AZ=CX$, a contradiction.\n\nSimilarly, we reach a contradiction if $Z'C<XC$ was true. Therefore, $XC=Z'C=AZ$ and similarly $AW=YC$. Thus, $AWCY$ is a parallelogram and so $WY$ bisects $AC$. Similarly $ZX$ bisects $BD$, hence $WY,ZX,AC$ and $BD$ concur at the center $O$, finishing the proof.","subject":"geometry"}
{"id":"G10","problem":"Prove that for any subset $S$ of the plane there exists a (not necessarily axis-aligned) rectangle of area $1$ that contains either $0$ or more than $2025$ points in its strict interior.","proof":"We prove by induction that if $S$ meets any rectangle of area $1$, then for any $N$ there are rectangles of arbitrarily small area containing at least $N$ points of $S$. This is obvious for $N=0$, so assume that this holds for $N-1$ and let $\\delta>0$. Choose $\\varepsilon>0$ such that $2(\\varepsilon + \\sqrt{\\varepsilon})<\\delta$. \n By assumption there is a rectangle $R$ of area $\\varepsilon$ containing at least $N-1$ points of $S$. We may assume that its vertices are $(0, 0), (-x, 0), (0, -y)$ and $(-x, -y)$, with $x,y>0$ and $xy=\\varepsilon$. Let $A = \\tfrac{\\sqrt{\\varepsilon}}y$ and $B = \\tfrac{\\sqrt{\\varepsilon}}x$, so that the rectangle $[0,A]\\times [0, B]$ has area $1$ and so it must contain some point $(a,b)\\in S$ (thus $0\\leq a\\leq A$ and $0\\leq b\\leq B$). A small computation shows that the convex hull $X$ of $(a,b)$ and $R$ has area $$\\varepsilon + \\tfrac{ay}2 + \\tfrac{bx}2 < \\varepsilon + \\tfrac{Ay}2 + \\tfrac{Bx}2=\\varepsilon + \\sqrt{\\varepsilon}.$$ By a classical result, any convex polygon in the plane is contained in a rectangle with area at most twice that of the polygon. Applying this to \n the convex hull, we obtain a rectangle of area at most $2(\\varepsilon + \\sqrt{\\varepsilon})<\\delta$ containing at least $N$ points of $S$, as desired.","subject":"geometry"}
{"id":"G11","problem":"Prove that for any inscribed hexagon $ABCDEF$ \n$$\\frac{AC}{AB}\\cdot \\frac{BD}{BC}\\cdot \\frac{CE}{CD}\\cdot \\frac{DF}{DE}\\cdot \\frac{EA}{EF}\\cdot \\frac{FB}{FA}\\geq 27.$$","proof":"We will use several times the inequality\n$$\\sqrt[n]{(a_1+b_1)...(a_n+b_n)}\\geq \\sqrt[n]{a_1...a_n}+\\sqrt[n]{b_1...b_n},$$\nvalid for all nonnegative real numbers $a_1,...,a_n, b_1,...,b_n$, a consequence of the AM-GM inequality. Using Ptolemy's inequality in the quadrilaterals \n$$ABCD, BCDE, CDEF, DEFA, EFAB, FABC$$ we obtain \n$$\\sqrt[6]{(BC\\cdot AD)\\cdot...\\cdot (AB\\cdot FC)}=\\sqrt[6]{(AC\\cdot BD-AB\\cdot CD)\\cdot...\\cdot (FB\\cdot AC-FA\\cdot BC)}\\leq$$\n$$\\sqrt[6]{(AC\\cdot BD)\\cdot...\\cdot (FB\\cdot AC)}-\\sqrt[6]{(AB\\cdot CD)\\cdot...\\cdot (FA\\cdot BC)},$$\nor equivalently \n$$\\sqrt[3]{AC\\cdot BD\\cdot CE\\cdot DF\\cdot EA\\cdot FB}-\\sqrt[3]{AB\\cdot BC\\cdot CD\\cdot DE\\cdot EF\\cdot FA}\\geq $$\n$$\\sqrt[3]{AD\\cdot BE\\cdot CF}\\cdot \\sqrt[6]{AB\\cdot BC\\cdot CD\\cdot DE\\cdot EF\\cdot FA}.$$\n Similarly, using Ptolemy's in quadrilaterals $ACDF, BCEF, ABDE$ we obtain\n $$\\sqrt[3]{(AD\\cdot BE\\cdot CF)^2}=\\sqrt[3]{(AC\\cdot DF+AF\\cdot CD)(BD\\cdot AE+AB\\cdot DE)(BF\\cdot CE+BC\\cdot EF)}$$\n $$\\geq \\sqrt[3]{AC\\cdot BD\\cdot CE\\cdot DF\\cdot EA\\cdot FB}+\\sqrt[3]{AB\\cdot BC\\cdot CD\\cdot DE\\cdot EF\\cdot FA}.$$ \nLet $$x=AB\\cdot BC\\cdot CD\\cdot DE\\cdot EF\\cdot FA, \\,\\, y=AC\\cdot BD\\cdot CE\\cdot DF\\cdot EA\\cdot FB,\\,\\, z=AD\\cdot BE\\cdot CF.$$\nWe want to prove that $y\\geq 27x$, and the above inequalities read $\\sqrt[3]{y}-\\sqrt[3]{x}\\geq \\sqrt[3]{z} \\sqrt[6]{x}$ and \n$\\sqrt[3]{x}+\\sqrt[3]{y}\\leq \\sqrt[3]{z^2}$. But then \n$$(\\sqrt[3]{y}-\\sqrt[3]{x})^2\\geq \\sqrt[3]{z^2} \\sqrt[3]{x}\\geq \\sqrt[3]{x}(\\sqrt[3]{x}+\\sqrt[3]{y}),$$\nwhich yields after simplifications $y\\geq 27x$.","subject":"geometry"}
{"id":"G12","problem":"Let $ABC$ be a triangle with side-lengths $a=BC$, $b=CA$ and $c=AB$, and centroid $G$. Prove that for any point $P$ in the same plane as the triangle \n \\[a\\cdot PA^3+b\\cdot PB^3+c\\cdot PC^3\\geq 3abc\\cdot PG.\\]","proof":"Let $x_A, x_B, x_C$ and $p$ be the complex numbers representing the points $A,B,C,P$ and let $z_A=p-x_A$ and similarly for $z_B, z_C$. We are asked to prove that \n $$\\sum |z_B-z_C|\\cdot |p-z_A|^3\\geq 3|z_A-z_B|\\cdot |z_B-z_C|\\cdot |z_C-z_A|\\cdot |p-\\frac{z_A+z_B+z_C}{3}|,$$\n or equivalently \n $$\\sum |x_B-x_C|\\cdot |x_A|^3\\geq |(x_A-x_B)(x_B-x_C)(x_C-x_A)|\\cdot |x_A+x_B+x_C|.$$\n This follows from \n $$\\sum |x_B-x_C|\\cdot |x_A|^3\\geq |\\sum x_A^3(x_B-x_C)|$$\n and the identity \n $$x^3(y-z)+y^3(z-x)+z^3(x-y)=(x-y)(z-x)(z-y)(x+y+z),$$\n which is easily established.","subject":"geometry"}
{"id":"G13","problem":"The $100\\times 100$ square unit lattice $\\textbf{L}$ has $10000$ points. A set $\\mathcal{F}$ of polygons has the property that the set of vertices of the union of all polygons in $\\mathcal{F}$ is exactly \n$\\textbf{L}$. Find the maximum possible sum of the areas of the polygons in $\\mathcal{F}$.","proof":"The answer is $\\frac{n^2(4n^2-1)}{3}$ for a $2n \\times 2n$ grid. Let $O$ be the center of the grid. For any polygon $A_1A_2 \\cdots A_n$, the area\n\\[[A_1A_2 \\cdots A_n] \\leq \\sum_{i=1}^n OA_i \\cdot OA_{i+1} \\leq \\sum_{i=1}^n \\frac 12\\left(OA_i^2 + OA_{i+1}^2\\right) = \\sum_{i=1}^n OA_i^2\\]by the sine area formula. Summing this across all points in the grid yields $$\\sum_{F \\in \\mathcal F} [F] \\leq \\sum_{P \\in \\mathbf L} OP^2,$$ which is sharp when all the polygons $P$ are squares. Note that \n$$ \\sum_{P \\in \\mathbf L} OP^2=4\\sum_{0\\le i,j\\le n-1}((i+0.5)^2+(j+0.5)^2)\\cdot(1/\\sqrt2)^2=\\frac{n^2(4n^2-1)}3.$$\n To achieve the bound it suffices to consider squares with center at $O$, i.e. a spiral of squares, for the outermost layer have the biggest square, and then a square formed by moving each vertex 1 point counterclockwise, and continue doing that until the outer layer is finished.","subject":"geometry"}
{"id":"G14","problem":"A circle of radius $r$ is inscribed in triangle $ABC$. Circles with radii $r_1,r_2, r_3<r$ are inscribed between the angles \n$A,B,C$ and the incircle of triangle $ABC$. Prove that \n $$r_1+r_2+r_3 \\geq r.$$","proof":"We claim that $\\sin (A/2)=\\frac{r-r_1}{r+r_1}$ and similarly \n $$\\sin (B/2)=\\frac{r-r_2}{r+r_2},\\,\\, \\sin (C/2)=\\frac{r-r_3}{r+r_3}.$$\n Let us take this for granted. We have \n $$\\sum \\sin (A/2)= \\sum \\sqrt{\\frac{1 - \\cos A}{2}} = \\sum \\sqrt{\\frac{a^2 - (b - c)^2}{4bc}}=$$\n $$ \\sum \\sqrt{\\frac{(a + b - c)(a + c - b)}{4bc}}\\le \\sum \\frac{1}{2} \\left( \\frac{a + b - c}{2b} + \\frac{a + c - b}{2c} \\right) = \\frac{3}{2},$$\n so that, using Cauchy-Schwarz\n $$\\frac{3}{2}\\geq \\sum \\frac{r-r_1}{r+r_1}=2r\\sum \\frac{1}{r+r_1}-3\\geq 2r\\cdot \\frac{9}{3r+(r_1+r_2+r_3)}-3$$\n and then $r_1+r_2+r_3\\geq r$.\n \n In order to prove the claim, let $I$ be the incenter of $ABC$ and let $I_1$ the center of the circle of radius $r_1$. Then \n $A, I_1, I$ are collinear, so $AI=AI_1+I_1I=AI_1+r_1+r$. By standard arguments $AI=\\frac{r}{\\sin A/2}$ and $AI_1=\\frac{r_1}{\\sin A/2}$, yielding the claim.","subject":"geometry"}
{"id":"G15","problem":"Is there a set $S$ of $100$ points in a plane such that the gravity center of any $10$ points in $S$ belongs to $S$?","proof":"Assume that this was possible, say $S=\\{v_1,...,v_{100}\\}$, where we think of points of the plane as vectors. \n Choose indices $i\\ne j$ such that $m:=|v_i-v_j|$ is the smallest possible value among all $|v_k-v_{\\ell}|$ with \n $k\\ne \\ell$. Pick $9$ vectors $w_1,...,w_9$ different from $v_i, v_j$ in $S$ and let \n $$A=\\frac{w_1+...+w_9+v_i}{10},\\,\\, B=\\frac{w_1+...+w_9+v_j}{10}.$$\n By assumption $A,B$ are vectors in $S$, they are clearly distinct and yet $|A-B|=m/10<m$, a contradiction.","subject":"geometry"}
{"id":"G16","problem":"On the sides $AB, BC,CD, DE, EF, FA$ of a convex \nhexagon $ABCDEF$ we built equilateral triangles, either all outside the hexagon or all towards its interior. Let \n$M,N,P,Q,R,S$ be the centers of these triangles and let $X,Y,Z$ be the midpoints of $MQ, NR, PS$. Prove that \n$XYZ$ is an equilateral triangle.","proof":"Let $u=e^{i\\pi}{3}$ and suppose that all triangles are built outside the hexagon (the other case is done in exactly the same way). Say the triangles are $$ABG, BCH, CDI, DEJ, FEK, FAL.$$ Let $a,b,\\ldots$ be the complex numbers representing $A,B,\\ldots$. Then \n $$g-b=u(a-b),\\,\\, h-c=u(b-c),\\,\\, i-d=u(c-d),\\,\\,$$\n and \n $$ j-e=u(d-e),\\,\\, k-f=u(e-f),\\,\\, \\ell-a=u(f-a).$$\n It follows that \n $$m=\\frac{a+2b+u(a-b)}{3},\\,\\, n=\\frac{b+2c+u(b-c)}{3},\\,\\, p=\\frac{c+2d+u(c-d)}{3}$$\n and similarly \n $$q=\\frac{d+2e+u(d-e)}{3},\\,\\, r=\\frac{e+2f+u(a-f)}{3},\\,\\, s=\\frac{f+2a+u(f-a)}{3}.$$\n It follows that \n $$x=\\frac{a+d+2(b+e)+u(a+d-(b+e))}{6},\\,\\,$$\n $$ y=\\frac{b+e+2(c+f)+u(b+e-(c+f))}{6}$$\n and finally \n $$z=\\frac{c+f+2(a+d)+u(c+f-(a+d))}{6}.$$\n One checks immediately that $z-x=u(y-x)$, and so $XYZ$ is indeed equilateral.","subject":"geometry"}
{"id":"G17","problem":"Let $A_1A_2\\ldots A_8$ be a convex cyclic octagon, and for $i=1,2\\ldots,8$ let $B_i=A_iA_{i+3}\\cap A_{i+1}A_{i+4}$ (indices are meant modulo 8). Prove that points $B_1,\\ldots, B_8$ lie on the same conic section.","proof":"Let $P$ be the intersection of $A_5A_6$ and $A_4A_7$. Since $$A_1A_6\\cap A_2A_7=B_6, \\,\\, A_6A_5\\cap A_4A_7=P,\\,\\, A_5A_2\\cap A_4A_1=B_1,$$\nby Pascal's theorem in the hexagon $A_1A_6A_5A_2A_7A_4$ it follows that $B_1, B_6$ and $P$ are collinear. Now consider the hexagon $B_1B_2B_3B_4B_5B_6$. We have \n$B_1B_2\\cap B_4B_5=A_5$, $B_2B_3\\cap B_5B_6=A_6$ and $B_3B_4\\cap B_6B_1=P$ (note that $P$ is on the line $B_3B_4$, which is the same as the line $A_4A_7$). Since $A_5, A_6, P$ are collinear (by definition of \n$P$), by the converse of Pascal's theorem $B_1B_2B_3B_4B_5B_6$ lie on the same conic section. Now iterate this cyclically to deduce the result.","subject":"geometry"}
{"id":"G18","problem":"In a convex pentagon $ABCDE$ with area $S$ triangles $$ABC, BCD, CDE, DEA, EAB$$ have circumradii $R_1,\\ldots, R_5$. Prove that \n$$\\sum_{i=1}^5 R_i^4\\geq \\frac{4}{5\\sin^2 108^0} S^2.$$","proof":"We first prove a general upper bound:\n \n \\begin{lemma}\n The area $S$ of a convex $n$-gon $A_1\\ldots A_n$ satisfies \n $$S\\frac{1}{4}\\sum_{i=1}^n A_{i-1}A_{i+1} R_i,$$\n the indices being taken mod $n$ and $R_i$ being the circumradius of triangle \n $A_{i-1}A_iA_{i+1}$.\n \\end{lemma}\n\n\\begin{proof}\nLet $M_i$ be the midpoint of $A_iA_{i+1}$. Let $P$ be a point inside the \n$n$-gon and choose $k$ such that $PA_k$ is minimal among $PA_1,\\ldots, PA_n$. \nThen $PA_k\\leq PA_{k+1}$ and $PA_k\\leq PA_{k-1}$. Let $Q_k$ be the quadrilateral formed by the segments \n$A_kM_k$ and $A_{k}M_{k-1}$ and the perpendiculars to these segments drawn through $M_k$ and \n$M_{k-1}$. Then $P\\in Q_k$, since $P$ is inside the polygon and belongs to each of the half-planes containing \n$A_k$ and bounded by the perpendicular bisectors to $A_kA_{k+1}$ and $A_kA_{k-1}$. Thus \n$\\cup Q_k$ contains $A_1\\ldots A_n$, thus \n$$S\\leq \\sum_k {\\rm area}(Q_k)\\leq \\sum_{k}\\frac{1}{4} A_{i-1}A_{i+1}R_i.$$\n\\end{proof}\n\n Using the lemma and the Cauchy-Schwarz inequality, we obtain \n $$2S\\leq \\sqrt{\\sum R_i^4}\\cdot \\sqrt{\\sum \\sin^2 A_i}.$$\n Thus it suffices to prove that \n $$\\sum \\sin^2 A_i\\leq 5\\sin^2 108^0$$\n for the angles of any convex $5$-gon. We may assume that \n $A_1\\leq\\ldots \\leq A_5$ and that $A_1>108^0$. If $A_1+A_5\\geq 270^0$ then \n $A_2+A_3+A_4\\leq 270^0$, then $A_2\\leq 90^0$, $A_1\\leq 90^0$ and $A_5\\geq 180^0$, a contradiction. But then \n $$\\sin^2 108^0+\\sin^2(A_1+A_5-108^0)>\\sin^2 A_1+\\sin^2 A_5$$\n since this is equivalent to \n $$2\\cos (A_1+A_5)\\sin (A_1-108^0)\\sin (A_5-108^0)>0,$$\n which is clear. Thus replacing $(A_1, A_5)$ by $(108^0, A_1+A_5-108^0)$ we are reduced to the case $A_1=108^0$. Repeating this argument we can make all $A_i$'s equal to $108^0$ and then everything is clear.","subject":"geometry"}
{"id":"G19","problem":"Consider $n\\geq 3$ points in the plane, no three collinear. Prove that we can label them \n $P_1,...,P_n$ such that the angle $P_{i-1}P_iP_{i+1}$ is $\\leq \\pi/2$ for all $1<i<n$.","proof":"Take the labelling which maximizes the expression $P_1P_2^2+P_2P_3^2+...+P_{n-1}P_n^2$. Let $1<i<n$ and consider the labelling \n $P_1...P_{i-1}P_{i+1}...P_nP_i$. By maximality\n $$P_1P^2+...+P_{i-2}P_{i-1}^2+P_{i-1}P_{i+1}^2+P_{i+1}P_{i+2}^2+...+P_{n-1}P_n^2+P_nP_i^2\\leq $$\n $$ P_1P_2^2+...+P_{i-2}P_{i-1}^2+P_{i-1}P_i^2+P_{i}P_{i+1}^2+P_{i+1}P_{i+2}^2+...+P_{n-1}P_n^2.$$\n Cancelling terms and using that $P_nP_i^2\\geq 0$ yields \n $$P_{i-1}P_i^2+P_iP_{i+1}^2\\geq P_{i-1}P_{i+1}^2,$$\n thus the angle $P_{i-1}P_iP_{i+1}$ is $\\leq \\pi/2$.","subject":"geometry"}
{"id":"G20","problem":"Let $k$ be a positive integer. For which integers $n>1$ can we find points \n$P_1,\\ldots, P_n$ on the unit circle so that $MP_1^k+\\ldots+MP_n^k$ is independent of the choice of the point \n$M$ on the unit circle?","proof":"Suppose first that $k$ is odd. We will prove that there are no such integers $n$. Indeed, let \n$z_i$ be the complex number representing $P_i$. By assumption \n$$f(z):=\\sum_{i=1}^n |z-z_i|^k$$\nis constant on $|z|=1$, say $f(z)=c$ for all $|z|=1$. Clearly $c>0$. Observe that \n$$|z-z_i|^2=2-z\\overline{z_i}-\\overline{z} z_i=2-\\frac{z}{z_i}-\\frac{z_i}{z}=-\\frac{(z-z_i)^2}{zz_i}.$$\nWriting $z_i=u_i^2$ with $|u_i|=1$, it follows that $|z^2-z_j|$ is either $i \\frac{(z^2-z_j)}{zu_j}$ or \n$-i\\frac{(z^2-z_j)}{zu_j}$ and so for any $|z|=1$ there are signs $\\varepsilon_j(z)\\in \\{-1,1\\}$ with \n$$c=f(z^2)=\\sum_{j=1}^n \\left( i\\cdot \\varepsilon_j(z) \\frac{z^2-z_j}{zu_j}\\right)^k.$$\n The tuples $(\\varepsilon_1(z),\\ldots, \\varepsilon_n(z))$ take only finitely many values, thus there will be some \n $(\\varepsilon_1,\\ldots, \\varepsilon_n)\\in \\{-1,1\\}$ such that \n $$(\\varepsilon_1(z),\\ldots, \\varepsilon_n(z))=(\\varepsilon_1,\\ldots, \\varepsilon_n)$$\n for infinitely many $|z|=1$. Then \n $$\\sum_{j=1}^n \\left(i \\varepsilon_j \\frac{z^2-z_j}{u_j}\\right)^k=cz^k$$\n for infinitely many $|z|=1$, and thus it holds true as a polynomial equality. But the left-hand side is an even polynomial, while the right-hand side is odd, a contradiction.\n \n Suppose now that $k=2m$ is even. The same calculation as before gives \n $$f(z)=\\sum_{i=1}^n (|z_i-z|^2)^m=\\sum_{i=1}^n (-1)^m \\frac{(z-z_i)^{2m}}{(zz_i)^m}.$$\n Writing again $z_i=u_i^2$, we want \n $$g(z):=z^{-m}\\sum_{i=1}^n (\\frac{z}{u_i}-u_i)^{2m}$$\n to be constant on the unit circle $|z|=1$. Using the binomial expansion we have \n $$g(z)=z^{-m}\\sum_{j=0}^{2m} (-1)^j \\binom{2m}{j} z^j \\sum_{i=1}^n u_i^{2(m-j)}.$$\n This is constant on the unit circle if and only if \n for all $k\\ne m$, $0\\leq j\\leq 2m$ \n $$\\sum_{i=1}^n u_i^{2(m-j)}=0.$$\n Note that since $|u_i|=1$, we have \n $u_1^t+\\ldots+u_n^t=0$ if and only if \n $u_1^{-t}+\\ldots+u_n^{-t}=0$. Thus $g$ is constant if and only if for \n $1\\leq j\\leq m$ \n $$\\sum_{i=1}^n z_i^j=0.$$\n Using Newton sums, we see that if such $z_i$'s exist then we must have $n>m=k/2$. Conversely, if \n $n>k$ we can pick for $z_i$ the $n$th roots of unity and such relations are satisfied. \n \n Thus for $k$ odd there are no solutions, and for $k$ even the solutions are the integers greater than $k/2$.","subject":"geometry"}
{"id":"G21","problem":"In the plane, there are $n \\geq 6$ pairwise disjoint disks $D_{1}, D_{2}, \\ldots, D_{n}$ with radii $R_{1} \\geq R_{2} \\geq \\ldots \\geq R_{n}$. For every $i=1,2, \\ldots, n$, a point $P_{i}$ is chosen in disk $D_{i}$. Let $O$ be an arbitrary point in the plane. Prove that \\[O P_{1}+O P_{2}+\\ldots+O P_{n} \\geq R_{6}+R_{7}+\\ldots+R_{n}.\\](A disk is assumed to contain its boundary.)","proof":"We argue by induction on $n\\geq 5$, the case $n=5$ being clear. It follows from the key lemma below (applied to the six largest disks) that there are $1\\leq i,j\\leq 6$ such that \n $OP_i\\geq R_j\\geq R_6$. Removing $D_i$ and applying the inductive hypothesis, we have \n $\\sum_{k\\ne i} OP_k\\geq \\sum_{i\\geq 7} R_i$, so we are done.\n \n \\begin{lemma}\n Let $(D_i)_{1\\leq i\\leq 6}$ be six disjoint disks with radii $R_1,...,R_6$ and let \n $P_i\\in D_i$ and $O$ a point in the plane. There are indices $i,j$ with $OP_i\\geq R_j$.\n \\end{lemma}\n \n \\begin{proof}\n Let $O_i$ be the center of $D_i$ and note that some angle $O_iOO_j$ is at most $\\pi/3$ (consider the rays $OO_i$, where if $O=O_i$ we assign an arbitrary direction to the ray; they split the plane into six angles whose measures add up to $2\\pi$). Since the angle $O_iOO_j$ is at most $\\pi/3$, the side $O_iO_j$ cannot be the unique largest side in triangle $O_iOO_j$, so without loss of generality we may assume that $OO_i\\geq O_iO_j\\geq R_i+R_j$, but then $OP_i\\geq OO_i-R_i\\geq R_j$.\n \\end{proof}","subject":"geometry"}
{"id":"G22","problem":"Let $A_1\\ldots A_n$ be a cyclic convex polygon whose circumcenter lies strictly inside the polygon and let $B_1,\\ldots, B_n$ points on the sides $A_1A_2,\\ldots, A_nA_1$ other than the vertices of the polygon. Prove that \n$$\\sum_{i=1}^n \\frac{B_iB_{i+1}}{A_iA_{i+2}}>1.$$","proof":"Let $R$ be the circumradius of the polygon $P=A_1\\ldots A_n$ and let $R_i$ be the circumradius of triangle $B_iA_{i+1}B_{i+1}$. Since \n $$B_iB_{i+1}=2R_i \\sin A_{i+1},\\,\\, A_iA_{i+2}=2R\\sin A_{i+1},$$\n the inequality is equivalent to \n $$R_1+\\ldots+R_n>R.$$\n Note that \n $$B_iA_{i+1}+A_{i+1}B_{i+1}\\leq 2R_i+2R_i=4R_i,$$\n thus it suffices to prove that \n $$B_1A_2+A_2B_2+B_2A_3+A_3B_3+\\ldots+B_nA_1+A_1B_1>4R,$$\n or equivalently the perimeter of $P$ is greater than four times $R$. We will prove this for any convex polygon inscribed in a circle of radius $R$, such that the center of the circle is inside the polygon. Partition the polygon into $n-2$ triangles using the diagonals\n $A_1A_3, A_1A_4,\\ldots, A_1A_{n-1}$. By assumption for some $i$ the center $O$ of the circle is inside or on the boundary of triangle $A_1A_iA_{i+1}$. Note that the perimeter of the polygon is at least that of triangle $A_1A_iA_{i+1}$, since \n $A_1A_2+\\ldots+A_{i-1}A_i\\geq A_1A_i$ and similarly $A_{i+1}A_{i+2}+\\ldots+A_nA_1\\geq A_{i+1}A_1$. Thus it suffices to prove that for a right or acute triangle inscribed in a circle of radius $R$ the perimeter is greater than $4R$. The case of a right triangle is trivial: if angle $B$ is $\\pi/2$ then $AC=2R$ and so $AB+BC+CA>2AC=4R$. Suppose that $ABC$ is acute and let \n $A_1,B_1,C_1$ be the midpoints of the sides $BC, CA, AB$. Then $O$ is the orthocenter of $A_1B_1C_1$ and it lies inside this triangle. If the line $C_1O$ intersects the segment $A_1B_1$ at $S$, then \n $$AB+BC+CA=2(AA_1+A_1B_1+B_1C)=2(AA_1+A_1S)+2(SB_1+B_1C)>$$\n $$2AS+2SC>2AO+2CO=4R,$$\n where we used that the angles $AOS$ and $COS$ are obtuse.","subject":"geometry"}
{"id":"G23","problem":"Suppose that $A$, $B$, $C$, and $D$ are distinct points, no three of which lie on a line, in the Euclidean plane. Show that if the squares of the lengths of the line segments $AB$, $AC$, $AD$, $BC$, $BD$, and $CD$ are rational numbers, then the quotient\n\\[\\frac{\\mathrm{area}(\\triangle ABC)}{\\mathrm{area}(\\triangle ABD)}\\]is a rational number.","proof":"Taking the origin at the midpoint of $AB$ and using symmetry, we may assume that $A=(\\sqrt{a}, 0)$ and $B=(-\\sqrt{a}, 0)$, with a (necessarily) rational number $a$. Let $C=(x_1,y_1)$ and $D=(x_2,y_2)$. The area of $ABC$ is then $\\sqrt{a}y_1$ and that of \n $ABD$ is $\\sqrt{a}y_2$, thus we need to prove that $y_1/y_2$ is rational. We will actually prove that $y_1y_2$ and $y_1^2$ are rational, which suffices. By assumption $(x_1\\pm \\sqrt{a})^2+y_1^2$ are both rational, hence $x_1^2+y_1^2$ and $x_1\\sqrt{a}$ are rational as well. \n Similarly $x_2^2+y_2^2$ and $x_2\\sqrt{a}$ are rational. Since $x_1\\sqrt{a}\\cdot x_2\\sqrt{a}$ is rational, $x_1x_2$ must be as well rational. Since $(x_1\\sqrt{a})^2$ is rational, $x_1^2$ must be rational, and similarly $x_2^2$ is rational. Since $x_1^2+y_1^2$ is rational, $y_1^2$ must be rational, as well as $y_2^2$. Finally, $(x_1-x_2)^2+(y_1-y_2)^2$ is rational, but we have already seen that $x_1^2, x_2^2, y_1^2, y_2^2$ and $x_1x_2$ are rational, so $y_1y_2$ must be rational and we are done.","subject":"geometry"}
{"id":"G24","problem":"The convex polygon $A_1A_2\\ldots A_n$ with centroid $G$ is inscribed in a circle with center $O$ and radius $R$. Prove that \n $$MA_1+\\ldots+MA_n\\geq nR$$\n for any point $M$ in the plane of the polygon if and only if $O=G$.","proof":"Choose the origin at $O$ and let $z_i$ be the complex number representing $A_i$. By assumption $|z_1|=\\ldots=|z_n|=R$. \n If $O=G$ then $z_1+\\ldots+z_n=0$ and for any complex number $z$ we have \n $$R\\sum_{i=1}^n |z-z_i|=\\sum_{i=1}^n |z\\overline{z_i}-z_i\\overline{z_i}|\\geq |z\\sum_{i=1}^n \\overline{z_i}-nR^2|=nR^2,$$\n yielding $\\sum_{i=1}^n MA_i\\geq nR$ for any $M$.\n Conversely, suppose that $\\sum_{i=1}^n MA_i\\geq nR$ for any $M$ and let us prove that $z_1+\\ldots+z_n=0$. Write \n $z_k=a_k+ib_k$ with $a_k, b_k$ real numbers and let $x$ be a sufficiently small positive number. For \n $M$ corresponding to the complex number $x$ we have \n $$\\sum_{k=1}^n \\left(\\sqrt{x^2-2xa_k+R^2}-R\\right)\\geq 0$$\n or \n $$\\sum_{k=1}^n \\frac{x(x-2a_k)}{R+\\sqrt{x^2-2xa_k+R^2}}\\geq 0.$$\n Dividing by $x$ and letting $x\\to 0$ yields $\\sum_{k=1}^n a_k\\leq 0$. Now letting $x<0$ close to $0$ and using a similar argument yields \n $\\sum_{k=1}^n a_k\\geq 0$, thus $\\sum_{k=1}^n a_k=0$. Taking $M$ of the form $iy$ with $y\\in \\mathbf{R}$ and using a similar argument also shows that $\\sum_{k=1}^n b_k=0$, finishing the proof.","subject":"geometry"}
{"id":"G25","problem":"Let $ABCD$ be a convex quadrilateral such that \n$$(AB-BC)^2+(CD-DA)^2=2(AB\\cdot AD-AC\\cdot BD+BC\\cdot CD).$$\nProve that $ABCD$ is cyclic if and only if it is circumscriptible.","proof":"Let $$a=AB, b=BC, c=CD, d=DA, e=AC, f=BD,$$\nso that \n$$(a-b)^2+(c-d)^2=2(ad-ef+bc).$$\nBy Ptolemy's theorem $ABCD$ is cyclic if and only if $ef=ac+bd$, or equivalently \n$$(a-b)^2+(c-d)^2=2(ad-ac-bd+bc),$$ or yet $$(a-b)^2+(c-d)^2=-2(a-b)(c-d)$$ and finally \n$(a-b+c-d)^2=0$. But the relation $a+c=b+d$ is equivalent to $ABCD$ being circumscriptible by Pitot's theorem.","subject":"geometry"}
{"id":"G26","problem":"In the convex hexagon $ABCDEF$ pairs of opposite sides ($AB$ and $DE$, $BC$ and $EF$, $CD$ and $FA$) are parallel and \n$$d(AB, DE)=d(BC, EF)=d(CD, FA).$$\nProve that \n$$AD+BE+CF\\leq AB+BC+CD+DE+EF+FA.$$","proof":"The lines supporting the sides $CD$ and $EF$ meet at some point $X$, those supporting the sides $EF$ and \n $AB$ meet at some point $Y$ and those supporting the sides $AB$ and $CD$ meet at some point $Z$. Use barycentric coordinates in the triangle \n $XYZ$ to express\n $$A=(1-s)Y+sZ,\\,\\, C=tX+(1-t)Z,\\,\\, E=(1-r)X+rY.$$\n Since $DE$ is parallel to $YZ$ we have \n $$D=(1-r)X+rZ$$\n and similarly \n $$F=sX+(1-s)Y,\\,\\, B=tY+(1-t)Z.$$\n Note that $d(AB, DE)$ is proportional to $(1-r)/x$, since it is $1-r$ times the height of the altitude from $X$ to $YZ$. Thus \n $$\\frac{1-r}{x}=\\frac{1-s}{y}=\\frac{1-t}{z},$$\n call this common value $k$, so that $$r=1-kx,\\,\\, s=1-ky,\\,\\, t=1-kz.$$\n We then have \n $$AB+DE=(1-s-t)x+rx=k(y+z-x).$$\n Let us write \n $$x=v+w, \\,\\, y=u+w,\\,\\, z=u+v.$$\n Then $AB+DE=2kux$\n and\n $$AB+BC+CD+DE+EF+FA=2k(ux+vy+wz).$$\n On the other hand \n $$AD=||(1-r)X-(1-s)Y+(r-s)Z||=k|| x(Z-X)+y(Y-Z)||=$$\n $$kxy|| \\frac{Z-X}{y}+\\frac{Y-Z}{x}||=kxy 2\\sin Z/2=kxy 2\\sqrt{uv}{xy},$$\n since the angle between $\\frac{Z-X}{y}$ and $\\frac{Y-Z}{x}$ is $\\pi-XZY$. The inequality is then equivalent to \n $$\\sqrt{uv xy}+\\sqrt{vwyz}+\\sqrt{wuzx}\\leq \\sqrt{ux+vy+wz}\\cdot {vy+wz+ux},$$\n which follows from Cauchy-Schwarz.","subject":"geometry"}
{"id":"G27","problem":"Let $ABCDE$ be a convex pentagon and let \n$A_1,\\ldots, E_1$ be the intersections of the diagonals $BD$ and $CE$, $CE$ and $DA$, $DA$ and $EB$, \n$EB$ and $AC$, $AC$ and $BD$. If four of the quadrilaterals $AB_1A_1B, BC_1B_1C, CD_1C_1D, DE_1D_1E, EA_1E_1A$ are cyclic, prove that the fifth one is cyclic as well.","proof":"We work with complex numbers. Let $$z_1=\\vec{AC},\\, z_2=\\vec{BD},\\, z_3=\\vec{CE},\\, z_4=\\vec{DA},\\, \n z_5=\\vec{EB}.$$\n Then quadrilateral $AE_1A_1E$ is cyclic if and only if \n $$\\frac{z_1z_3}{z_2(z_1+z_3)}\\in \\mathbf{R},$$\n or equivalently $z_2(1/z_1+1/z_3)\\in \\mathbf{R}$. Let $x_i=1/z_i$. We obtain similar conditions for the others quadrilaterals to be cyclic. Note that \n $$\\sum_{k=1}^5 (w_k+w_{k+2})\\overline{w_{k+1}}=\\sum_{k=1}^5 (w_k\\overline{w_{k+1}}+\\overline{w_k} w_{k+1})$$\n is a real number. If four of the quadrilaterals are cyclic then four terms in the left-hand side are real numbers, hence the fifth one as well and we are done.","subject":"geometry"}
{"id":"G28","problem":"Prove that in any acute triangle $ABC$ the angle $OIH$ is greater than $135$ degrees.","proof":"It suffices to check that $\\cos OIH<\\cos 135^0=-1/\\sqrt{2}$. Suppose that this fails, thus \n $$\\frac{OH^2-IH^2-IO^2}{2 IO\\cdot IH}\\leq 1/\\sqrt{2}.$$\n Recall the standard formulae \n $$OI^2=R(R-2r),\\,\\, OH^2=9R^2-(a^2+b^2+c^2).$$\n The median theorem in triangle $OIH$ combined with the observation that the nine-point center $N$ is the midpoint of $OH$ and \n $NI=R-r/2$ (recall that the incircle and the nine-point circle are tangent at the Feuerbach point) gives \n $$OH^2-IH^2-OI^2=IH^2+2r(R-2r).$$\n Thus \n$$IH^2=4R^2+2r^2-(a^2+b^2+c^2)/2.$$\nSince $ABC$ is acute, \n$$x:=2\\cos A\\cos B\\cos C>0$$\nand \n$$a^2+b^2+c^2=8R^2+4x.$$\nThen $OH^2=R^2-4x$, $IH^2=2r^2-2x$ and then the inequality \n$$\\frac{OH^2-IH^2-IO^2}{2 IO\\cdot IH}\\leq 1/\\sqrt{2}$$\nbecomes \n$$x^2+(R^2+2r^2)x+r^4-4xrR\\leq 0$$\nor \n$$(r^2-x)^2+(R-2r)^2x<0,$$\nwhich is obviously impossible.","subject":"geometry"}
{"id":"G29","problem":"A point $P$ inside the convex $n$-gon $A_1\\ldots A_n$ has the property that all angles \n$A_i P A_{i+1}$ are equal to $2\\pi/n$. Prove that for any point $Q$ in the plane of the polygon\n$$QA_1+\\ldots+QA_n\\geq PA_1+\\ldots+PA_n.$$","proof":"Take the coordinate system with origin at $P$ and such that $A_n$ lies on the positive $x$-ray. Let $R_i=PA_i$, so that by assumption \n $A_k$ has associated complex number $R_k e^{2i\\pi k/n}$. If $Q$ has associated complex number \n $re^{i\\theta}$, then \n $$\\sum QA_k=\\sum |re^{i\\theta}-R_k e^{2i\\pi k/n}|=\\sum |R_k-r e^{i(\\theta-2\\pi k/n)}|\\geq \\sum {\\rm Re}(R_k-r e^{i(\\theta-2\\pi k/n)})$$\n $$=\\sum (R_k-r\\cos (\\theta-2\\pi k/n)).$$\n It remains to notice that \n $$\\sum_{k=1}^n \\cos(\\theta-2\\pi k/n)={\\rm Re}(\\sum_{k=1}^n e^{i\\pi \\theta-2i\\pi k/n})={\\rm Re}(e^{i\\pi \\theta}\\sum_{k=1}^n e^{-2i\\pi k/n})=0,$$\n thus \n $$\\sum QA_k\\geq \\sum R_k=\\sum PA_k.$$","subject":"geometry"}
{"id":"G30","problem":"For a point $P$ inside the triangle $ABC$ the lines $PA, PB, PC$ intersect $BC, CA, AB$ at \n$A', B', C'$ respectively. Prove that \n$$\\frac{BA'}{BC}+\\frac{CB'}{CA}+\\frac{AC'}{AB}=\\frac{3}{2}$$\nif and only if at least two of the triangles $PAB, PBC, PCA$ have the same area.","proof":"Let $x,y,z$ be the areas of triangles $PAB, PBC, PCA$. Write $[T]$ for the area of triangle $T$, then \n$$\\frac{BA'}{BC}=\\frac{[ABA']}{[ABC]}=\\frac{[PBA']}{[PBC]}=$$\n$$\\frac{[ABA']-[PBA']}{[ABC]-[PBC]}=\\frac{[PAB]}{[PAB]+[PAC]}=\\frac{x}{x+z}.$$\nThe condition of the problem is equivalent to \n$$\\frac{x}{x+z}+\\frac{y}{x+y}+\\frac{z}{y+z}=\\frac{3}{2},$$\nor \n$$\\sum \\left(\\frac{x}{x+y}-\\frac{x}{x+z}\\right)=0.$$\nA simple calculation shows that this is equivalent to $$(x-y)(y-z)(z-x)=0.$$","subject":"geometry"}
{"id":"G31","problem":"Consider a circle with center $M$ and a square $ABCD$ whose vertices lie outside the circle. Let $AA',\\ldots, DD'$ be the tangents to the circle. If the segments $AA',\\ldots, DD'$ are the consecutive sides of a quadrilateral $P$ in which a circle can be inscribed, proved that $P$ has an axis of symmetry.","proof":"Let $O$ be the center of the square $ABCD$ and $a=AB=BC=CD=DA$. Let $R$ be the radius of the circle with center $M$. We have \n$$A'A^2+C'C^2=AM^2+CM^2-2R^2$$\nand thanks to the median theorem in triangle $ACM$ we can rewrite this \n$$A'A^2+C'C^2=2MO^2+a^2-2R^2.$$\nA similar argument also gives \n$$B'B^2+D'D^2=2MO^2+a^2-2R^2,$$\nin particular \n$$A'A^2+C'C^2=B'B^2+D'D^2.$$\nSince the segments $A'A,\\ldots, D'D$ are the consecutive sides of a quadrilateral with an inscribed circle, by Pithot's theorem we also have \n$$A'A+C'C=B'B+D'D.$$\nNow if $a,b,c,d$ are nonnegative real numbers such that $a+c=b+d$ and $a^2+c^2=b^2+d^2$, then $a=b$ and $c=d$ or $a=d$ and $b=c$. Indeed, \n$(a+c)^2-2ac=(b+d)^2-2bd$ gives $ac=bd$ and so $(t-a)(t-c)=(t-b)(t-d)$ for all $t$, thereby $(a-b)(a-d)=0$ and the rest is clear. \n\nApplying this observation to our situation, it follows that \n$A'A=B'B$ and $C'C=D'D$ or $A'A=D'D$ and $B'B=C'C$. It follows that $P$ has an axis of symmetry, the perpendicular bisector of one of the diagonal segments.","subject":"geometry"}
{"id":"G32","problem":"Prove that in any triangle $ABC$\n$$\\sum \\frac{\\cos \\frac{A}{2}+\\cos \\frac{B}{2}}{\\sin \\frac{C}{2}}\\geq 6\\sqrt{3}.$$","proof":"Using the AM-GM inequality and the inequality $(x+y)(y+z)(z+x)\\geq 8xyz$ for $x,y,z>0$, it suffices to prove that \n$$\\cot \\frac{A}{2}\\cot \\frac{B}{2}\\cot \\frac{C}{2}\\geq 3\\sqrt{3}.$$\nThe left-hand side equals $\\frac{(p-a)(p-b)(p-c)}{r^3}$, where $p=\\frac{a+b+c}{2}$, $r$ is the inradius of the triangle and \n$a,b,c$ are the side-lengths. On the other hand, the area $S$ of the triangle satisfies $$S=rp\\,\\, \\text{and}\\,\\, (p-a)(p-b)(p-c)=S^2/p=r^2p,$$ thus \n$$\\cot \\frac{A}{2}\\cot \\frac{B}{2}\\cot \\frac{C}{2}=\\frac{p}{r}$$\nand we are reduced to proving that $p\\geq 3\\sqrt{3}r$, which is standard, and follows from \n$$pr^2=(p-a)(p-b)(p-c)\\leq \\left(\\frac{p-a+p-b+p-c}{3}\\right)^3=p^3/27.$$","subject":"geometry"}
{"id":"G33","problem":"Points $A,B,C,D$ have pairwise distances greater than or equal to $5$ and are all in a square of side $6$. Prove that these four points form a convex quadrilateral, whose area is greater than $21$.","proof":"The key observation is that no three points among $A,B,C,D$ can determine an angle greater than or equal to $2\\pi/3$. Indeed, suppose that the angle \n$ABC$ is at least $2\\pi/3$. Since $AB, BC\\geq 5$, this yields \n$AC\\geq 5\\sqrt{3}$. On the other hand $AC\\leq 6\\sqrt{2}$, but $5\\sqrt{3}>6\\sqrt{2}$, a contradiction.\n\nNow, if $A,B,C,D$ do not form a convex quadrilateral then one of them must be in the triangle determined by the other three, say without loss of generality that $D$ is in the triangle $ABC$. But then by the pigeonhole principle one of the angles $BDC, CDA, ADB$ is at least $2\\pi/3$, contradicting the result established in the first paragraph. \n\nBy the first paragraph all angles in triangle $ABC$ are $<2\\pi/3$, and at least one angle, say angle $ABC$, must be $\\geq \\pi/3$. It follows that \n$\\sin ABC\\geq \\frac{\\sqrt{3}}{2}$ and so \n$$[ABC]=\\frac{AB\\cdot BC}{2}\\sin ABC\\geq \\frac{\\sqrt{3}}{4}\\cdot 25.$$\nOne easily checks that the last quantity is greater than $21/2$ (this reduces to $625>588$). A similar argument shows that triangle \n$ACD$ has area $>21/2$ and so $ABCD$ has area greater than $21$.","subject":"geometry"}
{"id":"G34","problem":"Let $T$ be an equilateral triangle in the plane and let $X$ be a finite set of points in the plane such that any subset of $X$ with no more than $9$ elements can be covered by two translates of $T$. Prove that $X$ can be covered by two translates of $T$.","proof":"Consider the smallest equilateral triangle $ABC$ oriented in the same way as $T$ and containing $X$. By minimality, there is a point of \n$X$ on each edge of $ABC$, thus we can pick points $x_A, x_B, x_C$ on edges $BC$, $CA$, and $AB$ respectively, not necessarily distinct. \nClearly, we may assume that $ABC$ is larger than the initial triangle $T$. Choose $B_A,C_A,A_B,C_B,A_C,B_C$ on the edges of $ABC$ so that \n$AB_AC_A$, $A_BBC_B$ and $A_CB_CC$ form three copies of $T$. Let $X_A=X \\backslash AB_AC_A$ be the set of points not covered by \n$AB_AC_A$ and define similarly $X_B, X_C$.\nNext consider the smallest triangles $M_A,M_B,M_C$ that contain $X_A,X_B,X_C$ respectively. Each edge of $M_A$ contains a point of $X$, one of which is $x_A$, and similarly for $M_B$ and $M_C$. In total there are at most $9$ such points, so they can be covered by two copies of $T$ by assumption. By the pigeonhole principle one of those two copies contains at least two pints from $\\{x_A,x_B,x_C\\}$, say $x_A,x_B$.\n\n\\begin{lemma}\nIf a translation $T'$ of $T$ contains $x_A,x_B$, then it cannot contain any point from $X_C$.\n\\end{lemma}\n\n\\begin{proof}\nSince $x_A$ and $x_B$ lie on different edges of $ABC$, the only way for $T'$ to cover both of them is if it contains the point $C$. This means that the edge of $T'$ parallel to $AB$ lies below the line $A_CB_C$ (of triangle $CA_CB_C$) so it cannot contain any point of $X_C$.\n\\end{proof}\n\nThe lemma implies that no points from $X_C$ are covered by the first triangle, hence the second triangle covers $X_C$. But then the second triangle and $AB_AC_A$ cover $X$ and we are done.","subject":"geometry"}
{"id":"G35","problem":"Let $D$ be a point on the side $BC$ of triangle $ABC$ and let $\\Gamma$ be the circumcircle of triangle $ABC$. Let \n$\\mathcal{B}, \\mathcal{C}$ be the circles tangent to $\\Gamma$, $AD$, $BD$ and to $\\Gamma$, $AD$, $CD$ respectively. Prove that \n$\\mathcal{B}$ is tangent to $\\mathcal{C}$ if and only if the angles $BAD$ and $CAD$ are equal.","proof":"Let $E$ be the intersection of the line $AD$ with $\\Gamma$ and let $M,N$ be the tangency points of \n$\\mathcal{B}$ with $BD$ and $AD$, respectively. Let $P,Q$ be the tangency points of $\\mathcal{C}$ with $CD$ and $AD$, respectively. Applying Cassey's theorem to the circles $B,C,E,\\mathcal{B}$ (the first three are simply points, considered as degenerate circles), we obtain the relation \n$$BE\\cdot CM+CE\\cdot BM=BC\\cdot EN.$$\nSimilarly, Cassey's theorem for the circles $B,C,E,\\mathcal{C}$ yields \n$$BE\\cdot CP+CE\\cdot BP=BC\\cdot EQ.$$\nNow $\\mathcal{B}$ is tangent to $\\mathcal{C}$ if and only if $N=Q$. By the above relations, this is equivalent to \n$$BE\\cdot CM+CE\\cdot BM=BE\\cdot CP+CE\\cdot BP$$\nor to \n$$BE(CM-CN)=CE(BN-BM)$$\nand finally to $(BE-CE)MN=0$. This is in turn equivalent to $BE=CE$, and finally to the fact that angles $BAD$ and $CAD$ are equal.","subject":"geometry"}
{"id":"G36","problem":"The vertices of a convex $n$-gon are lattice points (i.e. points with integer coordinates). Prove that there area of the polygon is at least \n$n^3/64$.","proof":"Consider a convex $n$-gon $A$. We claim that there are three vertices of $P$ forming a triangle with area at most \n$32S/n^3$, where $S$ is the area of $A$. If the vertices of $P$ are lattice points, then the area of this triangle is at least\n$1/2$, and so $32S/n^3\\geq 1/2$, yielding the desired inequality.\n\nIn order to prove the claim, we start by proving a weaker claim: if $P$ is the perimeter of $A$, we can find three vertices of $A$ forming a triangle with area \nat most $\\pi P^2/n^3$. Indeed, let $a_1,\\ldots, a_n$ be the sidelengths of $A$ and let $\\alpha_i$ be the external angles of the polygon. The areas of the triangles formed by three consecutive vertices of $P$ are given by \n$\\frac{a_ia_{i+1}}{2}\\sin \\alpha_i$. Their product is (using that $\\sin x<x$ and that $\\sum \\alpha_i=2\\pi$, together with the AM-GM inequality)\n$$\\prod_{i=1}^n \\left(\\frac{a_ia_{i+1}}{2}\\sin \\alpha_i\\right)<\\frac{(a_1\\ldots a_n)^2}{2^n} \\prod_{i=1}^n \\alpha_i$$\n$$<(P/n)^{2n} \\frac{1}{2^n} (2\\pi/n)^n=(\\pi P^2/n^3)^n,$$\nso some of these triangles must have an area smaller than $\\pi P^2/n^3$.\n\nIn order to deduce the original claim from the weaker one proved above, it suffices to prove that there is an area-preserving affine transformation \n$f$ (given by some matrix in ${\\rm SL}_2(\\mathbf{R})$) such that $f(A)$ has perimeter bounded by $4\\sqrt{2S}$. But it is well-known that there is a rectangle of area at most $2S$ containing $A$ (take support lines to $A$, parallel and orthogonal to its diameter). Choose $f$ to map this rectangle onto the square with the same area as the rectangle.","subject":"geometry"}
{"id":"G37","problem":"Let $d_a, d_b, d_c$ be the distances from an interior point $M$ to the sides $BC, CA, AB$ of triangle $ABC$. Let $O$ be the circumcenter of \n$ABC$, $I$ its incenter and $r$ its inradius. Prove that if $d_ad_bd_c\\geq r^3$, then $M$ lies inside or on the circle with center $O$ and radius $OI$.","proof":"Let $A_1,B_1,C_1$ be the projections of $M$ on the sides $BC, CA, AB$. Let $\\alpha, \\beta, \\gamma$ be the angles of triangle $ABC$. Then the angle \n$B_1MC_1$ is $\\pi-\\alpha$, the angle $A_1MC_1$ is $\\pi-\\beta$ and the angle $A_1MB_1$ is $\\pi-\\gamma$. On the other hand \n$$2[ABC]=\\sum ad_a$$\nand \n$$2[A_1B_1C_1]=\\sum d_b d_c\\sin \\alpha=\\frac{d_ad_bd_c}{2R}\\sum \\frac{a}{d_a},$$\nwhere $[T]$ is the area of triangle $T$ and $R$ is the circumradius of $ABC$ (and we used the law of sine). It follows that \n$$4[ABC][A_1B_1C_1]=\\frac{d_ad_bd_c}{2R} (\\sum ad_a)(\\sum \\frac{a}{d_a})\\geq \\frac{d_ad_bd_c}{2R}(a+b+c)^2,$$\nthanks to the Cauchy-Schwarz inequality. \nOn the other hand, by Euler's formula \n$$\\frac{[A_1B_1C_1]}{[ABC]}=\\frac{R^2-OM^2}{4R^2}.$$\nSince $[ABC]=sr$, with $s$ the semi-perimeter of $ABC$, it follows that \n$$r^2(R^2-OM^2)\\geq 2R d_ad_bd_c\\geq 2Rr^3,$$\nthus $R^2-OM^2\\geq 2Rr$. Since $OI^2=R^2-2Rr$, we obtain $OM\\leq OI$, as desired.","subject":"geometry"}
{"id":"G38","problem":"Is it true that any two rectangles of equal area can be placed in the plane such that any horizontal line intersecting at least one of them will also intersect the other, and the segments of intersection will be equal?","proof":"The answer is clear if the rectangles are congruent, so we may assume that in the rectangles $ABCD$ and $XYZW$ of equal area we have \n$AB>XY$. The key ingredient is the following:\n\n\\begin{lemma}\nOne can rotate the rectangles such that four horizontal lines through the vertices $A,B,C,D$ also pass through the vertices $X,Y,Z,W$ respectively.\n\\end{lemma}\n\n\\begin{proof}\nSuppose $AB$ is horizontal and let the lines through the vertices be $\\ell_A,...,\\ell_D$. If the distance between $\\ell_A$ and $\\ell_B$ is less than $XY$ then \nup to horizontal translation and reflection one can uniquely place \n$X$ on $\\ell_A$ and $Y$ on $\\ell_B$.\n\nSince $|AB|>|XY|\\Rightarrow |BC| < |YZ|$ the point $Z$ will lie below $\\ell_C$. Now rotate $ABCD$ around $B$ while keeping $X$ on $\\ell_A$ and $Y$ on $\\ell_B$. Eventually $XYZW$ will be rotated 90 degrees. Since $|AB|>|XY|$, we now have $Z$ lying above $\\ell_C$. By continuity there will exist some angle such that $Z$ lies on $\\ell_C$\n\nNow we have $X,Y,Z$ lying on $\\ell_A$, $\\ell_B$ and $\\ell_C$ respectively. But by symmetry we must also have $W$ lying on $\\ell_D$ and we are done.\n\\end{proof}\n\nBack to the problem, WLOG $\\ell_A$ lies above $\\ell_B$ lies above $\\ell_D$ which lies above $\\ell_C$. Let the distance between them be $d_1,d_2,d_3$ respectively. If the line segments through $ABCD$ and $XYZW$ lying on $\\ell_B$ have length $b$ and $y$ respectively, the area of $ABCD$ is $\\textstyle\\frac{1}{2}d_1b + d_2b + \\frac{1}{2}d_3b$. And similarly for $XYZW$, so we have $b=y$ and the rest follows by Cavalieri's Principle.","subject":"geometry"}
{"id":"G39","problem":"Let $P_1,\\ldots, P_{2n}$ be cyclically ordered points on a circle and let \n$$R_i=\\prod_{j\\ne i} P_iP_j.$$\nProve that $$\\sum_{i=1}^n \\frac{1}{R_{2i}}=\\sum_{i=1}^n \\frac{1}{R_{2i-1}}.$$","proof":"We may assume that the points lie on the unit circle centered at the origin and that their associated complex numbers are \n$z_j=e^{2\\theta_j}$ with $0\\leq \\theta_1<\\ldots<\\theta_{2n}\\leq \\pi$.\nLetting $x_j=e^{i\\theta_j}$, we have \n$z_j=x_j^2$ and for all $j\\ne k$ we have \n$$P_jP_k^2=|x_k^2-x_j^2|^2=(x_k^2-x_j^2)(1/x_k^2-1/x_j^2)=$$\n$$=2-(x_j^2/x_k^2+x_k^2/x_j^2)=-(x_j/x_k-x_k/x_j)^2.$$\nMultiplying these relations shows that \n$$R_j^2=-\\prod_{k\\ne j} (x_j/x_k-x_k/x_j)^2,$$\nso there is $\\varepsilon_{kj}\\in \\{-1,1\\}$ with \n$$R_j=i \\varepsilon_{kj} \\prod_{k\\ne j} (x_j/x_k-x_k/x_j).$$\nNoting that each $x_j/x_k-x_k/x_j$ is equal to $2i\\sin (\\theta_j-\\theta_k)$ and that $\\sin(\\theta_j-\\theta_k)$ is positive for \n$j>k$ and negative otherwise, it follows that \n$$R_j=i (-1)^{n-j} \\frac{\\prod_{k\\ne j} (z_j-z_k)}{z_j^{n-1} x_1\\ldots x_{2n}}.$$\nWe are asked to prove that \n$$\\sum_{j=1}^{2n}\\frac{(-1)^{j-1}}{R_j}=0,$$\nor equivalently that \n$$\\sum_{j=1}^{2n} \\frac{z_j^{n-1}}{\\prod_{k\\ne j} (z_j-z_k)}=0.$$\nThis is a standard application of the Lagrange interpolation theorem.","subject":"geometry"}
{"id":"G40","problem":"Triangle $ABC$ has angle at $A$ equal to $\\pi/3$ and has the property that there is a point $P$ with $PA=1$, $PB=2$ and $PC=3$. What is the maximum possible area of triangle $ABC$?","proof":"Construct points $D,E$ so that $ABCD$ and $APCE$ are parallelograms. Then $BEDP$ is also a parallelogram and \n$$[ABC]=\\frac{AB\\cdot AC\\cdot \\sin \\pi/3}{2}=\\frac{\\sqrt{3}}{4} AB\\cdot AC.$$\nNow Ptolemy's theorem gives \n$$AB\\cdot AC=CD\\cdot PE\\leq DE\\cdot PC+CE\\cdot PD=6+PD.$$\nOn the other hand, we have \n$$PA^2+PD^2-PB^2-PC^2=\\frac{AD^2-BC^2}{2}=2AB\\cdot AC\\cdot \\cos \\pi/3=AB\\cdot AC.$$\nIt follows that \n$$PD^2=12+AB\\cdot AC=12+CD\\cdot PE\\leq 12+PC\\cdot ED+PD\\cdot CE,$$\nthus $PD^2\\leq 12+6+PD$ and $PD\\leq \\frac{1+\\sqrt{73}}{2}$. Combining this with the above inequality $AB\\cdot AC\\leq 6+PD$ yields \n$$[ABC]\\leq \\frac{\\sqrt{3}}{4}(13+\\sqrt{73}).$$\nWe have equality when $PCED$ is a cyclic quadrilateral, i.e. when the angles $PCA$ and $PBA$ are equal.","subject":"geometry"}
{"id":"G41","problem":"Let $n>1$ and let $P$ be a point inside the cyclic $n$-gon $A_1\\ldots A_{2n}$ such that the angles \n$PA_1A_2, PA_2A_3,\\ldots, PA_{2n}A_1$ are equal. Prove that \n$$\\prod_{i=1}^n A_{2i-1}A_{2i}=\\prod_{i=1}^n A_{2i}A_{2i+1}.$$","proof":"We may assume that the $A_i$'s are on the unit circle centered at the origin, in counterclockwise order. Let $z_i$ be the complex numbers corresponding to the $A_i$'s and let $p$ be the one correspond to $P$. Let $\\theta$ be the common value of the angles \n$PA_1A_2, PA_2A_3,\\ldots, PA_{2n}A_1$. Then $$t_i:=e^{i\\theta} \\frac{z_{i+1}-z_i}{p-z_i}\\in \\mathbf{R}.$$\nSince \n$$\\overline{t_i}=e^{-i\\theta} \\frac{\\frac{1}{z_{i+1}}-\\frac{1}{z_i}}{\\frac{1}{p}-\\frac{1}{z_i}},$$\nit follows that \n$$z_{i+1}-z_i=-e^{-2i\\theta} \\frac{(z_i-z_{i-1})(1-|z|^2)}{(z_i \\overline{p}-1)(z_{i-1}\\overline{p}-1)}.$$\nThus \n$$A_iA_{i+1}=\\frac{t A_i A_{i-1}}{t_i t_{i-1}}$$\nwith $t=|1-|z|^2|$ and $t_i=|z_i\\overline{p}-1|$. Multiplying these relations yields \n$$t^{2n}=(t_1\\ldots t_{2n})^2,$$\nthus \n$$t^n=t_1\\ldots t_{2n}.$$\nThen \n$$\\prod_{i=1}^n \\frac{A_{2i-1}A_{2i}}{A_{2i}A_{2i+1}}=\\prod_{i=1}^n \\frac{t}{t_{2i-1}t_{2i}}=\\frac{t^n}{t_1\\ldots t_{2n}}=1,$$\nas desired.","subject":"geometry"}
{"id":"G42","problem":"Let $O,P$ be distinct points in the plane. Prove that there is a circle $\\Gamma$ with integer radius, center $O$ and three points $A,B,C$ on $\\Gamma$ such that $$\\vec{OP}=\\vec{OA}+\\vec{OB}+\\vec{OC}.$$","proof":"Let $d=OP$ and pick an integer $r$ large enough so that $P$ is in the interior of the circle $\\Gamma$ with center $O$ and radius $r$. Let $C$ be the intersection of the line $OP$ and $\\Gamma$, such that $P$ lies between $O$ and $C$. Choose points $A,B$ on $\\Gamma$ symmetrically positioned about the line $OP$ such that the angles \n$COA$ and $COB$ are equal to some angle $\\theta\\in [\\pi/2, 2\\pi/3)$. Then \n$$\\vec{OA}+\\vec{OB}=2R\\cos(\\theta) \\vec{OC}$$ and so the desired condition is equivalent to \n$$d=2r\\cos \\theta+r,$$ or $$\\cos\\theta=\\frac{d-r}{2r}.$$ Such $\\theta$ exists, since $$-1/2<\\frac{d-r}{2r}\\leq 0$$ by our choice of $r$.","subject":"geometry"}
{"id":"G43","problem":"A diameter of a finite planar set is any line segment of maximal Euclidean length having both end points in that set. Prove that a set of $n>1$ lattice points in the plane has at most $n-1$ diameters.","proof":"Let $S$ be the set of the points, $C$ be its convex hull, and $d$ be the value of the diameter. Assume there are at least $n$ diameters and consider a graph with vertices points of $S$, two vertices being adjacent if their distance is $d$. Since the number of edges is at least the number of vertices, there is a cycle, so there are $t\\geq 3$ and points $A_1, A_2, \\dots, A_t \\in S$ such that\n\\[ A_1A_2 = A_2A_3 = \\dots = A_{t-1}A_t = A_tA_1 = d. \\]\nIf $t=3$, then $A_1A_2A_3$ is an equilateral triangle with vertices lattice points, and this is well-known to be impossible. Thus $t>3$ and so \n$A_1A_3 < d \\implies \\angle A_1A_2A_3 < 60^{\\circ}$. Since $d = A_1A_2$ is the diameter, the other points must be on or inside the region $R$ bounded by three disks centered at $A_1$, $A_2$, and $A_3$ with radius $d$. The perpendicular bisector of $A_1A_3$ divides $R$ into two symmetrical convex regions $R_1$ and $R_2$. For $i \\ge 2$, $A_i$ and $A_{i + 1}$ are located on different regions, since the diameter of each region is exactly $d$, and it only happens when one of the endpoint is $A_2$, implying neither $A_i, A_{i+1} \\in R_1$ nor $\\in R_2$. Therefore, $t$ is odd.\nLet $(x_i, y_i)$ be the coordinates of $A_i$. Note that\n\\begin{align*}\nd^2 = (x_i - x_{i+1})^2 + (y_i - y_{i+1})^2 &= (x_{i+2} - x_{i+1})^2 + (y_{i+2} - y_{i+1})^2 \\\\\n\\implies x_i - x_{i+1} + y_i - y_{i+1} &\\equiv x_{i+2} -x_{i+1} + y_{i+2} - y_{i+1} \\pmod 2 \\\\\n\\implies x_i + y_i &\\equiv x_{i+2} + y_{i+2} \\pmod 2.\n\\end{align*} Call $(x_i + y_i) \\pmod 2$ the parity of $A_i$. Thus $A_i$ and $A_{i+2}$ have the same parity. Since $t$ is odd, all points must have the same parity $p$. If there is $i$ such that $x_i \\not\\equiv x_{i+1}$, then $y_i \\equiv p - x_i \\not\\equiv p-x_{i + 1} \\equiv y_{i +1}$ and both $x_i - x_{i + 1}$ and $y_i - y_{i + 1}$ are odd, so $d^2$ is equal to their sum of squares, which is congruent to $2 \\pmod 4$. But this means there is no $j$ such that $x_j \\equiv x_{j + 1} \\pmod 2$, since then $|A_jA_{j + 1}|^2$ is congruent to $0 \\pmod 4$. Therefore, the parity of $(x_i, y_i)$ alternates, but this is impossible for odd $t$. So, all of them must have equal parity, i.e. $x_i \\equiv x_j$ and $y_i \\equiv y_j \\pmod 2$.\n\nNow, map each $A_i$ from $(x_i, y_i) \\mapsto (\\lfloor x_i / 2 \\rfloor, \\lfloor y_i / 2 \\rfloor)$. They are all still lattice points, but the diameter $d$ is divided by $2$. Either there are two points with different parity, which implies a contradiction as in the previous paragraph, or they are all still having the same parity, in which we continue dividing the coordinates by $2$ and induct down. The process eventually stops since $d$ is always divided down by $2$, thus also proving that having an odd cycle is impossible.","subject":"geometry"}
{"id":"G44","problem":"Let $\\Delta_0$ be an equilateral triangle with incircle $\\omega$. A point on $\\omega$ is reflected in the sides of $\\Delta_0$ to obtain a new triangle $\\Delta_1$. The same point is then reflected over the sides of $\\Delta_1$ to obtain another triangle $\\Delta_2$. Prove that the circumcircle of $\\Delta_2$ is tangent to $\\omega$.","proof":"We will prove this when $P$ is any point in the plane of $\\Delta_0$ and show that the circumcircles of $\\Delta_0$ and $\\Delta_2$ are tangent in the Steiner point $Q$ of line $OP$.\n\nSay the vertices $A,B,C$ of $\\Delta_0$ have affixes $1,\\varepsilon,$ and $\\varepsilon^2$ and let $D,E,F$ be the vertices of $\\Delta_1$. Since $D$ is the symmetric of $P$ with respect to $BC$, we have $$d=\\frac{\\overline{p}(\\varepsilon - \\varepsilon^2)+\\overline{\\varepsilon}\\varepsilon^2 - \\varepsilon\\overline{\\varepsilon^2}}{\\overline{\\varepsilon}-\\overline{\\varepsilon^2}}=-\\overline{p}-1.$$ Iif a point $x$ is obtained from $p$ through a process involving side $BC$, say $x=f(p)$, the point obtained from $p$ by the same process but involving side $CA$ is $y=\\varepsilon f\\left(\\frac{p}{\\varepsilon}\\right)$. Thus $$\\begin{cases} d=-\\overline{p}-1\\\\ e=-\\varepsilon^2\\overline{p} - \\varepsilon\\\\ f=-\\varepsilon\\overline{p} - \\varepsilon^2\\end{cases}$$Let $X,Y,Z$ be the vertices of $\\Delta_2$. Since $X$ is the reflection of $P$ across $EF$, we have $$x=\\frac{\\overline{p}(e-f)+\\overline{e}f-e\\overline{f}}{\\overline{e}-\\overline{f}}=\\frac{p\\overline{p}-1-\\overline{p}(\\overline{p}+1)}{p-1}.$$ If $O_A$ is the reflection of $O$ across $BC$, one can find the $Q$ as the intersection of $DO_A$ with $(ABC)$, and we easily obtain $q=\\frac{\\overline{p}}{p}$.\n\nLet $X'$ be the second intersection of $QX$ with $(ABC)$. Via the intersection formula we have $$x'=\\frac{q-x}{q\\overline{x}-1}=\\frac{\\frac{\\overline{p}}{p}-\\frac{p\\overline{p}-1-\\overline{p}(\\overline{p}-1)}{p-1}}{\\frac{\\overline{p}}{p}\\cdot\\frac{p\\overline{p}-1-p(p-1)}{\\overline{p}-1}-1}=\\frac{\\overline{p}-1}{p-1}.$$ and similarly $$\\begin{cases} x'=\\frac{\\overline{p}-1}{p-1}\\\\ y'=\\frac{\\overline{p}-\\varepsilon^2}{p-\\varepsilon}\\\\ z'=\\frac{\\overline{p}-\\varepsilon}{p-\\varepsilon^2}\\end{cases}$$\nLet us prove that $\\triangle X'Y'Z'$ and $\\triangle XYZ$ are homothetic, with homothety center $Q$. But $$\\left|\\frac{x'-q}{x-q}\\right|=\\left|\\frac{\\frac{(p\\overline{p}-1)(\\overline{p}-p)}{p(p-1)}}{\\frac{\\overline{p}-1}{p-1}-\\frac{\\overline{p}}{p}}\\right|=|p\\overline{p}-1|$$ and we easily deduce that the expression $\\frac{QX}{QX'}$ is constant, finishing the proof.","subject":"geometry"}
{"id":"G45","problem":"In an acute-angled triangle $A_0A_1A_2$ with circumcenter $0$ the lines $OA_k$ and $A_{k+1}A_{k+2}$ meet at $B_k$ for $k=0,1,2$ (the indices are taken modulo $3$). The tangent to the circumcircle of $A_0A_1A_2$ at $A_k$ meets the line $B_{k+1}B_{k+2}$ at $C_k$. Prove that $C_0,C_1,C_2$ are collinear.","proof":"It suffices (by Menelaus' theorem) to prove that \n$$\\prod_{k=0}^2 \\frac{C_k B_{k+1}}{C_k B_{k+2}}=1.$$\nCeva's theorem gives \n$$\\prod_{k=0}^2 \\frac{A_k B_{k+1}}{A_k B_{k+2}}=1$$\nand so it suffices in fact to prove that for $k=0,1,2$ we have \n$$ \\frac{C_k B_{k+1}}{C_k B_{k+2}}=\\frac{A_k B_{k+1}}{A_k B_{k+2}}\\cdot \\frac{A_k A_{k+1}}{A_k A_{k+2}}.$$\nFor simplicity, assume that $A_kA_{k+1}\\leq A_k A_{k+2}$ (the other case being similar). Applying the law of sines in triangles $A_k B_{k+1} C_k$ and \n$A_k B_{k+2}C_k$ yields \n$$ \\frac{C_k B_{k+1}}{C_k B_{k+2}}=\\frac{A_k B_{k+1}}{A_k B_{k+2}}\\cdot \\frac{\\sin C_k A_k B_{k+1}}{\\sin C_k A_k B_{k+2}}.$$\nNote however that the angle $C_k A_k B_{k+1}$ is nothing but $\\pi$ minus the internal angle at $A_{k+1}$ in triangle $A_0A_1A_2$ and \nthe angle $C_k A_k B_{k+2}$ is the internal angle at $A_{k+2}$ in triangle $A_0A_1A_2$. Applying once again the law of sine yields \n$$ \\frac{\\sin C_k A_k B_{k+1}}{\\sin C_k A_k B_{k+2}}=\\frac{A_k A_{k+1}}{A_k A_{k+2}}$$\nand the claim above is proved, finishing the solution.","subject":"geometry"}
{"id":"G46","problem":"Prove that in any acute triangle $ABC$\n$$\\sum \\frac{\\cos A}{\\cos (B-C)}\\geq 1+\\frac{2}{3}\\sum \\cos^2 A.$$","proof":"Note that \n$$\\frac{\\cos A}{\\cos(B-C)}=-\\frac{\\cos(B+C)}{\\cos(B-C)}=\\frac{\\tan B\\tan C-1}{\\tan B\\tan C+1}.$$\nAlso $\\cos^2 A=\\frac{1}{1+\\tan^2 A}$, so letting $x=\\tan A, y=\\tan B, z=\\tan C$ we have \n$xyz=x+y+z$ and \nthe inequality becomes \n$$\\sum \\frac{xy-1}{xy+1}-1\\geq \\frac{2}{3}\\sum \\frac{1}{1+x^2}.$$\nNext set $\\frac{1}{yz}=a, \\frac{1}{zx}=b, \\frac{1}{xy}=c$, thus $a+b+c=1$ and $x^2=\\frac{a}{bc}$. Also note that $$\na+bc=a(a+b+c)+bc=(a+b)(a+c).$$ Thus the inequality becomes \n$$\\sum \\frac{1-a}{1+a}-1\\geq \\frac{2}{3}\\sum \\frac{bc}{(a+b)(a+c)},$$\nor equivalently \n$$3\\sum \\frac{a}{1+a}\\leq \\frac{\\sum bc(b+c)}{(1-a)(1-b)(1-c)}.$$\nLetting $q=ab+bc+ca$ and $r=abc$, we can rewrite this as \n$$\\frac{3(2q+3r+1)}{q+r+2}\\leq \\frac{2q}{q-r}.$$\nExpanding yields an equivalent inequality \n$$4q^2+q(r-1)\\leq 9r^2+3r.$$\nBut Schur's inequality yields $4q\\leq 9r+1$, thus it suffices to check that $10q\\leq 9r+3$. Using that \n$q\\leq \\frac{9r+1}{4}$, this reduces to $r\\leq 1/27$, which follows from the AM-GM inequality.","subject":"geometry"}
{"id":"G47","problem":"Let $A_1\\ldots A_n$ be a convex $n$-gon inscribed in a circle with radius $1$, such that the center of the circle lies inside the $n$-gon. What is the smallest possible value of $\\max (PA_1,\\ldots, PA_n)$, when $P$ is a variable point in the plane of the $n$-gon?","proof":"The answer is $1$, achieved when $P$ is the center $O$ of the circle. Suppose indeed that there is a point $P$ such that \n$$\\max (PA_1,\\ldots, PA_n)<1.$$\nLet $p$ be the vector $OP$ and let $a_k$ be the vector $OA_k$. Since $PA_k$ has length $<1$, we have \n$|p-a_k|^2<1$, which can be rewritten \n$$|p|^2-2p\\cdot a_k+|a_k|^2<1.$$\nBy assumption $|a_k|=1$, thus $$p\\cdot a_k>|p|^2/2$$\nand this happens for all $k$. \n\nOn the other hand, by assumption $O$ lies inside the $n$-gon, thus we can find $\\lambda_1,\\ldots, \\lambda_n\\in [0,1]$ such that \n$$\\sum_{i=1}^n \\lambda_i=1,\\,\\, \\sum_{i=1}^n \\lambda_i a_i=0.$$\nIt follows that \n$$0=\\sum_{i=1}^n \\lambda_i p\\cdot a_i\\geq \\sum_{i=1}^n \\lambda_i \\cdot \\frac{|p|^2}{2}=\\frac{|p|^2}{2}$$\nand so necessarily $p=0$, then $P=O$ and then the inequality $\\max PA_i<1$ is false. The contradiction just reached finishes the proof.","subject":"geometry"}
{"id":"G48","problem":"Let $M,N,P$ be points on the sides $BC,CA, AB$ of a triangle $ABC$, chosen in such a way that $MNP$ is an acute-angled triangle. Prove that the shortest altitude of $ABC$ has length at most twice the length of the longest altitude of $MNP$.","proof":"Let $H$ be the orthocenter of triangle $MNP$ and let $X$ be the length of the longest altitude of $MNP$. We start by proving that \n$$HM+HN+HP\\leq 2X.$$\nWe may assume that the angle at $M$ is the smallest and the angle at $P$ is the largest, therefore $NP\\leq PM\\leq MN$ and $X$ is the length of the altitude $MM'$ from \n$M$. The inequality is then equivalent to \n$$HN+HP\\leq HM+2HM'.$$\nLet $H'$ be the reflection of $H$ in the line $NP$, then $H'$ lies on the circumcircle of triangle $MNP$ and so the relation above is equivalent to \n$$H'N+H'P\\leq H'M.$$\nBut this follows from Ptolemy's theorem in the cyclic quadrilateral $H'MNP$:\n$$H'M\\cdot NP=H'N\\cdot MP+H'P\\cdot MN\\geq H'N\\cdot NP+H'P\\cdot NP.$$\n\nNext, let $h_a, h_b, h_c$ be the lengths of the altitudes from $A,B,C$ in triangle $ABC$. Let $A', B', C'$ be the projections of $H$ onto $BC, CA, AB$. Note that since \n$MNP$ is acute-angled, $H$ is inside triangle $MNP$, in particular inside triangle $ABC$. It follows that if $x$ is the length of the shortest altitude of $ABC$ then \n$$x\\leq HA'+HB'+HC'\\leq HM+HN+HP\\leq 2X,$$\nwhere the inequality $HA'+HB'+HC'\\geq x$ follows by observing that \n$$\\frac{HA'+HB'+HC'}{x}\\geq \\frac{HA'}{h_a}+\\frac{HB'}{h_b}+\\frac{HC'}{h_c}=\\frac{[BHC]}{[ABC]}+\\frac{[AHC]}{[ABC]}+\\frac{[BHA]}{[ABC]}=1,$$\nwhere $[T]$ is the area of triangle $T$.","subject":"geometry"}
{"id":"G49","problem":"The sum of lengths of finitely many segments in the plane is smaller than $\\sqrt{2}$. Prove that there is a unit square grid cover of the plane such that the lines defining the grid do not intersect any of the given segments.","proof":"Start with an arbitrary system of coordinates $xOy$ and let $\\theta_i$ be the angle between the $i$th segment $S_i$ and the $Ox$-axis. Let \n$\\ell_i$ be the length of $S_i$. Project the segments onto the \n$Ox$ and $Oy$ axes. The total length of the projections on the $Ox$-axis is $$p_x=\\sum_{i=1}^n \\ell_i |\\cos \\theta_i|,$$ and if we rotate the system $xOy$ by an angle \n$\\theta$ this sum becomes \n$$p_x(\\theta)=\\sum_{i=1}^n \\ell_i |\\cos (\\theta+\\theta_i)|.$$\nSimilarly, the total length of the projections on the $Oy$-axis is $$p_y=\\sum_{i=1}^n \\ell_i |\\sin \\theta_i|,$$\nand if we rotate the system $xOy$ by an angle \n$\\theta$ this sum becomes \n$$p_y(\\theta)=\\sum_{i=1}^n \\ell_i |\\sin (\\theta+\\theta_i)|.$$\nWe claim that we can find $\\theta\\in [0,\\pi/2]$ such that $p_x(\\theta)=p_y(\\theta)$. Indeed, it suffices to note that all these maps are continuous and that \n$$p_x(0)=p_y(\\pi/2),\\,\\, p_x(\\pi/2)=p_y(0),$$\nthus $p_x-p_y$ cannot be strictly positive or strictly negative on the whole interval $[0,\\pi/2]$. Now choose one such $\\theta$ and observe that then \n$$p_x(\\theta)=p_y(\\theta)=\\frac{p_x(\\theta)+p_y(\\theta)}{2}=\\sum_{i=1}^n \\ell_i \\frac{|\\cos (\\theta+\\theta_i)|+|\\sin (\\theta+\\theta_i)|}{2}\\leq$$\n$$\\sum_{i=1}^n \\ell_i \\cdot \\frac{\\sqrt{2}}{2}<\\sqrt{2}\\cdot \\frac{\\sqrt{2}}{2}=2.$$\nLet $x'Oy'$ be the system of coordinates obtained by rotating $xOy$ by $\\theta$. Since $p_x(\\theta)<1$ and $p_y(\\theta)<1$, there are \n$x_0\\in [0,1)$ and $y_0\\in [0,1)$ such that $\\{x\\}\\ne x_0$ and $\\{y\\}\\ne y_0$ for any point with coordinates $(x,y)$ lying on one of the segments $S_i$. But then the unit square grid with origin $(x_0, y_0)$ and with lines parallel to $Ox', Oy'$ has the required property.","subject":"geometry"}
{"id":"G50","problem":"The diagonals $AC$ and $BD$ of a cyclic quadrilateral $ABCD$ with \ncircumcenter $O_1$ meet at point $P$. If the four incenters of triangles $PAB, PBC, PCD, PDA$ lie on a circle with centre $O_2$, prove that $P, O_1, O_2$ are collinear.","proof":"Let $M_{AB}$, $M_{BC}$, $M_{CD}$, and $M_{DA}$ be the respective arc midpoints of $(ABCD)$ and let $I_a$, $I_b$, $I_c$, and $I_d$ be the incenters of triangles $ABD$, $BCA$, $CDB$, and $DAC$. We first prove that \n$I_a I_b I_c I_d $ is a rectangle. Since $ABI_aI_b$ is cyclic, we have $$\\angle I_bI_aI_1=\\angle I_1 M_{DA}M_{BC}$$ thus $I_aI_b\\parallel M_{BC} M_{DA}$. Similar statements on other sides combined with the fact that $M_{AB}M_{CD}\\perp M_{BC}M_{DA}$ yield the result.\n\nNext, we prove that \n$I_aI_bI_cI_d$ and $I_1I_2I_3I_4$ share a circumcircle, where $I_1,\\ldots, I_4$ are the incenters of $PAB,\\ldots, PDA$.\nLet $M_{AB}M_{CD}$ intersect $M_{BC}M_{DA}$ at $O_2'$. As $I_2$ and $I_4$ are reflections about $M_{AB}M_{CD}$ we have that $O_2'I_2=O_2'I_4$. Similarly, $O_2'I_1=O_2'I_3$ so $O_2'=O_2$. As $M_{AB}M_{CD}$ is perpendicular to $I_aI_b$ and $\\angle I_a M_{AB}M_{CD}=\\angle I_bM_{AB}M_{CD}$ we have that $M_{AB}M_{CD}$ bisects $I_aI_b$. Cyclic statements imply that $O_2$ is also the center of $I_1I_2I_3I_4$. Thus $(I_aI_bI_cI_d)$ and $(I_1I_2I_3I_4)$ are concentric so $(I_1I_2I_3I_4)$ either coincides with $(I_aI_bI_cI_d)$ or lies completely outside or inside of it. As $\\angle I_aI_1I_b+\\angle I_bI_2I_c=270^{\\circ}$, the two circumcircles coincide.\n\nFinally, we claim that $I_1I_2I_3I_4$ and $M_{AB}M_{BC}M_{CD}M_{DA}$ are homothetic.\nAs their diagonals are parallel, it suffices to show that they have parallel sides, which follows from $$\\angle I_2I_1I_b=\\angle I_2I_cI_b=\\angle I_2 M_{DC}M_{AB}=\\angle I_bM_{BC}M_{AB}.$$\n\n\nLet $H$ be the center of the homothety sending $I_1I_2I_3I_4$ to $M_{AB}M_{BC}M_{CD}M_{DA}$. Their circumcenters are also homothetic so $H$, $O_2$, and $O_1$ are collinear. Also the intersection points of their diagonals are homothetic so $H$, $P$, and $O_2$, are collinear. Thus, $P$, $O_1$, and $O_2$ are collinear.","subject":"geometry"}
{"id":"N1","problem":"Let $(a_n)_{n\\geq 1}$ be a sequence of positive integers such that $a_1=1$ and for any prime $p$ the set $\\{a_1,a_2,\\cdots,a_p\\}$ is a complete remainder system modulo $p$. Prove that $\\lim_{n\\rightarrow \\infty} \\cfrac{a_n}{n}=1$.","proof":"If $(p_n)_{n\\geq 1}$ is the increasing sequence of primes, the prime number theorem ensures that \n $\\lim_{n\\to\\infty} p_{n+1}/p_n=1$, thus it suffices to prove that $a_{p_n+1}, a_{p_n+2},..., a_{p_{n+1}}$ are a permutation of \n $p_{n}+1,...,p_{n+1}$ for all $n$ (this will imply that $p_n<a_k\\leq p_{n+1}$ for $p_n<k\\leq p_{n+1}$, and the result follows easily). We will prove this by induction. Since $a_1=1$ and $a_1,...,a_p$ are pairwise distinct modulo $p$, $p$ cannot divide $a_2-1$ for any prime $p$, thus $a_2-1=1$ and $a_2=2$. Similarly, $p$ cannot divide $a_3-1$ or $a_3-2$ for $p>2$, thus $a_3-1$ and \n $a_3-2$ are consecutive powers of $2$, which forces $a_3=3$. Suppose now that $a_{p_k+1},...,a_{p_{k+1}}$ is a permutation of \n $p_k+1,...,p_{k+1}$ for $k<n$. Then $a_1,...,a_{p_n}$ form a permutation of $1,...,p_n$. Since \n the various $a_n$'s are obviously pairwise distinct (in particular $a_k\\geq p_n+1$ for $k>p_n$), it suffices to prove that \n $a_k\\leq p_{n+1}$ for $k\\in (p_n, p_{n+1}]$. Fix such $k$ and suppose that $a_k>p_{n+1}$. If $i\\leq p_{n}$ then by assumption no prime $p\\geq p_{n+1}$ can divide $a_k-a_i$. Since $a_1,...,a_{p_n}$ are a permutation of $1,...,p_n$, it follows that each of the numbers $a_k-1,a_k-2,...,a_k-p_n$ has all of its prime factors among $p_1,...,p_n$. Recall that we assumed that $a_k>p_{n+1}$. If \n $a_k>p_n+p_{n+1}$, then $a_k\\geq 2p_n+1$ and Sylvester's theorem ensures that $\\binom{a_k-1}{p_n}$ has a prime factor greater than $p_n$, a contradiction with our previously established result. Thus $a_k\\leq p_n+p_{n+1}$, but then \n one of the numbers $a_k-1,a_k-2,...,a_k-p_n$ is divisible by $p_{n+1}$, a contradiction again. Thus $a_k\\leq p_{n+1}$ and we are done.","subject":"number theory"}
{"id":"N2","problem":"Prove that for any pairwise distinct positive integers $a_1,...,a_n$\n$$\\sum_{k=1}^n \\frac{1}{{\\rm lcm}(a_1,...,a_k)}<4.$$","proof":"Let $k>1$ and consider the number $n={\\rm lcm}(a_1,...,a_k)$. Since $a_1,...,a_k$ are pairwise distinct divisors of \n $n$, $n$ has at least $k$ positive divisors. On the other hand, $n$ has at most $2\\sqrt{n}$ positive divisors (use the pairing \n $(d, n/d)$ and note that in each such pair there is a number less than or equal to $\\sqrt{n}$). Thus $k\\leq 2\\sqrt{n}$ and \n $n\\geq k^2/4$. It follows that \n $$\\sum_{k=1}^n \\frac{1}{{\\rm lcm}(a_1,...,a_k)}\\leq 1+\\sum_{k=2}^n \\frac{4}{k^2}.$$\n It remains to observe that $\\frac{1}{k^2}<\\frac{1}{k-1}-\\frac{1}{k}$ for $k>2$.","subject":"number theory"}
{"id":"N3","problem":"Let $f(x)$ be a polynomial with positive integer coefficients. For every $n\\in\\mathbb{N}$, let $a_{1}^{(n)}, a_{2}^{(n)}, \\dots , a_{n}^{(n)}$ be fixed positive integers that give pairwise different residues modulo $n$ and let\n\\[g(n) = \\sum\\limits_{i=1}^{n} f(a_{i}^{(n)}) = f(a_{1}^{(n)}) + f(a_{2}^{(n)}) + \\dots + f(a_{n}^{(n)})\\]Prove that there exists a constant $M$ such that for all integers $m>M$ we have $\\gcd(m, g(m))>2023^{2023}$.","proof":"Note that since $f(x)\\equiv f(y)\\pmod n$ whenever $x\\equiv y\\pmod n$, the assumptions of the problem yield\n$$g(n)\\equiv \\sum_{i=1}^n f(i)\\pmod n,$$\nthus it suffices to prove that $\\gcd(n, f(1)+...+f(n))>c:=2023^{2023}$ for $n$ large enough. Let \n$d=\\deg(f)$. By a standard result for each $k\\geq 0$ there is a polynomial \n$P_k$ of degree $k+1$ with rational coefficients such that \n$$P_k(n)=1^k+2^k+...+n^k$$\nfor all $n\\geq 0$. Since $P_k(0)=0$, we can write $P_k(X)=XQ_k(X)$ for some polynomial $Q_k$ with rational coefficients. Let $f(X)=\\sum_{i=0}^d a_iX^i$, then \n$$f(1)+...+f(n)=\\sum_{i=0}^d a_i (1^i+2^i+...+n^i)=\\sum_{i=0}^d a_i P_i (n)=n Q(n),$$\nwhere $Q=\\sum_{i=0}^d a_i Q_i$. Choose a positive integer $t$ such that \n$tQ$ has integer coefficients. Then $t(f(1)+...+f(n))$ is a multiple of $n$, hence \n$\\gcd(f(1)+...+f(n), n)\\geq n/t$, thus $\\gcd(f(1)+...+f(n), n)$ tends to infinity as $n\\to\\infty$.","subject":"number theory"}
{"id":"N4","problem":"For an integer $n>1$, let $f(n)$ be the smallest positive integer $m$ such that the positive divisors of \n$n$ are pairwise distinct modulo $m$. Prove that for all sufficiently large $n$ we have $f(n)\\leq n^{0.01}$.","proof":"Let $d(n)$ be the number of positive divisors of $n$. As is well-known, there is a constant $c>0$ such that\n$d(n)\\leq cn^{1/500}$ for all $n$. Let $n>1$ and let $d_1,...,d_k$ be the positive divisors of $n$ (thus $k=d(n)$). Given \n$i\\ne j$, there are exactly $d(|d_j-d_i|)$ positive integers $m$ for which $d_i$ and $d_j$ are not distinct modulo $m$, namely the positive divisors of $|d_j-d_i|$. Thus the total number of $m$'s for which some two positive divisors of $n$ are congruent modulo $m$ is bounded above by $$\\sum_{1\\leq i<j\\leq k} d(|d_i-d_j|)\\leq c\\sum_{1\\leq i<j\\leq k} |d_i-d_j|^{1/500}<ck^2 n^{1/500}\\leq \nc^3 n^{3/500}.$$\nThe last expression being smaller than $n^{0.01}$ for $n$ large enough, we are done.","subject":"number theory"}
{"id":"N5","problem":"Let $p>3$ be a prime and for each $k\\in \\{1,2,...,p-1\\}$ let \n$I(k)$ be the unique integer in $\\{1,...,p-1\\}$ such that $kI(k)\\equiv 1\\pmod p$. Prove that there are more than \n$p/4-1$ integers $k\\in \\{1,...,p-2\\}$ such that $I(k+1)<I(k)$.","proof":"Let $f(p)$ be the number of such integers $k$. We will prove that \n $$f(p)=\\frac{p-1}{2}-2\\cdot 1_{p\\equiv 1\\pmod 3}-1_{p\\equiv 1\\pmod 4},$$\n which easily yields the desired result (the small cases $p=5,7$ can be done by hand). This will require several tricky observations. \n \n First, the identity $1/(k+1)+1/(1+1/k)=1$ in $\\mathbb{F}_p$ shows that for $1\\leq k\\leq p-2$ we have \n $$I(1+I(k))+I(k+1)=p+1.$$\n Indeed, a priori we only have that the two sides are congruent modulo $p$, but the left-hand side is between $2$ and \n $2p-2$, so it can only be $p+1$. \nSince clearly $I(k)\\ne I(k+1)$, $f(k)$ is also the number of $k$'s with $I(k+1)<I(k)+1$, or equivalently \n$I(1+I(k))+1+I(k)>p+1$, and this is also the number of $n\\in \\{1,...,p-1\\}$ for which $n+I(n)>p+1$, as one easily sees by making the substitution \n$n=1+I(k)$ (note that we can exclude $n=1$ from the discussion). \n\nNext, since $I(p-n)=p-I(n)$, we have $p-n+I(p-n)=2p-(n+I(n))$, so among $n$ and $n-p$ exactly one satisfies $x+I(x)>p+1$, unless \n$n+I(n)$ is one of $p-1,p,p+1$. Thus $f(p)=\\frac{p-1}{2}-u/2$, where $u$ is the number of $1\\leq n\\leq p-1$ such that \n$n+I(n)\\in \\{p-1,p, p+1\\}$. We have $n+I(n)=p$ if and only if $p\\mid n^2+1$, and there are two solutions for $p\\equiv 1\\pmod 4$ and zero otherwise. Similarly, $n+I(n)=p\\pm 1$ is equivalent to $n^2\\pm n+1\\equiv 0\\pmod p$, and this has two solutions for \n$p\\equiv 1\\pmod 3$ and zero otherwise. The result follows.","subject":"number theory"}
{"id":"N6","problem":"Find all infinite sequences $a_1,a_2,...$ of positive integers such that for all positive integers \n$m\\leq n$ the arithmetic and the geometric mean of $a_m,a_{m+1},...,a_n$ are both integers.","proof":"Clearly the constant sequences are solutions, and we will prove that they are the only solutions.\nCall a sequence $a_1,a_2,...$ nice if the arithmetic mean of $a_m,...,a_n$ is an integer for all $m\\leq n$. In particular \n$n-m$ must divide both $a_m+...+a_{n-1}$ and $a_{m+1}+...+a_n$, thus $n-m\\mid a_n-a_m$ for all $n\\ne m$. \nNow let $(a_n)$ be a solution of the problem. Let $p$ be a prime. Note that both $(a_n)$ and $(b_n:=v_p(a_n))$ are nice sequences (the second one thanks to the hypothesis on geometric means). Let $k=v_p(a_1)$. Since $(a_n)$ is nice, by the above discussion we have $a_{np^{k+1}+1}\\equiv a_1\\pmod {p^{k+1}}$ for all $n$, thus \n$b_{np^{k+1}+1}=v_p(a_{np^{k+1}+1})=k$ for all $n$. If $m$ is a positive integer we have \n$m-(np^{k+1}+1)\\mid b_m-k$ for all $n$, thus $b_m=k$. Thus the sequence $(b_n)$ is constant. Since this holds for any prime $p$, it immediately follows that $(a_n)$ is constant as well.","subject":"number theory"}
{"id":"N7","problem":"Let $(a_n)_{n\\geq 1}$ be an increasing sequence of pairwise relatively prime positive integers and let \n $(b_n)_{n\\geq 1}$ be a sequence of pairwise distinct positive integers. If for any $n\\geq 0$ the number \n $\\sum_{i=1}^n 1/b_i$ is an integer multiple of the number $\\sum_{i=1}^n 1/a_i$, prove that \n $a_n=b_n$ for all $n$.","proof":"Let $x_n$ be a positive integer such that \n $$\\sum_{i=1}^n 1/b_i=x_n\\cdot \\sum_{i=1}^n 1/a_i$$\n for all $n$. Note that by comparing the relations for $n$ and $n+1$ we obtain\n $$\\frac{1}{b_{n+1}}=\\frac{x_{n+1}}{a_{n+1}}+(x_{n+1}-x_n)\\sum_{i=1}^n \\frac{1}{a_i}.$$\n Since the $b_n$'s are pairwise distinct, there is $N$ such that $b_n>a_1$ for $n>N$. For \n $n>N$ we then have $\\frac{1}{b_{n+1}}<\\sum_{i=1}^n \\frac{1}{a_i}$, and the above relation shows that we must have \n $x_{n+1}-x_n\\leq 0$. Thus the sequence $(x_n)_{n>N}$ is non-increasing and since it consists of positive integers, it must become eventually constant, say equal to some constant $k$. But the above relation then shows that $a_{n+1}=kb_{n+1}$ for $n$ large enough, and since \n the $a_n$'s are pairwise relatively prime, this forces $k=1$. Thus there is $N$ such that $a_n=b_n$ and $x_n=1$ for $n>N$. Suppose that $N>0$, we will prove that $a_n=b_n$ and $x_n=1$ for $n>N-1$, and by induction this will show that $a_n=b_n$ for all $n$. Since \n $a_{N+1}=b_{N+1}$ and $x_{N+1}=1$, we must have \n $$(1-x_N)\\sum_{i=1}^N 1/a_i=0,$$\n thus $x_N=1$. Therefore \n $$\\frac{1}{b_N}=\\frac{1}{a_N}+(1-x_{N-1})\\sum_{i=1}^{N-1} \\frac{1}{a_i}.$$\n If $x_{N-1}\\geq 2$ then the right-hand side is negative (since $(a_n)$ is increasing), a contradiction. Thus \n $x_{N-1}=1$ and then $a_N=b_N$, as desired.","subject":"number theory"}
{"id":"N8","problem":"Let $a_1,a_2,a_3, \\ldots$ be a sequence of positive integers and let $b_1,b_2,b_3,\\ldots$ be the sequence of real numbers given by\n$$b_n = \\dfrac{a_1a_2\\cdots a_n}{a_1+a_2+\\cdots + a_n},\\ \\mbox{for}\\ n\\geq 1$$Show that, if there exists at least one term among every million consecutive terms of the sequence $b_1,b_2,b_3,\\ldots$ that is an integer, then there exists some $k$ such that $b_k > 2021^{2021}$.","proof":"We argue by contradiction and assume that $b_k\\leq 2021^{2021}$ for all $k$. Let\n$c=2021^{2021}$. Note that if $x_1,...,x_d\\geq 2$ and $z\\geq 0$ then \n$$\\frac{x_1...x_d}{x_1+...+x_d+z}\\geq \\frac{2x_1...x_{d-1}}{x_1+...+x_{d-1}+z+2}\\geq \\frac{2^2 x_1...x_{d-2}}{x_1+...+x_{d-2}+z+4}\\geq...\\geq \\frac{2^d}{z+2d}.$$\nThus if among $a_1,...,a_n$ there are $d$ numbers greater than $1$ we have \n$$b_n\\geq \\frac{2^d}{n+d}.$$\n Now let $C=(c+1)10^6$. We claim that among any $C$ consecutive terms of the sequence $(a_n)$ there is at least one term greater than $1$. Indeed, suppose that $a_{n+1}=...=a_{n+C}=1$ for some $n$. It is then clear than $b_{n+1}>...>b_{n+C}$. On the other hand, we can split $b_{n+1},...,b_{n+C}$ into $c+1$ intervals of $10^6$ consecutive terms, and in each interval there is at least one integer smaller than or equal to $c$, by assumption. Thus we obtain a decreasing sequence of positive integers, each being at most $c$ and whose length is $c+1$. This is clearly impossible. \n Now we are done: by the above claim for any $n$ the number $d_n$ of $a_i$'s greater than $1$ among \n $a_1,...,a_{Cn}$ is at least $n$, and by the first observation in the solution we obtain \n $$b_{Cn}\\geq \\frac{2^{d_n}}{Cn+d_n},$$\n showing that $b_{Cn}$ tends to infinity as $n\\to\\infty$, a contradiction.","subject":"number theory"}
{"id":"N9","problem":"Find the largest real number $m$ such that $m\\leq x/y$ for all positive integers \n $x,y,z,u$ satisfying $x\\geq y$, $x+y=z+u$ and $2xy=zu$.","proof":"We have \n $$(x+y)^2-8xy=(z+u)^2-4zu=(z-u)^2\\geq 0,$$\n yielding $x/y\\geq 3+2\\sqrt{2}$ for any solution $(x,y,z,u)$ as in the statement of the problem. \nWe will construct now solutions for which $x/y$ becomes arbitrarily close to $3+2\\sqrt{2}$. For this it suffices to ensure that \n$\\frac{z-u}{y}$ becomes arbitrarily close to $0$, and the easiest way is to ask that $z-u=1$ and $y$ is arbitrarily large. Note that \nfor any solution of the system we should have $(x-y)^2=z^2+u^2$, so $z^2+u^2$ should be a perfect square. But the theory of Pell's equation ensures that the equation $m^2-n^2-1=2mn$ has infinitely many solutions in positive integers. Setting \n$$x=m^2+mn, \\,\\, y=mn-n^2,\\,\\, z=m^2-n^2,\\,\\, u=2mn$$\nachieves our goals.","subject":"number theory"}
{"id":"N10","problem":"Prove that there exists a real number $\\varepsilon>0$ such that there are infinitely many sequences of integers $0<a_1<a_2<\\hdots<a_{2025}$ satisfying\n\\[\\gcd(a_1^2+1, a_2^2+1,\\hdots, a_{2025}^2+1) > a_{2025}^{1+\\varepsilon}.\\]","proof":"For each $12$-tuple $\\varepsilon=(\\varepsilon_1,...,\\varepsilon_{12})\\in \\{-1,1\\}^{12}$ consider the system of polynomial congruences in $\\mathbb{Q}[X]$: $f(x)\\equiv \\varepsilon_i ix \\pmod {i^2x^2+1}$ for $1\\leq i\\leq 12$. By the Chinese Remainder theorem this system has a unique solution of degree at most $23$, call it \n $f_{\\varepsilon}$. Note that $f_{-\\varepsilon}=-f_{\\varepsilon}$ (by uniqueness), so $2^{11}=2048$ of the polynomials $f_{\\varepsilon}$ have positive leading coefficient, call them $f_1,...,f_{2048}$. Note that again by uniqueness $f_{\\varepsilon}$ is an odd polynomial, in particular its constant term is $0$. Hence there is a positive integer $N$ such that all polynomials $g_i(X)=f_i(NX)$ have positive leading coefficient and integer coefficients. By construction there are polynomials $Q_i$ with rational coefficients such that $$f_i(x)^2+1=Q_i(x)\\cdot \n \\prod_{i=1}^{12} (1+i^2x^2),$$\n and $Q_i(0)=1$. Thus by replacing $N$ by a multiple of it, we may assume that $Q_i(NX)$ also have integer coefficients. \n \n For each large enough integer $x$ let $a_1(x),...,a_{2025}(x)$ be the numbers \n $g_1(x),..., g_{2025}(x)$ written in increasing order (note that since the $f_i$ are pairwise distinct the numbers \n $g_i(x)$ are pairwise distinct for large enough $x$, so this makes sense). \n Since \n $a_i^2+1$ is divisible by $\\prod_{i=1}^{12} (1+i^2N^2x^2)$, we have \n $$\\gcd(a_1^2+1,...,a_{2025}^2+1)>x^{24}.$$\n On the other hand, since $f_{i}$ has degree at most $23$, $a_{2025}\\leq cx^{23}$ for some absolute constant \n $c$. Thus by taking $x$ sufficiently large, we can choose $\\varepsilon=0.04$.","subject":"number theory"}
{"id":"N11","problem":"Let $P$ be a non-constant polynomial with integer coefficients such that $P(0) \\neq 0$. Prove that the only infinite sequences \n$a_1,a_2,...$ of integers such that $P(i-j)\\mid a_i-a_j$ for all distinct positive integers $i,j$ are the constant sequences.","proof":"Thanks to Schur's theorem, there are infinitely many primes $p$ dividing some value of $P$, in particular we can such such \n$p$ that does not divide $P(0)$. Pick $k$ such that $p\\mid P(k)$, so that $p\\mid P(k+p)$ and $p$ does not divide $k$. Then \n$p\\mid a_{n+p+k}-a_n$ and $p\\mid a_{n+k}-a_n$ for all $n$. Thus the sequence $(a_n\\pmod p)$ is both $k$-periodic and \n$p+k$-periodic. Since $k$ and $p+k$ are relatively prime, the sequence $(a_n\\pmod p)$ must be constant. In particular if we fix two positive integers \n$m\\ne n$, then for all primes $p$ as above $p\\mid a_m-a_n$. Since there are infinitely many such \n$p$'s, we must have $a_m=a_n$ and the sequence $(a_n)$ is constant.","subject":"number theory"}
{"id":"N12","problem":"Let $N$ be the set of those positive integers $n$ for which $n\\mid k^k-1$ implies $n\\mid k-1$ for every positive integer $k$. Prove that if $n_1,n_2\\in N$, then their greatest common divisor is also in $N$.","proof":"We will prove that $N$ is precisely the set of positive integers $n$ such that for all primes $p,q$ with \n $q\\mid n$ and $p\\mid q-1$ we have $p\\mid n$. Using this description it is immediate to show that \n $N$ is stable under taking gcd. \n \n Suppose that $n\\notin N$ and let us prove that there are primes $p,q$ with $q\\mid n$ and $p\\mid q-1$ and \n $p$ does not divide $n$. By definition there is a positive integer $k$ such that $n\\nmid k-1$ and\n $n\\mid k^k-1$. The order $o$ of $k$ modulo $n$ is then different from $1$ and divides \n $k$ and $\\varphi(n)$, thus there is a prime divisor $p$ of $\\varphi(n)$ which divides $k$, in particular it does not divide $n$. It is clear that $p\\mid q-1$ for some prime divisor $q$ of $n$, so we are done.\n \n Suppose now that there are primes $p,q$ with $q\\mid n$, $p\\mid q-1$ and $p$ does not divide $n$. We will prove the existence of a positive integer $k$ such that $n\\mid k^k-1$ and $n\\nmid k-1$, finishing the proof.\n Note that $q>2$. Let $e=v_q(n)\\geq 1$ and let $g$ be a primitive root modulo $q^e$. We will choose \n $k$ such that $k\\equiv g^{q^{e-1}(q-1)/p}\\pmod {q^e}$, $k\\equiv 0\\pmod p$ and $k\\equiv 1\\pmod r$ for any prime power $r$ dividing $n$ and different from $q^e$. This is possible thanks to the Chinese remainder theorem and the assumption that $p\\nmid n$. It is clear that $k^k\\equiv 1\\pmod n$ and $k\\nmid 1\\pmod n$ (since this is not true modulo $q^e$), so we are done.","subject":"number theory"}
{"id":"N13","problem":"Let $P$ be a non-constant monic polynomial with integer coefficients and let $a_1, a_2, \\ldots$ be an infinite sequence of positive integers. Prove that there are infinitely many primes, each of which divides at least one term of the sequence $P(n)^{a_n} + 1$.","proof":"Suppose that there are only finitely many such primes, say $p_1<...<p_m$.\nWrite $a_n=c_n d_n$ with $c_n$ a power of $2$ and $d_n$ odd. Then $P(n)^{c_n}+1\\mid P(n)^{a_n}+1$, thus \nall prime factors of all $P(n)^{c_n}+1$ are also among $p_1,...,p_m$. Take $n$ large enough such that $P(n)>2$ and let \n$q$ be a prime factor of $P(n)^{c_n}+1$. Since $c_n$ is a power of $2$, a standard argument based on the order of \n$P(n)$ modulo $q$ shows that $c_n\\mid q-1$. Since $q\\leq p_m$, it follows that the sequence $(c_n)$ is bounded. Therefore we may assume from the very beginning that $(a_n)$ is bounded: if we can solve the problem in this case it suffices to apply the result to the sequence $(c_n)$ and use the fact that $P(n)^{c_n}+1\\mid P(n)^{a_n}+1$. \n\n Fix some large integer $N$ and consider those $n\\in [N/2,N]$. For each such $n$ the number \n $f(n):=P(n)^{a_n}+1$ is a positive integer such that $f(n)\\leq P(N)^{x_k}+1$ (provided $N$ is large enough). Among these values there are at least $N/4k$ pairwise distinct ones: by the pigeonhole principle at least $N/4k$ of the $a_n$'s are equal to some $x_i$ and $P$ is increasing on $[N/2, N]$ (again, provided $N$ is large enough). Thus we found at least $N/4k$ positive integers bounded by $P(N)^{x_k}+1$, all of whose prime factors are among $p_1,...,p_m$. But it is easy to see that there is a constant $c$ such that for all $x$ large enough there are at most $c (\\log x)^m$ integers smaller than $x$ all of whose prime factors are among $p_1,...,p_m$. Thus $$N/4k\\leq c(\\log (1+P(N)^{x_k}))^m$$ for $N$ large enough, which is obviously impossible.","subject":"number theory"}
{"id":"N14","problem":"Is it possible to find $p,q,r\\in\\mathbb Q$ such that $p+q+r=0$ and $pqr=1$?","proof":"Assume that this is possible, so that $pq(p+q)=-1$. Let $a,b,c$ be integers such that $p=a/c$ and $q=b/c$, so that \n$ab(a+b)=-c^3$. Dividing $a,b,c$ by their gcd we may assume that $\\gcd(a,b,c)=1$. Also note that by symmetry we may assume that \n$p,q$ have the same sign, so we may also assume that $a,b$ are positive. If $p$ is a prime number dividing both $a$ and \n$b$ then $p$ must divide $c^3$, so $p$ must divide $c$, a contradiction. Thus $\\gcd(a,b)=1$ and so $a,b,a+b$ are pairwise relatively prime positive integers, whose product is a cube. Thus each of them is a perfect cube, which produces a non-trivial solution to the equation \n$x^3+y^3=z^3$. This contradicts Fermat's theorem.","subject":"number theory"}
{"id":"N15","problem":"Prove that there exists $c>0$ such that for any odd prime $p=2k+1$, the numbers $1^0, 2^1,3^2,\\dots,k^{k-1}$ give at least $c\\sqrt{p}$ distinct remainders modulo $p$.","proof":"We may assume that $p>7$. Let $N$ be the number of different remainders and let $$x_i=\\frac{(2i)^{2i-1}}{(i^{i-1})^2}=i\\cdot 2^{2i-1}$$\nfor $1\\leq i\\leq t:=\\lfloor p/4\\rfloor$. Let $r_1,...,r_d$ be the remainders mod $p$ of $x_1,...,x_t$, then clearly \n$d\\leq N^2$. Let $n_j$ be the number of $x_i$'s congruent to $r_j$ modulo $p$, for $1\\leq j\\leq d$, so that \n$n_1+...+n_d=t$. Let us double count pairs $(i,j)$ with $i\\ne j$ and $x_i\\equiv x_j\\pmod p$. For each \n$u\\in \\{1,...,d\\}$ the number of pairs with $x_i\\equiv x_j\\equiv r_u\\pmod p$ is $n_u(n_u-1)$, so the number of pairs is $$\\sum_{u=1}^d n_u(n_u-1)\\geq \\frac{t^2}{d}-t,$$\nthe inequality being a consequence of Cauchy-Schwarz and the fact that $n_1+...+n_d=t$. On the other hand, \nthe congruence $x_i\\equiv x_j\\pmod p$ is equivalent to $4^{i-j}\\equiv ji^{-1}\\pmod p$, and for any \n$s\\in \\{1,...,t-1\\}$ there is at most one pair with $i-j=s$ and at most one with $j-i=s$, so there are at most $2(t-1)$ pairs. It follows that \n$$\\frac{t^2}{d}-t\\leq 2(t-1),$$\nthus $d>t\\geq p/8$. Since $N^2\\geq d$, we are done.","subject":"number theory"}
{"id":"N16","problem":"Let $p2$ be an odd prime. For $i\\in \\{0,1,..,p-1\\}$ call $f=a_0+a_1X+...+a_nX^n\\in \\mathbf{Z}[X]$ $i$-remainder if $$\\sum_{j>0, p-1\\mid j} a_j\\equiv i\\pmod p.$$ Prove that $f, f^2,..., f^{p-2}$ are $0$-remainder and $f^{p-1}$ is $1$-remainder if and only if $f(0), f(1),..., f(p-1)$ give pairwise distinct remainders modulo $p$.","proof":"For any polynomial\n$f=a_0+a_1X+...+a_nX^n\\in \\mathbf{Z}[X]$\nwe have \n\\begin{align*}\nf(0)+f(1)+...+f(p-1)\n& =\\sum_{j=0}^n a_j (0^j+1^j+...+(p-1)^j)\\\\\n& \\equiv -\\sum_{j>0, p-1\\mid j} a_j\\pmod p,\n\\end{align*}\nhence $f$ is $i$-remainder if and only if\n$$f(0)+f(1)+...+f(p-1)\\equiv -i\\pmod p.$$\n\nSuppose first that $f(0), f(1),...,f(p-1)$ form a complete residue system modulo $p$.\nWe need to prove that $f(0)^j+...+f(p-1)^j\\equiv 0\\pmod p$ for $1\\leq j\\leq p-2$ and\n$f(0)^{p-1}+...+f(p-1)^{p-1}\\equiv -1\\pmod p$, which follows from $$f(0)^j+f(1)^j+...+f(p-1)^j\\equiv 0^j+1^j+...+(p-1)^j\\pmod p.$$\n\n\nConversely, assume that $f, f^2,...,f^{p-2}$ are $0$-remainder and $f^{p-1}$ is $1$-remainder and let\n$a_j=f(j)$. By assumption $$a_0^j+...+a_{p-1}^j\\equiv 0\\pmod p$$ for $1\\leq j\\leq p-2$ and\n$$a_0^{p-1}+...+a_{p-1}^{p-1}\\equiv -1\\pmod p.$$ This last congruence combined with Fermat's little theorem shows that\nexactly one of $a_0,...,a_{p-1}$ is a multiple of $p$. Similarly,\nif $c$ is any integer then\n\\begin{align*}\n\\sum_{k=0}^{p-1} (a_k-c)^{p-1}\n& =\\sum_{k=0}^{p-1} a_k^{p-1}-\\binom{p-1}{1}c\n\\sum_{k=0}^{p-1} a_k^{p-2}+...+p(-c)^{p-1}\\\\\n& \\equiv -1\\pmod p\n\\end{align*}\nand so exactly one of $a_0-c,..., a_{p-1}-c$ is a multiple of $p$. This is equivalent to the fact that $a_0,...,a_{p-1}$\nforms a complete residue system modulo $p$.","subject":"number theory"}
{"id":"N17","problem":"The greatest common divisor of a set $D$ of positive integers is $1$. Prove the existence of a bijection $f: \\mathbf{Z}\\to \\mathbf{Z}$ such that $|f(n)-f(n-1)|\\in D$ for all integers $n$.","proof":"We reduce first the problem to the case when $D$ is finite: if $D$ is infinite, arrange its elements in increasing order $a_1<a_2<...$\nand let $x_n=\\gcd(a_1,...,a_n)$. Since $x_n\\geq x_{n+1}$, the sequence $(x_n)_{n\\geq 1}$ is eventually constant and this constant divides all elements of $D$, so it must be $1$. In other words, $D$ contains a finite subset whose gcd is $1$.\n\nFrom now on $D$ will be finite. We prove by induction on $|D|$ that there is a bijection $f: \\mathbf{Z}\\to \\gcd(D)\\cdot \\mathbf{Z}$ such that\n$|f(n)-f(n-1)|\\in D$ for all $n$. If $D=\\{d\\}$, simply set\n$f(n)=nd$. Assume now that the result holds for all finite sets of cardinality smaller than\n$k$ and consider $D$ of cardinality $k$. Fix some element\n$b\\in D$ and consider $D'=D\\setminus \\{b\\}$. Let $d=\\gcd(D)$, $d'=\\gcd(D')$ and\n$k=\\frac{d'}{d}$.\nApplying the inductive hypothesis to\n$D'$, we find a bijection $g: \\mathbf{Z}\\to d'\\mathbf{Z}$ such that\n$|g(n)-g(n-1)|\\in D'$ for all integers $n$. \nPick any integer $n$ and write $n=qk+r$ with\n$0\\leq r<k$. Define $$f(n)=g(q)+br$$ if $q$ is even and $$f(n)=g(q)+b(k-1-r)$$ if $q$ is odd.\nIt is not difficult to check that any multiple of $d$ can be uniquely written\n$d'u+br$ with $u\\in\\mathbf{Z}$ and $0\\leq r<k$ (note that\n$d=\\gcd(d',b)$). This implies that \n$f$ is bijective. We have \n$|f(n)-f(n-1)|\\in D$ for all $n$: if $k$ does not divide $n$, then by construction\n$$|f(n)-f(n-1)|=b\\in D,$$ and if $n=kx$ is a multiple of $k$ then again by construction\n$$|f(n)-g(n-1)|=|g(x)-g(x-1)|\\in D'\\subset D.$$ This proves the inductive step.","subject":"number theory"}
{"id":"N18","problem":"Find all functions $f: \\mathbf{N}\\to \\mathbf{Z}$ such that $(m-n)(f(m)-f(n))$ is a perfect square for all $m,n$.","proof":"Any function $f$ of the form $f(x)=a^2x+b$ with $a,b$ integers is a solution of the problem, and these are the only ones, as we will prove. \nLet $f$ be a non constant solution. As \n$f(n+1)-f(n)$ is a perfect square for all $n$, there is a positive integer $a$ with\n$$\\gcd(f(2)-f(1), f(3)-f(2),...)=a^2.$$ Then $a^2$ divides $f(n)-f(1)$ for all $n$\nand $g(x)=\\frac{f(x)-f(1)}{a^2}$ is such that $(m-n)(g(m)-g(n))$ is a perfect square for all\n$m,n$ and $$\\gcd(g(2)-g(1), g(3)-g(2),...)=1.$$ Thus replacing $f$ with $g$, we may assume that\n$\\gcd(f(2)-f(1), f(3)-f(2),...)=1$. We will prove that $f(n+1)-f(n)=1$ for all $n$, which will finish the proof.\n\nSuppose that there is $n$ such that $f(n+1)-f(n)$ is a perfect square greater than $1$, and fix a prime factor\n$p$ of $f(n+1)-f(n)$. Let $r$ be the remainder of $f(n)$ when divided by $p$ and let\n$$S=\\{x\\in \\mathbf{F}_p|\\, f(x)\\equiv r\\pmod p\\}.$$\nWe have $n,n+1\\in S$.\nLet $x$ be the smallest quadratic non-residue in $\\{2,3,...,p-1\\}$, so that $x-1$ is a quadratic residue mod $p$. If\n$a,b\\in S$, we claim that $(1-x)a+xb=a+x(b-a)\\in S$. This is clear if\n$a=b$, so assume that $a\\ne b$ and let $m=a+x(b-a)$. We need to prove that\n$f(m)\\equiv f(a)\\pmod p$. Indeed, otherwise $c:=(b-a)(f(m)-f(a))$ is nonzero mod $p$\nand $xc$ and $(x-1)(b-a)(f(m)-f(b))$ are\nperfect squares and in particular quadratic residues mod $p$ (since \n$(m-a)(f(m)-f(a))$ and\n$(m-b)(f(m)-f(b))$ are perfect squares); however $(b-a)(f(m)-f(b))\\equiv c\\pmod p$\n(as\n$f(a)\\equiv f(b)\\equiv \\pmod p$), thus $xc$ and $(x-1)c$\nare quadratic residues mod $p$, while $x$ is a quadratic non-residue and\n$x-1$ is a quadratic residue, a contradiction.\n\nNow let $T=\\{s-n| s\\in S\\}$, thus $0,1\\in T$ (since $n,n+1\\in S$) and, thanks to the previous paragraph,\n$xa+(1-x)b\\in T$ whenever $a,b\\in T$. In particular $xT\\subset T$ and $(1-x)T\\subset T$.\nWe deduce that for all $a\\in T$ we have\n$$a+1\\equiv x\\cdot x^{p-2}a+(1-x)\\cdot (1-x)^{p-2}\\cdot 1\\in T,$$\nand since $0\\in T$, it immediately follows that $T$ contains all residue classes and therefore\n$S$ contains all residue classes.\nWe deduce that $p\\mid f(n)-r$ for all $n$, thus\n$p\\mid f(n+1)-f(n)$ for all $n$, a contradiction with\n$$\\gcd(f(2)-f(1), f(3)-f(2),...)=1.\n\\eqno\\square $$","subject":"number theory"}
{"id":"N19","problem":"A function is called special if it is of the form $x\\mapsto a^{f(x)}$ with $a$ a positive integer and $f\\in \\mathbb{Z}[X]$ satisfying $f(n)>0$ for positive integers $n$. Let $P\\in \\mathbf{Z}[X]$ be nonconstant and let $f$ be a nonzero function which is a sum of products of special functions. Prove that there is a positive integer $n$ such that $P(n)$ does not divide $f(n)$.","proof":"Write $$f(x)=\\sum_{i=1}^M \\prod_{j=1}^{k_i} a_{ij}^{f_{i,j}(x)}$$ \nwith $a_{i,j}$ positive integers, $k_i\\geq 1$ and $f_{i,j}\\in \\mathbb{Z}[X]$ taking positive values at positive integers. Suppose that \n$P(n)\\mid f(n)$ for all $n$. By Schur's theorem there are infinitely many primes $p>\\max a_{ij}$ for which \n$p\\mid P(n)$ for some $n$. Pick a positive integer $c$ with $f(c)\\ne 0$ and fix such a prime $p$ and some positive integer $k$ such that \n$p\\mid P(k)$. By the Chinese remainder theorem\nthere is a positive integer $n$ such that $n\\equiv k\\pmod p$ and $n\\equiv c\\pmod {p-1}$. By assumption $p\\mid f(n)$. But $f_{i,j}(n)\\equiv f_{i,j}(c)\\pmod {p-1}$, so by Fermat's little theorem $f(n)\\equiv f(c)\\pmod p$. Thus $p\\mid f(c)$. Since there are infinitely many such \n$p$, this contradicts the choice of $c$ with $f(c)\\ne 0$.","subject":"number theory"}
{"id":"N20","problem":"Let $n>1$ be an integer. For which functions $f: \\mathbf{Z}\\to \\{1,2,...,n\\}$ is there a function $j: \\{1,2,...,n-1\\}\\to \\mathbf{Z}$ such that for each $k\\in \\{1,2,...,n-1\\}$ and $m\\in \\mathbf{Z}$ $$f(m+j(k))\\equiv f(m+k)-f(m)\\pmod {n+1}?$$","proof":"Let $f$ be a solution of the problem. Since $f$ takes values between $1$ and $n$ the given congruence shows that\n$f(m+k)\\ne f(m)$ for all $m$ and all $1\\leq k\\leq n-1$. It follows\nthat for all $m\\in \\mathbf{Z}$ the numbers $f(m), f(m+1),...,\nf(m+n-1)$ are pairwise distinct and so they must be a permutation of\n$1,2,...,n$. Applying this to $m$ and $m+1$ we deduce that\n$f(m+n)=f(m)$ for all $m$, thus $f$ is $m$-periodic. In particular,\nwe may assume that $j(k)\\in \\{0,1,...,n-1\\}$ for all $1\\leq k\\leq\nn-1$.\n\nNote that $x\\mapsto f(x+a)$ is a solution for any integer $a$, thus we may assume that\n$f(0)=1$, since we know that $f$ takes the value $1$ by the above discussion. \nThen $f(j(k))\\equiv f(k)-1\\pmod {n+1}$ for $1\\leq k\\leq n-1$.\nIf $j(k)\\ne 0$, we deduce that $f(j(j(k)))\\equiv f(k)-2\\pmod {n+1}$. Similarly, if $j(j(k))\\ne 0$, then $f(j(j(j(k))))\\equiv f(k)-3\\pmod {n+1}$.\nSince $f$ does not take values which are multiples of $n+1$, it follows that there is a smallest positive integer $a_k\\leq f(k)\\leq n$ such that\n$j^{a_k}(k)=0$, where $j^r$ denotes the $r$-fold composition of $j$ with itself. Moreover, $1=f(j^{a_k}(k))\\equiv f(k)-a_k\\pmod {n+1}$.\nSince $f(1),..., f(n-1)$ are pairwise incongruent modulo $n+1$, $a_1,...,a _{n-1}$ must be pairwise incongruent modulo\n$n+1$, thus pairwise distinct. Moreover, $a_1,..., a_{n-1}\\in \\{1,2,...,n\\}$ and we actually have $a_k\\ne n$ for all $k$ since if\n$a_k=n$ then the congruence $f(k)-a_k\\equiv 1\\pmod n$ cannot be satisfied with $f(k)\\in \\{1,2,...,n\\}$. Hence\n$a_1,...,a_{n-1}$ must be a permutation of $1,2,...,n-1$.\n\nIterating the congruence $f(m+j(k))\\equiv f(m+k)-f(m)\\pmod {n+1}$\nwe obtain $f(m+j^s(k))\\equiv f(m+k)-sf(m)\\pmod {n+1}$ for $1\\leq s\\leq a_k$, thus for\n$s=a_k$ we obtain $f(m+k)\\equiv (a_k+1)f(m)\\pmod {n+1}$. But then\n$f(m+sk)\\equiv (a_k+1)^s f(m)\\pmod {n+1}$ for all $s\\geq 1$. Applying this to\n$s=n$ and using that $f$ is $n$-periodic, we obtain $f(m)((a_k+1)^n-1)\\equiv 0\\pmod {n+1}$\nfor all $m\\in \\mathbf{Z}$ and all $1\\leq k\\leq n-1$. Taking $m=0$ we deduce that\n$n+1\\mid (a_k+1)^n-1$ for $1\\leq k\\leq n-1$ and since $a_1,...,a_{n-1}$ are a permutation of\n$1,2,...,n-1$, we deduce that $n+1\\mid 2^n-1, 3^n-1,..., n^n-1$. It follows that $n+1$ is relatively prime to\n$1,2,..,n$ and so $n+1$ is a prime. In particular, if $n+1$ is composite then there is no such function $f$.\n\nFinally, suppose that $n+1$ is a prime. Since $f(m+1)\\equiv (a_1+1)f(m)\\pmod {n+1}$, it follows that\n$f(m)\\equiv (a_1+1)^m\\pmod {n+1}$ for $m\\in \\mathbf{Z}$. Since $f(0), f(1),..., f(n-1)$ are a permutation of\n$1,2,...,n$, we deduce that $g:=a_1+1$ is a primitive root modulo $n+1$ and $f(m)$ is the remainder of\n$g^m$ modulo $n+1$. Recalling that if $f$ is a solution, then $x\\mapsto f(a+x)$ is a solution for all\nintegers $a$, we deduce that all solutions of the problem (when $n+1$ is prime) are of the form $f(x)=a g^x\\pmod {n+1}$ for\nsome $a\\in \\{1,2,...,n\\}$ and some primitive root $g$ modulo $n+1$. Conversely, it is easy to see that these are indeed solutions of the problem.","subject":"number theory"}
{"id":"N21","problem":"Prove that for all positive integers $n$ the number $$\\binom{2n+1}{1}3^n+\\binom{2n+1}{3}3^{n-1}+\\ldots +\\binom{2n+1}{2n+1}$$ is fully divisible by $2^n$.","proof":"Let $S_n$ be the corresponding number and let $a=1+\\sqrt{3}$ and $b=\\sqrt{3}-1$. By the binomial formula\n$$S_n=\\frac{a^{2n+1}-b^{2n+1}}{2}=\\frac{a}{2} (a^2)^n-\\frac{b}{2}(b^2)^n.$$\nNote that $a^2=4+2\\sqrt{3}$ and $b^2=4-2\\sqrt{3}$ are roots of the polynomial $X^2-8X+4$, thus \n$$S_{n+1}=8S_n-4S_{n-1}.$$ The result follows then by induction, noting that $S_1=10$ and $S_2=76$ have the property that \n$v_2(S_1)=1$, $v_2(S_2)=2$, and if $v_2(S_{n-1})=n-1$ and $v_2(S_n)=n$ then \n$$v_2(4S_{n-1})<v_2(8S_n),$$ thus $$v_2(S_{n+1})=v_2(4S_{n-1})=2+n-1=n+1.$$","subject":"number theory"}
{"id":"N22","problem":"Find all pairs $(a,b)$ of relatively prime positive integers $a>b$ such that $n^2\\mid a^n-b^n$ for only finitely many positive integers $n$.","proof":"We will prove that these are exactly the pairs for which $a-b=1$. If $a-b=1$ then the only positive integer \n$n$ for which $n\\mid a^n-b^n$ is $n=1$. This is a relatively standard result: suppose that $n>1$ and let \n$p$ be the smallest prime factor of $n$. Then $\\gcd(n, p-1)=1$, $p$ does not divide $a$ or $b$ (since \notherwise $p\\mid \\gcd(a,b)=1$) and so $p\\mid n\\mid a^n-b^n$ and $p\\mid a^{p-1}-b^{p-1}$ forces \n$p\\mid a-b=1$, a contradiction. \nWe will prove now that if $a>b+1$ then $n^2\\mid a^n-b^n$ for infinitely many positive integers $n$. \nThe key lemma needed is:\n\n\\begin{lemma}\nIf $a>b$ are relatively prime and $p$ is an odd prime dividing $a-b$, then there is an odd prime \n$q\\mid a^p-b^p$ such that $q$ does not divide $a-b$ (in particular $q\\ne p$).\n\\end{lemma} \n\n\\begin{proof}\nIf $q$ is a prime factor of $a-b$ different from $p$, then $q$ does not divide $\\frac{a^p-b^p}{a-b}$. On the other hand, by the lifting the exponent lemma $p$ divides $\\frac{a^p-b^p}{a-b}$ exactly once. Since \n$\\frac{a^p-b^p}{a-b}>a^{p-1}\\geq a>a-b\\geq p$, there is a prime factor of $\\frac{a^p-b^p}{a-b}$ different from $p$. Clearly $q$ does not divide $a-b$ and $q$ is odd.\n\\end{proof} \n\nSuppose now that $a-b$ has an odd prime factor $p_1$. By the lifting the exponent lemma \n$p_1^2\\mid a^{p_1}-b^{p_1}$. By the lemma there is an odd prime factor $p_2\\ne p_1$ of \n$a^{p_1}-b^{p_1}$, and the lifting the exponent lemma shows that $(p_1p_2)^2\\mid a^{p_1p_2}-b^{p_1p_2}$. \nBy the above lemma there is a prime $p_3$ which does not divide $a^{p_1}-b^{p_1}$ (so $p_3\\ne p_1$), \n$p_3\\ne p_2$ and $p_3\\mid a^{p_1p_2}-b^{p_1p_2}$. Then $(p_1p_2p_3)^2\\mid a^{p_1p_2p_3}-b^{p_1p_2p_3}$ and we continue this way to create infinitely many $n$ with $n^2\\mid a^n-b^n$.\n\nLet us suppose now that $a-b=2^k$ with $k\\geq 1$. Suppose that $a+b$ has some odd prime factor \n$p_1$. By the argument above there is a sequence $(p_n)$ of pairwise distinct primes such that \n$(p_1\\ldots p_n)^2\\mid a^{2p_1\\ldots p_n}-b^{2p_1\\ldots p_n}$ for all $n$. Since $4\\mid a^2-b^2$ (because \n$a,b$ are odd), the numbers of the form $2p_1\\ldots p_n$ (with $n\\geq 1$) are solutions of the congruence\n$a^x\\equiv b^x\\pmod {x^2}$ and we are done. Finally, suppose that $a+b=2^{\\ell}$. Then \n$a^4-b^4=2^{3k+\\ell-1}(4^{\\ell-k}+1)$ and $16\\mid a^4-b^4$. Pick an odd prime factor \n$p_1$ of $4^{\\ell-k}+1$, same for $a^4-b^4$ and argue as in the previous case.","subject":"number theory"}
{"id":"N23","problem":"Find all integers $n>2$ for which $n\\mid 2^n+3^n+...+(n-1)^n$.","proof":"Let $n$ be such a number and let\n$p$ be a prime divisor of $n$. Write $n=kp$ and observe that\n$$1^n+2^n+...+(n-1)^n\\equiv k(1^n+2^n+...+(p-1)^n)\\pmod p,$$\nsince $$(px+1)^n+...+(px+p-1)^n\\equiv 1^n+...+(p-1)^n\\pmod p$$ for\nall $x$. We deduce that\n$$k(1^n+2^n+...+(p-1)^n)\\equiv 1\\pmod p.$$\nIn particular $p$ does not divide $k$, i.e. $p^2$ does not divide\n$n$. Since $p$ was an arbitrary prime, this means that $n$ is\nsquarefree. On the other hand, the sum $1^n+2^n+...+(p-1)^n$ is not\ndivisible by $p$ thanks to the previous congruence. It follows that $p-1\\mid n$ and so\n$$1^n+...+(p-1)^n\\equiv -1\\pmod p.$$ Thus $k\\equiv -1\\pmod p$. In\nother words, $n$ must be squarefree, $p-1\\mid n$ and $p\\mid\n\\frac{n}{p}+1$ for all $p\\mid n$. \n\nLet us focus only on the first two properties above: $n$ is squarefree and $p-1\\mid n$ for \n$p\\mid n$. Write\n$n=p_1...p_k$ with $p_1<...<p_k$ distinct primes. Since $p_1-1\\mid n$ and\n$p_1$ is the smallest prime factor of $n$, we have $p_1-1=1$ and $p_1=2$. Similarly, from\n$p_2-1\\mid n$ and $\\gcd(p_2-1, p_2...p_k)=1$ we obtain $p_2-1\\mid 2$ and then $p_2=3$ (if $k\\geq 2$). Continuing like this we obtain $p_3=7$ (if $k\\geq 3$), then $p_4=43$ (if $k\\geq 4$). Assuming that\n$k\\geq 5$ we obtain $p_5-1\\mid 1806$. It is however easy to see that there is no such prime\n$p_5$, thus $k\\leq 4$ and \n$n=6,42$ or $1806$. It is not difficult to check that\neach of these numbers is a solution of the problem: by the above\ncomputations this comes down to checking that $p-1\\mid n$ and $p\\mid\n\\frac{n}{p}+1$ for each $p\\mid n$, which is straightforward. Thus\nthe solutions of the problem are $6,42$ and $1806$.","subject":"number theory"}
{"id":"N24","problem":"Let $(a_n)_{n\\geq 1}$ be a sequence of positive integers such that any prime larger than $1402$ divides some term of the sequence and let $b_n=a_1...a_n-1$. Prove that infinitely many primes divide at least one term of the sequence $(b_n)_{n\\geq 1}$.","proof":"Suppose that this is not the case and call a prime bad if it divides infinitely many terms of the sequence $(b_n)_{n\\geq 1}$. If \n$p$ is a bad prime then $p<1402$, since otherwise it divides some $a_k$ and then it will never divide $b_n$ for $n>k$. Call a prime good if it divides at least one and only finitely many $b_n$'s. Since by assumption there are finitely many good primes, there is $N$ so that for \n$n>N$ the term $b_n$ is not divisible by any good prime, so all of its prime factors are bad and hence less than $1402$. Let $a$ be the product of primes smaller than $1402$ congruent to $1$ modulo $4$, and let $b$ be the product of primes smaller than $1402$ and congruent to $3$ modulo $4$. By the Chinese remainder theorem and Dirichlet's theorem there is a prime $p>1402$ such that $p\\equiv 7\\pmod 8$, $p\\equiv 1\\pmod {a}$ and \n$p\\equiv -1\\pmod b$. Then $\\left(\\frac{2}{p}\\right)=1$ and for any prime $q<1402$ we have (using the quadratic reciprocity law) \n$$\\left(\\frac{q}{p}\\right)=\\left(\\frac{p}{q}\\right)(-1)^{\\frac{p-1}{2}\\frac{q-1}{2}}=1,$$\nfor if $q\\equiv 1\\pmod 4$ we have $\\left(\\frac{p}{q}\\right)=1$ and if $q\\equiv 3\\pmod 4$ we have \n$\\left(\\frac{p}{q}\\right)=-1$ by construction. Since $p>1402$ there is some large integer $M>N$ with \n$p\\mid a_1...a_M$, thus $b_M\\equiv -1\\pmod p$. All prime factors of $b_M$ are quadratic residues mod $p$, thus \n$-1$ must be a quadratic residue mod $p$. This is impossible, since $p\\equiv 3\\pmod 4$.","subject":"number theory"}
{"id":"N25","problem":"A point in the coordinate plane is called rational if its coordinates are rational numbers. Given a positive integer $n$, can we color all rational points using $n$ colors such that\\\\a) each point receives one color;\\\\b) any line segment whose endpoints are rational points contains rational points of each of the $n$ colors?","proof":"Give the color $0$ (or any number between $0$ and $n-1$) to the origin $O=(0,0)$.\nExtend $v_2$ to $\\mathbf{Q}^*$ by setting $v_2(x/y)=v_2(x)-v_2(y)$\nfor any nonzero integers $x,y$. This is well-defined and satisfies\nthe same basic properties as $v_2$ on $\\mathbf{Z}$ (this follows\nimmediately from the definition). If $P\\ne O$ is a rational point\nwith coordinates $x,y$, give $P$ the color whose number is the\nremainder of $\\min(v_2(x), v_2(y))$ when divided by $n$.\n\nConsider now a segment $I$ whose endpoints are $P_1=(x_1,y_1)$ and $P_2=(x_2,y_2)$. Fix\n$i\\in \\{0,1,...,n-1\\}$ and let us prove the existence of a point on $I$ whose color is\n$i$. We may assume that $v_2(x_1-x_2)\\leq v_2(y_1-y_2)$, which in particular implies that $x_1\\ne x_2$.\nPick $k$ large enough, to ensure that $v_2(x_1-x_2)-k<v_2(x_2)$ and, if $y_1\\ne y_2$, that\n$v_2(y_1-y_2)-k<v_2(y_2)$. Let\n$$Q_k=\\frac{1}{2^k}P_1+\\left(1-\\frac{1}{2^k}\\right)P_2=\\left( \\frac{x_1-x_2}{2^k}+x_2, \\frac{y_1-y_2}{2^k}+y_2\\right).$$\nNote that $Q_k$ belongs to $I$ and is not equal to $O$ for large enough $k$.\nCall $u_k, v_k$ the coordinates of $Q_k$, so\n$$u_k= \\frac{x_1-x_2}{2^k}+x_2, \\quad v_k= \\frac{y_1-y_2}{2^k}+y_2.$$\nThanks to the choice of $k$ we have\n$$v_2(u_k)=v_2\\left(\\frac{x_1-x_2}{2^k}\\right)=v_2(x_1-x_2)-k.$$\nIf $y_1=y_2$ then $v_2(v_k)=v_2(y_2)$, while if $y_1\\ne y_2$, then a similar computation shows that\n$v_2(v_k)=v_2(y_1-y_2)-k$. In all cases, taking into account the inequality $v_2(x_1-x_2)\\leq v_2(y_1-y_2)$ we see that for\n$k$ large enough we have\n$$\\min (v_2(u_k), v_2(v_k))=v_2(u_k)=v_2(x_1-x_2)-k.$$\nIt suffices therefore to choose $k$ large enough and such that\n$$v_2(x_1-x_2)-k\\equiv i\\pmod n,$$\nand then\n$Q_k$ will receive color $i$.","subject":"number theory"}
{"id":"N26","problem":"Let $p$ be a prime number and let $k$ be a positive integer. Let \\[t=\\sum_{i=0}^\\infty\\bigg\\lfloor\\frac{k}{p^i}\\bigg\\rfloor.\\]a) Let $f\\in \\mathbb{Z}[X]$ be a monic polynomial of degree $k$ with $p\\mid f(0)$. Prove that there exists $n\\in\\mathbb{N}$ for which $p\\mid f(n)$ and $p^{t+1}\\nmid f(n).$\\\\b) Prove that the statement above is sharp, i.e. there exists a monic polynomial $g\\in \\mathbb{Z}[X]$ of degree $k$ such that $p\\mid g(0)$ and if $p\\mid g(n)$ for some $n\\in\\mathbb{N}$ then $p^t\\mid g(n)$ also holds.","proof":"a) Suppose that no such $n$ exists. Since $p\\mid f(0)$, we have $p\\mid f(np)$ for all $n\\geq 0$, thus \n$p^{t+1}\\mid f(np)$ for all $n\\geq 0$ and so the polynomial $f(pX)/p^{t+1}$ sends nonnegative integers to integers. By a classical result about Hilbert polynomials, this polynomial of degree $k$ must have the form\n$$f(pX)/p^{t+1}=\\sum_{i=0}^k a_i \\binom{X}{i}$$\nfor some integers $a_i$. Looking at the leading coefficients yields \n$$p^k/p^{t+1}=a_k/k!,$$ thus $$v_p(k!)+k-(t+1)=v_p(a_k),$$ which is impossible since by Legendre's formula the left-hand side is $-1$ and the right-hand side is clearly nonnegative.\n\nb) Set $$g(X)=(X+p)(X+2p)...(X+kp).$$ Clearly $g$ is monic, of degree $k$, with constant term divisible by $p$. Suppose that $p\\mid g(n)$, then \n$p\\mid n$, so $n=pm$ for some nonnegative integer $m$. But then \n$$g(n)=p^k (m+1)...(m+k)$$ is divisible by $p^k k!$, which is divisible by $p^t$ since $t=v_p(k!)+k$.","subject":"number theory"}
{"id":"N27","problem":"Find the maximum possible number of integers that could appear in both an increasing arithmetic sequence of positive integers and an increasing geometric progression of positive integers, both sequences having $2024$ terms.","proof":"Let $1\\leq a_1<\\ldots<a_n$ and $1\\leq b_1<\\ldots<b_n$ be the arithmetic and the geometric sequence respectively, with \n$n=2024$. Taking $a_i=i$ and $b_i=2^{i-1}$ we see that we can achieve $11$ common terms. Suppose that we can find \n$12$ common terms, so there are positive integers $1\\leq i_1<\\ldots i_{12}\\leq n$ such that \n$b_{i_1},\\ldots, b_{i_{12}}\\in \\{a_1,\\ldots, a_n\\}$. Let $d=a_2-a_1$ and let $r=p/q=b_2/b_1$, with \n$p,q>0$ relatively prime positive integers. Note that since $b_n$ is a positive integer, $q^{n-1}\\mid b_1$, thus \n$b_1=kq^{n-1}$ and then $b_i=kp^{i-1}q^{n-i}$ for all $i$. Then \n$$(n-1)d=a_n-a_1\\geq b_{i_{12}}-b_{i_1}=kp^{i_1-1}q^{n-i_{12}}(p^{i_{12}-i_1}-q^{i_{12}-i_1}).$$\nChoose $1\\leq y<x\\leq 12$ consecutive such that $$s:=i_x-i_y\\leq \\frac{i_1-i_{12}}{11},$$\nwhich is clearly possible since $$i_{12}-i_1=i_{12}-i_{11}+i_{11}-i_{10}+\\ldots+ i_2-i_1.$$\nNote that by assumption for all $1\\leq u< v\\leq 12$\n$$d\\mid b_{i_u}-b_{i_v}=kp^{i_u-1}q^{n-i_v}(p^{i_v-i_u}-q^{i_v-i_u}).$$\nSince $\\gcd(p,q)=1$, this forces $$d\\mid kp^{i_1-1}q^{n-i_{12}}(p^{i_v-i_u}-q^{i_v-i_u})$$\nfor all $u,v$, in particular \n$$d\\leq kp^{i_1-1}q^{n-i_{12}}(p^s-q^s).$$\nSince we also have \n$$(n-1)d\\geq kp^{i_1-1}q^{n-i_{12}} (p^{11s}-q^{11s}),$$\nit follows that \n$$p^{10s}+\\ldots+q^{10s}\\leq n-1,$$\nbut the left-hand side is clearly minimized for $p=1, q=2, s=1$ (or $p=2, q=1, s=1$) and then it is larger than \n$n-1$.","subject":"number theory"}
{"id":"N28","problem":"Is there a nonconstant polynomial $f\\in \\mathbf{Z}[X]$ such that for all $n>2$ the numbers $f(0), f(1),..., f(n-1)$ give at most $0.499n$ different remainders when divided by $n$?","proof":"The answer is positive. In a first step, we claim that it suffices to check that $f(0), f(1),..., f(n-1)$ give at most $0.499n$ different remainders when divided by $n$ only for $n=4$ and for odd primes $n$. Assume that this happens and let $n>2$. Assume that $n$ is not a power of $2$ (the argument is similar in the other case) and pick a prime divisor $p>2$ of $n$. If $f(k)\\equiv r\\pmod n$ for some $k, r\\in \\{0,1,...,n-1\\}$, then $f(\\overline{k})\\equiv r\\pmod p$, where $\\overline{k}$ is the remainder of $k$ when divided by $p$. We deduce that $\\overline{r}$ can take at most $0.499p$ values, which means that $r$ can take at most $0.499p\\cdot \\frac{n}{p}=0.499n$ values, as for any remainder mod $p$ there are $\\frac{n}{p}$ numbers between $0$ and $n-1$ that are congruent to it mod $p$.\\\\We will prove now that $$f(X)=420(X^2-1)^2$$\nis a solution of the problem. This clearly satisfies the desired condition for $n=4$, so it remains to check it when $n=p$ is an odd prime. This is clear for $p<11$, so assume that $p\\geq 11$. It suffices to prove that $(x^2-1)^2$ gives at most $0.499p$ remainders mod $p$ when $x$ varies over all residues mod $p$. All $(x^2-1)^2$ are quadratic residues, and a quadratic residue $y^2$ is not of the form $(x^2-1)^2$ when $y+1$ and $1-y$ are quadratic non-residues. Let $N$ be the number of $y\\in \\{0,1,...,p-1\\}$ such that $1\\pm y$ are quadratic non-residues, thus the various $(x^2-1)^2$ give at most $\\frac{p+1}{2}-\\frac{N}{2}$ different remainders mod $p$. By definition $$N=\\frac{1}{4}\\sum_{y=2}^{p-2} \\left(1-\\left(\\frac{1+y}{p}\\right)\\right)\\cdot \\left(1-\\left(\\frac{1-y}{p}\\right)\\right).$$ A brutal expansion gives $$N=\\frac{1}{4}\\left(p-3-\\sum_{y=2}^{p-2} \\left(\\frac{1-y}{p}\\right)-\\sum_{y=2}^{p-2} \\left(\\frac{1+y}{p}\\right)+\\sum_{y=2}^{p-2} \\left(\\frac{1-y^2}{p}\\right)\\right).$$\n\nNext, we have $$\\sum_{y=2}^{p-2} \\left(\\frac{1-y}{p}\\right)=-1-\\left(\\frac{2}{p}\\right)=\\sum_{y=2}^{p-2} \\left(\\frac{1+y}{p}\\right)$$ and $$\\sum_{y=2}^{p-2} \\left(\\frac{1-y^2}{p}\\right)=-1+\\left(\\frac{-1}{p}\\right)\\sum_{y=0}^{p-1} \\left(\\frac{y^2-1}{p}\\right)=-1+(-1)^{\\frac{p+1}{2}}.$$ Thus $$N=\\frac{1}{4}\\left(p-2+2\\left(\\frac{2}{p}\\right)+(-1)^{\\frac{p+1}{2}}\\right)\\geq \\frac{p-5}{4}.$$ It remains to check that $$\\frac{p+1}{2}-\\frac{p-5}{8}\\leq 0.499p$$ for $p\\geq 11$, which is immediate.","subject":"number theory"}
{"id":"N29","problem":"Prove that for any positive integer $n$, if we order the divisors of $4n$ in increasing order, some consecutive divisors will differ by $2$.","proof":"Let us suppose that this is not the case, thus whenever $k$ is a positive integer such that $k$ and $k+2$ divide $4n$, $k+1$ will also divide $4n$. Start with the pair $(1,2)$ and assume we have already found a pair $(a,a+1)$ such that $a$ and $a+1$ divide $4n$ and neither of them is a multiple of $4$. Note that if $d\\mid 4n$ and $d$ is not divisible by $4$, then $2d\\mid 4n$. In particular $2a$ and $2a+2$ divide $4n$, so by assumption $2a+1$ divides $4n$. But then $(2a, 2a+1)$ and $(2a+1, 2a+2)$ are pairs with larger sum, consisting of consecutive positive divisors of $4n$, and in at least one pair no divisor is a multiple of $4$. Continuing this way, it follows that $4n$ has infinitely many positive divisors, a contradiction.","subject":"number theory"}
{"id":"N30","problem":"Let $f$ be a nonconstant polynomial with integer coefficients and positive leading coefficient. Prove that $f(n!)$ is composite for infinitely many integers $n\\geq 1$.","proof":"Write $f(X)=a_dX^d+a_{d-1}X^{d-1}+...+a_0$ for some integers $a_0,...,a_d$ with $a_d>0$.\nIf $a_0=0$, the result is clear, so assume that $a_0\\ne 0$. Given a prime\n$p$, the congruence $f((p-k)!)\\equiv 0\\pmod p$ is equivalent, by Wilson's theorem to\n$x_k\\equiv 0\\pmod p$, where\n$$x_k=a_0(k-1)!^d+a_1(k-1)!^{d-1}(-1)^k+...+a_d(-1)^{kd}.$$\nIf $k$ is large enough, say $k\\geq k_0$, then $a_d^2\\mid (k-1)!$ and\n$|x_k|>2a_d^2$. Choose, for such $k$, a prime factor $p_k$ of\n$\\frac{x_k}{a_d}$. Since\n$\\frac{x_k}{a_d}\\equiv (-1)^{kd}\\pmod {a_d}$, we have\n$\\gcd(p_k,a_d)=1$. If $p_k\\leq k-1$, then $p_k$ divides $\\frac{(k-1)!}{a_d}$, which combined with\n$\\frac{x_k}{a_d}\\equiv 0\\pmod {p_k}$ gives $p_k\\mid (-1)^{kd}$, a contradiction. Thus $p_k\\geq k$ for\n$k\\geq k_0$.\n\nSuppose now that there is $N\\geq k_0$ such that\n$f(n!)$ is not composite for $n\\geq N$.\nBy increasing $N$,\nwe may assume that the function $x\\to f(x!)-x$ is increasing and positive on $[N,\\infty)$. By the previous discussion\n$p_k\\geq k$ for $k\\geq N$ and $p_k\\mid f((p_k-k)!)$. Choose \n$k=k_a=a(N+1)!+2$ for $a\\geq 1$, so that $k,k+1,...,k+N-1$ are composite and so\n$p_k-k\\geq N$. We conclude that\n$f((p_k-k)!)=p_k$ for these $k$. Letting\n$x_a=p_{k_a}-k_a$, we obtain $f(x_a!)=x_a+a(N+1)!+2$\nfor all sufficiently large $a$. Since the numbers $(x_a)$ are pairwise distinct (by the previous equality), for infinitely many\n$a$ we have $x_{a+1}\\geq x_a+1$ and so\n$$ f(x_a!)-x_a+(N+1)!=f(x_{a+1}!)-x_{a+1}\\geq f((x_a+1)!)-(x_a+1).$$\nThis implies that\n$$f((x_a+1)x_a!)-f(x_a!)\\leq 1+(N+1)!,$$\nwhich is impossible since\n$\\frac{f((x_a+1)x_a!)}{f(x_a!)}\\to\\infty$ for $a\\to\\infty$.\nThe result follows.","subject":"number theory"}
{"id":"N31","problem":"Let $p>2$ be a prime and let $a_1, a_2,...,a_p$ be integers. Prove that there is a polynomial $P$ with integer coefficients, of degree $\\leq \\frac{p-1}{2}$ such\nthat $P(i) \\equiv a_i \\pmod p$ for all $1 \\leq i \\leq p$ if and only if \nfor all $1\\leq d \\leq \\frac{p-1}{2}$ we have\n$$ \\sum_{i=1}^p (a_{i+d} - a_i )^2 \\equiv 0 \\pmod p,$$ where indices are taken modulo $p$.","proof":"Suppose that $a_i\\equiv P(i)\\pmod p$ for some polynomial $P$ with integer coefficients and $\\deg P\\leq \\frac{p-1}{2}$. The polynomial $Q(X)=P(X+d)-P(X)$ satisfies $\\deg Q\\leq \\frac{p-3}{2}$, thus $\\deg (Q^2)<p-1$ and so $$\\sum_{i=1}^p Q(i)^2\\equiv 0\\pmod p.$$\n\nSuppose now that $ \\sum_{i=1}^p (a_{i+d} - a_i )^2 \\equiv 0 \\pmod p$ for $1\\leq d\\leq \\frac{p-1}{2}$. Since $p$ is odd and $1+d,2+d,...,p+d$ is a complete residue system modulo $p$, the above congruence is equivalent to\n$$\\sum_{i=1}^p a_i^2\\equiv \\sum_{i=1}^p a_ia_{i+d}$$\nfor all $1\\leq d \\leq \\frac{p-1}{2}$. Consider a polynomial $P$ with integer coefficients, of\ndegree $\\leq p-1$ such that $P(i)\\equiv a_i\\pmod p$ for $1\\leq i\\leq\np$. Such $P$ exists by Lagrange's theorem, and it is unique when considered as a polynomial in $\\mathbf{F}_p[X]$. \n\nConsider the polynomial $$Q(X)=\\sum_{i=1}^p P(i)P(X+i).$$ By assumption $Q(d)\\equiv Q(0)\\pmod p$ for\n$1\\leq d \\leq \\frac{p-1}{2}$. For such $d$, since \n$1-d,2-d,...,p-d$ is a complete residue system mod $p$, we have \n$$Q(-d)=\\sum_{i=1}^p P(i)P(i-d)\\equiv \\sum_{j=1}^p P(j+d)P(j)=Q(d)\\equiv Q(0)\\pmod p,$$\nthus the congruence $Q(X)-Q(0)\\equiv 0\\pmod p$ has at least $p$\nsolutions. Since $\\deg Q\\leq p-1$, Lagrange's theorem yields\n$Q\\equiv Q(0)\\pmod p$.\n\nWrite $$P(X)\\equiv \\alpha X^r+\\beta X^{r-1}+...\\pmod p,$$\nwith $\\alpha\\ne 0$ and $r\\leq p-1$. Assume that $r>\\frac{p-1}{2}$\nand let $k=2r-(p-1)$. Note that $k>0$ and $k\\leq r$. Since\n$$Q(X)=\\sum_{i=1}^p P(i)[ \\alpha (X+i)^r+\\beta (X+i)^{r-1}+...],$$\nthe coefficient of $X^k$ in $Q(X)-Q(0)$ is $$\\sum_{i=1}^p P(i)(\\alpha \\binom{r}{k} i^{r-k}+\\beta \\binom{r-1}{k} i^{r-k-1}+...)$$\nand this is $0$ mod $p$ by the previous discussion. We deduce that $$\\alpha \\binom{r}{k} \\sum_{i=1}^p P(i)i^{r-k}+\\beta \\binom{r-1}{k}\\sum_{i=1}^p P(i)i^{r-k-1}+...\\equiv 0\\pmod p.$$\nSince $\\deg (P\\cdot X^{r-k-j})=2r-k-j=p-1-j$, we have\n$$\\sum_{i=1}^p P(i)i^{r-k}\\equiv -\\alpha \\pmod p, \\quad \\sum_{i=1}^p P(i)i^{r-k-1}\\equiv 0\\pmod p,...$$\nThus the previous congruence becomes\n$$\\alpha^2 \\binom{r}{k}\\equiv 0\\pmod p.$$\nThis is impossible, since $\\alpha$ is not a multiple of $p$ and $p>r\\geq k$.","subject":"number theory"}
{"id":"N32","problem":"Prove that for any $n>1$ the number $\\binom{n}{0}^4+\\binom{n}{1}^4+...+\\binom{n}{n}^4$ is a multiple of any prime\n$p\\in (n, \\frac{4}{3}n]$.","proof":"Let $$A=(n+1)(n+2)...(p-1),$$ with the convention that $A=1$ if $p=n+1$. For all $j\\in \\{0,1,...,n\\}$ we have\n\\begin{align*}\nA\\binom{n}{j}\n& =\\frac{(p-1)\\cdot...\\cdot n(n-1)...(n-j+1)}{j!}\\\\\n& =(n-j+1)\\cdot...\\cdot (p-1-j)\\cdot \\frac{(p-j)(p-j+1)...(p-1)}{j!}.\n\\end{align*}\nSince $(p-j)(p-j+1)...(p-1)$ is congruent to $(-1)^j\\cdot j!$ modulo\n$p$, we deduce that $$A^4\\cdot \\sum_{j=0}^n \\binom{n}{j}^4\\equiv \\sum_{j=0}^n f(j)\\pmod p,$$\nwhere $$f(X)=(n-X+1)^4\\cdot...\\cdot (p-X-1)^4.$$\nNote that\n$$\\deg(f)=4(p-1-n)<p-1$$\nthanks to the hypothesis of the problem. Also\n$$f(n+1)=...=f(p-1)=0,$$\nthus \n$$\\sum_{j=0}^n f(j)\\equiv \\sum_{j=0}^{p-1} f(j)\\equiv 0\\pmod p$$\nand we conclude that $A^4\\cdot \\sum_{j=0}^n \\binom{n}{j}^4$ is a\nmultiple of $p$. Since $A$ is not a multiple of $p$, the result follows.","subject":"number theory"}
{"id":"N33","problem":"Let $p$ be a prime number and let $A$ be a set of positive integers such that:\\\\\na) the set of prime divisors of the elements of $A$ consists of $p-1$ elements and\\\\\nb) for any nonempty subset of $A$, the product of its elements is not a perfect $p$-th power.\\\\\nWhat is the largest possible number of elements of $A$?","proof":"$A$ can have $(p-1)^2$ elements: choose pairwise distinct primes\n$q_1,...,q_{p-1}$ and let the elements of $A$ be\n$$q_1, q_1^{1+p},..., q_1^{1+p(p-2)},..., q_{p-1}, q_{p-1}^{1+p},..., q_{p-1}^{1+p(p-2)}.$$\nTo see that $A$ satisfies b), pick a nonempty subset\n$B$ of $A$ and choose a prime factor $q_j$ of $\\prod_{x\\in B} x$. If $q_j^{1+px_1},..., q_j^{1+px_k}$ are all elements of $B$ that are divisible by $q_j$, then\nthe exponent of $q_j$ in the prime factorization of $\\prod_{x\\in B} x$ is\n$$v_{q_j}(\\prod_{x\\in B} x)=k+p(x_1+...+x_k)$$\nand this is clearly not divisible by $p$ since $1\\leq k\\leq p-1$. Thus $\\prod_{x\\in B} x$ is not a perfect $p$th power.\n\nWe prove next any such set $A$ has at most $(p-1)^2$ elements. Suppose $A$ satisfies a) and b) and has more than $(p-1)^2$ elements, and choose $k=(p-1)^2+1$ pairwise distinct elements $x_1,...,x_{k}$\nof $A$. Let $q_1,...,q_{p-1}$ be the different prime divisors of $\\prod_{x\\in A} x$. Write for $1\\leq j\\leq k$\n$$x_j=q_1^{e_{1j}} q_2^{e_{2j}}...q_{p-1}^{e_{p-1j}}$$\nfor some integers $e_{i,j}$ and consider the polynomials $$f_i(X_1,...,X_{k})=X_1^{p-1}e_{i1}+X_2^{p-1}e_{i2}+...+X_k^{p-1}e_{ik}$$ for $1\\leq i\\leq p-1$.\nThen $$\\sum_{i=1}^{p-1} \\deg f_i=(p-1)^2<k,$$\nthus by the Chevalley-Warning theorem the system $$f_1(z_1,...,z_k)\\equiv...\\equiv f_{p-1}(z_1,...,z_k)\\equiv 0\\pmod p$$\nhas a nontrivial solution $(z_1,...,z_k)\\in \\{0,1,...,p-1\\}^k$. Letting $$I=\\{i\\in \\{1,...,k\\}| z_i\\ne 0\\},$$ Fermat's little theorem yields $$\\sum_{j\\in I} e_{ij}\\equiv 0\\pmod p$$\nfor all $1\\leq i\\leq p-1$. It follows that $\\prod_{j\\in I} x_j$ is a perfect $p$th power, contradicting the fact that $A$ satisfies b). Thus the answer of the problem is $(p-1)^2$.","subject":"number theory"}
{"id":"N34","problem":"Let $a$ and $c$ be positive integers. Prove that for any integer $b$ there is a positive integer $x$ such that \\[a^x + x \\equiv b \\pmod c.\\]","proof":"We will prove by strong induction on $c$ the following statement: for all\nintegers $b$ and all $a\\geq 1$ there are infinitely many $x\\geq 1$\nsuch that $a^x+x\\equiv b\\pmod c$. The case $c=1$ is clear, so assume\nthat the result holds up to $c-1$ and let us prove it for $c$. Fix\n$a\\geq 1$ and an integer $b$. Since $\\varphi(c)<c$, by the inductive\nhypothesis there are infinitely many $x\\geq 1$ such that\n$$\\varphi(c)\\mid a^x+x-b.$$ We can thus choose (once and for all) such\n$x$, with $x\\geq \\max_{p\\mid c} v_p(c)$ and $x\\geq b$. Then one easily sees that $$a^{x+k\\varphi(c)}\\equiv\na^x\\pmod c$$ for all $k\\geq 1$. Write $a^x+x-b=d\\varphi(c)$ for some\n$d\\geq 1$ and set $$y_k=x+(kc-d)\\varphi(c)$$ for $k>d$ ($k>d/c$ would\nbe enough). Then $$a^{y_k}+y_k\\equiv a^x+y_k\\equiv a^x+x-d\\varphi(c)\\equiv b\\pmod c,$$\nthus all $(y_k)_{k>d}$ are solutions of the congruence $a^y+y\\equiv\nb\\pmod c$, proving the inductive step.","subject":"number theory"}
{"id":"N35","problem":"Prove that for any integer $n>1$ there are only finitely many $n$-tuples of positive integers $(a_1,a_2,...,a_n)$ such that $a_1>a_2>...>a_n$, $\\gcd(a_1,a_2,...,a_n)=1$ and $$a_1=\\gcd(a_1,a_2)+\\gcd(a_2,a_3)+...+\\gcd(a_{n-1},a_n)+\\gcd(a_n,a_1).$$","proof":"Since $\\gcd(a_i, a_{i+1})\\leq a_{i}-a_{i+1}$ for $1\\leq i<n$, we have\n$$\\gcd(a_1,a_2)+...+\\gcd(a_n,a_1)\\leq a_1-a_2+a_2-a_3+...+a_{n-1}-a_n+\\gcd(a_n,a_1)$$\nhence $a_1\\leq a_1-a_n+\\gcd(a_n,a_1)$ and $a_n\\leq \\gcd(a_n,a_1)$. Since\n$a_n\\geq \\gcd(a_n,a_1)$, all previous inequalities must be equalities.\nThus $a_i=a_{i+1}+\\gcd(a_i, a_{i+1})$ for $1\\leq i<n$ and $a_n\\mid a_1$.\n\nLet $b_i=\\frac{a_{i+1}}{\\gcd(a_i, a_{i+1})}$ for $1\\leq i<n$. Then\n$a_i=a_{i+1}(1+\\frac{1}{b_i})$ and so\n$$\\frac{a_1}{a_n}=\\left(1+\\frac{1}{b_1}\\right)...\\left(1+\\frac{1}{b_{n-1}}\\right)$$\nis an integer, which is $\\leq 2^{n-1}$ since each factor\nof the product is less than or equal to $2$. The next lemma shows that\nthere are only finitely many such tuples $(b_1,...,b_{n-1})$.\n\n\\begin{lemma}\nFor any positive real number $x$ and any positive integer $k$ there are only finitely many (maybe zero)\n$k$-tuples $(b_1,...,b_k)$ of positive integers such that\n$$\\left(1+\\frac{1}{b_1}\\right)\\cdot \\left(1+\\frac{1}{b_2}\\right)...\\left(1+\\frac{1}{b_k}\\right)=x.$$\n\\end{lemma}\n\n\\begin{proof}\nInduct on $k$, the case $k=1$ being clear. Assume that it holds for\n$k-1$. We may assume that $x>1$ (if not there is no solution). If\n$$\\left(1+\\frac{1}{b_1}\\right)\\cdot \\left(1+\\frac{1}{b_2}\\right)...\\left(1+\\frac{1}{b_k}\\right)=x,$$\nthen some $b_i$ must satisfy $1+\\frac{1}{b_i}>\\sqrt[n]{x}$, and this $b_i$ can only take finitely many possible values.\nBy the inductive hypothesis, for each possible value of $b_i$ we can find only finitely many $k-1$-tuples\n$(b_j)_{j\\ne i}$ satisfying\n$$\\prod_{j\\ne i} \\left(1+\\frac{1}{b_j}\\right)=\\frac{x}{1+\\frac{1}{b_i}},$$\nyielding the desired result.\n\\end{proof}\n\nNote that\n$b_1b_2...b_{n-1}a_i$ is a multiple of $a_n$ for all $1\\leq i\\leq n$.\nThus $a_n$ must divide $$b_1b_2...b_{n-1}\\gcd(a_1,...,a_n)=b_1b_2...b_{n-1}$$\nand so $a_n$ can only take finitely many values. Since\n$b_1,b_2,...,b_{n-1}$ also take only finitely many values, we are done.","subject":"number theory"}
{"id":"N36","problem":"Let $n>3$ be an integer and let $A,B$ be subsets of $\\{1,\\ldots, n\\}$ such that $ab+1$ is a perfect square for all \n$a\\in A$ and $b\\in B$. Prove that $$\\min (|A|, |B|)\\leq 1+\\lfloor\\log_{2+\\sqrt{3}}n\\rfloor.$$","proof":"It will be enough to prove that whenever $1\\leq a_1<a_2$ and $1\\leq b_1<b_2$ are positive integers such that \n$a_ib_j+1$ is a perfect square for $1\\leq i,j\\leq 2$, we have \n$$\\max\\left\\{\\frac{a_2}{a_1},\\frac{b_2}{b_1}\\right\\}>2+\\sqrt{3}.$$\nBy assumption we can write\n$$(a_1b_1+1)(a_2b_2+1)=x^2,\\quad (a_1b_2+1)(a_2b_1+1)=y^2$$\nfor some positive integers \n$x,y$. Subtracting and cancelling similar terms yields \n$$a_1b_1+a_2b_2-a_1b_2-a_2b_1=x^2-y^2,$$\nor \n$$(a_1-a_2)(b_1-b_2)=x^2-y^2.$$\nIn particular we must have $x>y$, thus $x^2-y^2\\geq (y+1)^2-y^2>2y$. Thus \n$$(a_1-a_2)(b_1-b_2)>2y=2\\sqrt{(a_1b_2+1)(a_2b_1+1)}>2\\sqrt{a_1a_2}\\cdot \\sqrt{b_1b_2},$$\nfrom where it is clear that \n$$a_1-a_2>\\sqrt{2a_1a_2}\\quad \\text{or}\\quad b_2-b_1>\\sqrt{2b_1b_2}.$$\nSolving these inequalities yields the claim.","subject":"number theory"}
{"id":"N37","problem":"Find all arithmetic progressions $a_{1},a_{2},...$ of positive integers for which there is an integer $N>1$ such that for all\n$k\\geq 1$ $$a_{1}a_{2}...a_{k}\\mid a_{N+1}a_{N+2}...a_{N+k}.$$","proof":"Write $a_n=a+nd$ for $n\\geq 1$ and some $d\\geq 1$. If $a=0$, then the sequence $(a_n)_n$ is a solution of the problem, since\nthe product of $k$ consecutive integers is a multiple of $k!$. We will prove that the case $a>0$ is impossible. Dividing $a$ and $d$ by their greatest common divisor, we may assume that\n$\\gcd(a,d)=1$. For $k>N$ by dividing the divisibility relation by $a_{N+1}...a_k$ we obtain\n$$a_1a_2...a_N\\mid a_{k+1}a_{k+2}...a_{k+N}.$$\nSince\n$a_1a_2...a_N>N!$, there is a prime $p$ such that\n$v_p(a_1...a_N)>v_p(N!)$. Then $p$ divides at least one of the numbers\n$a_1,...,a_N$, and these are all relatively prime to $d$ since $\\gcd(a,d)=1$. Thus\n$p$ does not divide $d$ and so there is an integer $k>N$ such that\n$p^{v_p(a_1...a_N)}\\mid a_k=a+dk$. But then $v_p(a_k)>v_p(N!)\\geq v_p(jd)$ for $1\\leq j\\leq N$, hence\n\\begin{align*}\nv_p(N!)\n& <v_p(a_1...a_N)\\leq v_p(a_{k+1}...a_{k+N})\\\\\n& =v_p((a_k+d)(a_k+2d)...(a_k+Nd))\\\\\n& =v_p(a_k+d)+v_p(a_k+2d)+...+v_p(a_k+Nd)\\\\\n& =v_p(d)+v_p(2d)+...+v_p(Nd)=v_p(N!),\n\\end{align*}\na contradiction.","subject":"number theory"}
{"id":"N38","problem":"Let $p$ be an odd prime and let $n$ be an even positive integer. How many ordered tuples $(x_1,\\ldots, x_n)$ with entries in $\\{1,\\ldots, p\\}$ have the property that $p$ divides both $x_1+\\ldots+x_n$ and $x_1^2+\\ldots+x_n^2$?","proof":"Call such tuples nice and let $N$ be their number. Let \n$z= e^{\\frac{2 \\pi i }{p}}$, then for any tuple $(x_1,\\ldots, x_n)$ the sum \n$$S(x_1,\\ldots, x_n)=\\sum_{a,b=0}^{p-1} z^{b(x_1+x_2+\\dots+x_{n}) + a (x_1^2 + x_2^2 + \\dots + x_{n}^2 )}=$$\n$$=(\\sum_{a=0}^{p-1} z^{ a (x_1^2 + x_2^2 + \\dots + x_{n}^2)}(\\sum_{b=0}^{p-1} z^{b(x_1+x_2+\\dots+x_{n})})$$\nequals $p^2$ when the tuple is nice and $0$ otherwise. In particular \n$$p^2N=\\sum_{(x_1,\\ldots, x_n)} S(x_1,\\ldots, x_n)=\\sum_{a,b=0}^{p-1} \\sum_{x_1,\\ldots, x_n=1}^{p} z^{ax_1^2+bx_1+\\ldots+ ax_n^2+bx_n}=\\sum_{a,b=0}^{p-1}\\left( \\sum_{x=0}^{p-1} z^{ax^2+bx} \\right)^{n}.$$\n\nLet now $$A(a,b)= \\sum_{x=0}^{p-1} z^{ax^2+bx}.$$\nNote that $A(0,b)$ equals $p$ if $b=0$ and $0$ otherwise. Thus the contribution of terms corresponding to \n$a=0$ is $p^n$. Suppose now that $a\\ne 0$ is between $1$ and $p-1$ and observe that \n$$A(a,b)=\\sum_{x=0}^{p-1} z^{ax^2+bx}=\\sum_{x=0}^{p-1} z^{a(x+b/2a)^2} z^{-b^2/(4a)}=z^{-b^2/(4a)} \\sum_{x=0}^{p-1} z^{ax^2},$$\nsince when $x$ ranges from $0$ to $p-1$ the various $x+b/2a$ yield all possible remainders mod $p$ exactly once (here we abuse notation and write $b/2a$ for the unique integer $y$ between $0$ and $p-1$ such that $2ay\\equiv b\\pmod p$). It follows that \n$$p^2N=p^n+\\sum_{a=1}^{p-1}\\sum_{b=0}^{p-1} z^{-nb^2/(4a)} G(a)^n,$$\nwith \n$$G(a)=\\sum_{x=0}^{p-1} z^{ax^2}.$$ This is a Gauss sum, and if $G:=G(1)$ then it is easy to see that \n$G(a) = \\left(\\frac{a}{p}\\right) G$. Thus \n$$p^2N=p^n+G^n \\sum_{b=0}^{p-1} \\sum_{a=1}^{p-1} z^{-nb^2/(4a)}.$$\nFor $b\\ne 0$ the inner sum $\\sum_{a=1}^{p-1} z^{-nb^2/(4a)}$ equals $-1$, and for $b=0$ it equals $p-1$. Thus \n$$\\sum_{b=0}^{p-1} \\sum_{a=1}^{p-1} z^{-nb^2/(4a)}=p-1-(p-1)\\cdot 1=0.$$\nIt follows that $N=p^{n-2}$.","subject":"number theory"}
{"id":"N39","problem":"Let $(a_n)_{n\\geq 1}$ be a sequence of positive integers such that for all $m,n\\geq 1$, all prime factors of $a_m+a_n$ are among the prime factors of $m+n$. Prove that $a_n=n$ for all $n$.","proof":"We start by observing that $p\\mid a_n+a_m$ whenever $p$ is a prime and\n$m,n$ are positive integers such that $m+n$ is a power of $p$. Indeed, $a_n+a_m\\geq 2$, so\nthere is a prime $q\\mid a_n+a_m$, but by hypothesis $q\\mid n+m$ and so $q=p$.\n\nWe prove next that if $m\\ne n$, then $a_m\\ne a_n$. Suppose that\n$a_n=a_m$ and choose a large prime $p$. By the first observation, $p\\mid a_n+a_{p-n}$, thus\n$p\\mid a_m+a_{p-n}$ and then $p\\mid m+p-n$. Thus $p\\mid m-n$ for all large primes, contradiction.\n\nNext, we prove that $|a_n-a_{n+1}|=1$ for all $n\\geq 1$. Suppose that there is $n$ for which this fails and\nlet $p$ be a prime factor of $a_{n+1}-a_n$. Let $k$ be such that $p^k>n$. Then by the first observation\n$p\\mid a_n+a_{p^k-n}$ and so $p\\mid a_n+a_{p^k-n}+a_{n+1}-a_n$. It follows that\n$p\\mid a_{p^k-n}+a_{n+1}$ and $p\\mid p^k-n+n+1=p^k+1$, a contradiction.\n\nThe previous two paragraphs yield $a_{n+2}-a_{n+1}=a_{n+1}-a_n=c$ for all\n$n$ and some $c\\in \\{-1,1\\}$. Since the sequence takes positive values, we must have\n$c=1$ and so $a_n=n+k$ for some $k\\geq 0$. Take a large prime\n$p$. Choose positive integers $m,n$ such that $p\\mid m+n+2k$. Then\n$p\\mid a_m+a_n$ and so $p\\mid m+n$. Subtracting, we deduce that\n$p\\mid 2k$ for all large primes $p$, thus $k=0$ and we are done.","subject":"number theory"}
{"id":"N40","problem":"Prove that $1!+2!+...+n!$ has a prime factor greater than $10^{2012}$ for some positive integer $n$.","proof":"Let $f(n)=1!+2!+...+n!$ and let $S$ be the set of all primes not exceeding $d:=10^{2012}$.\nSuppose that for all $n\\geq 1$, all prime factors of $f(n)$ are in $S$. Let\n$P=\\prod_{p\\in S} p^2$.\n\n\\begin{lemma}\nThere is a constant $c>0$ such that for all $p\\leq d$ and all $n\\geq c$ relatively prime to $P$\n$$v_p(f(nP-2))\\leq v_p((nP)!)-2.$$\n\\end{lemma}\n\n\\begin{proof}\nWe will prove that for any $p\\leq d$, the inequality $v_p(f(nP-2))\\geq v_p((nP)!)-1$\ncan hold for at most one $n$ that is relatively prime to $P$. Fix $p\\leq d$ and suppose that this inequality\nholds for two integers $n<m$ relatively prime to $P$. Since $$v_p((nP-1)!)=v_p((nP)!)-v_p(nP)=v_p((nP)!)-2,$$\nthe strong triangle inequality gives\n\\begin{align*}\nv_p(f(mP-2))\n& =v_p((nP-1)!+f(nP-2)+(nP)!+...+(mP-2)!)\\\\\n& =v_p((nP-1)!)=v_p((nP)!)-2.\n\\end{align*}\nSince $$v_p(f(mP-2))\\geq v_p((mP)!)-1,$$ it follows that $v_p((nP)!)\\geq v_p((mP)!)+1$, a contradiction. \n\\end{proof}\n\nLet $c$ be as in the previous lemma. Then for all $n\\geq c$ relatively prime to $P$ \n$$v_p(f(nP-2))\\leq \\frac{nP}{p-1}-2<nP.$$\nSince all prime factors of $f(nP-2)$ are less than or equal to $d$, it follows that\n$$(nP-2)!<f(nP-2)\\leq \\prod_{p\\leq d} p^{nP}<d!^{nP}$$\nfor all $n\\geq c$ relatively prime to $P$, a contradiction.","subject":"number theory"}
{"id":"N41","problem":"Let $(a_n)_{n\\geq 0}$ be a sequence such that $a_0=6$ and for $n>0$ $$a_n=a_{n-1}+\\gcd(a_{n-1}, n).$$ Prove that for all $n$ the number $a_n-a_{n-1}$ is either $1$ or a prime number.","proof":"Let $b_n=a_n-a_{n-1}$, so that the first few values of the sequence $b_1, b_2,...$ are $1,1,1,1,5,3,1,1,1,1,11,3,...$.\nWe will prove the following claim by induction: suppose that $a_n=3n$ and that $b_{n+1}=1$, and let $k$ be the smallest positive integer\nsuch that $b_{n+k}\\ne 1$, then $b_{n+k}$ is a prime and $a_{n+k}=3(n+k)$. It is clear that the claim implies the desired result.\n\nIt is not difficult to check the claim for $n\\leq 5$ using the previous explicit values for the sequence\n$(b_n)_{n\\geq 1}$. It is not difficult to see that $a_{n+1}=3n+1$, $a_{n+2}=3n+2$,.., $a_{n+k-1}=3n+k-1$ and so\n$$b_{n+k}=\\gcd(n+k, 3n+k-1)=\\gcd(n+k, 2k+1)\\mid 2k+1.$$\nSuppose that $2k+1$ is not a prime and let $p$ be a prime factor of\\linebreak\n$\\gcd(2k+1, n+k)$. Then $p\\leq \\frac{2k+1}{3}<k$ and\n$$b_{n+k-p}=\\gcd(n+k-p, 3n+k-p-1)=\\gcd(n+k-p, 2k+1-2p)$$\nis a multiple of $p$, contradicting the fact that $k$ was minimal with $b_{n+k}\\ne 1$. Thus $2k+1$ is a prime and\n$b_{n+k}=2k+1$, hence $$a_{n+k}=a_{n+k-1}+b_{n+k}=3n+k-1+2k+1=3(n+k),$$\nfinishing the induction.","subject":"number theory"}
{"id":"N42","problem":"For every positive integer $n$, let $f(n)$, $g(n)$ be the minimal positive integers such that\n\\[1+\\frac{1}{1!}+\\frac{1}{2!}+\\dots +\\frac{1}{n!}=\\frac{f(n)}{g(n)}.\\] Is there a positive integer $n$ for which $g(n)>n^{0.999n}$?","proof":"The answer is positive. Let $$x_n=n!+\\frac{n!}{1!}+...+\\frac{n!}{n!}\\,\\, \\text{and}\\,\\, d_n=\\gcd(x_n, n!),$$\nso that $$\\frac{f(n)}{g(n)}=\\frac{x_n}{n!}=\\frac{x_n/d_n}{n!/d_n}$$\nand then $g(n)=\\frac{n!}{d_n}$. Using that $n!>(n/e)^n$ (or any inequality of the form $n!>(n/c)^n$ with a constant $c$), it suffices to prove that for any \ninteger $k>1$ there are infinitely many $n$ for which $d_n<n^{n/k}$. Next, note that \n$$x_{n}=n!(1+1/1!+...+1/n!)=n(n-1)!(1+1/1!+...+1/(n-1)!+1/n!)=1+nx_{n-1}.$$\nIn particular $x_n=1+n+n(n-1)x_{n-2}$ and continuing like this we see that for all $d$ we have \n$\\gcd(x_n, x_{n-d})\\mid P_d(n)$ for some polynomial $P_d$. It follows that \n$$\\prod_{0\\leq i<j\\leq k-1} \\gcd(x_{n-i}, x_{n-j})\\mid Q_k(n)$$\nfor some polynomial $Q_k$ and all $n$. Moreover, all $x_{n-i}$ divide $n!$. In general, if $y_1,...,y_N$ are positive integers then \n$$y_1...y_N\\mid \\prod_{1\\leq i<j\\leq N} \\gcd(y_i, y_j) \\cdot {\\rm lcm} (y_1,...,y_N).$$\nIndeed, it suffices to check that the $p$-adic valuation of the left-hand side is at most that of the right-hand side for all primes \n$p$, which reduces to proving that \n$$t_1+...+t_N\\leq \\sum_{1\\leq i<j\\leq N} \\min (t_i, t_j)+\\max_{1\\leq i\\leq N} t_i$$\nfor all $t_1,...,t_N\\geq 0$, which is easy to see (by symmetry we may assume that $t_1\\leq...\\leq t_N$ and then the inequality is clear). It follows that $$x_{n}x_{n-1}...x_{n-k+1}\\mid n! Q_k(n)$$\nfor some polynomial $Q_k$, and then $\\min (x_n,..., x_{n-k+1})\\leq n^{n/k} Q_k(n)^{1/k}=O(n^{n/(k-1)})$, yielding the result (with $k-1$instead of $k$, which of course does not change anything to the argument).","subject":"number theory"}
{"id":"N43","problem":"Let $f\\in \\mathbf{Z}[X]$ have degree $d$ and such that for some prime \n$p$ the number of pairwise distinct remainders mod $p$ of the numbers $f(1),\\ldots, f(p)$ is \n$k\\in (1,p)$. Prove that \n$$\\frac{p-1}{d}\\leq k-1\\leq (p-1)(1-\\frac{1}{d}).$$","proof":"Let $r_1,\\ldots, r_k$ be the pairwise distinct remainders of the numbers \n$f(1),\\ldots, f(p)$. The polynomial $g=(f-x_1)\\ldots (f-x_{k-1})$ has the property that \n$g(1),\\ldots, g(p)$ give exactly two nonzero remainders mod $p$, one being $0$. If \n$\\deg g<p$ then $g(1)+\\ldots+g(p)\\equiv 0\\pmod p$, which is clearly impossible, thus \n$\\deg g\\geq p-1$ and so $\\frac{p-1}{d}\\leq k-1$. \nNow let $x_i$ be the number of integers $j\\in \\{1,\\ldots, p\\}$ with $f(j)\\equiv r_i\\pmod p$. Clearly \n$x_1+\\ldots+x_k=p$ and each $x_i>0$. Suppose that $k-1\\leq (p-1)(1-\\frac{1}{d})$ fails, so \n$d(p-k)<p-1$ and so each of the polynomials $f,f^2,\\ldots, f^{p-k}$ has degree \n$<p-1$. In particular for $1\\leq j\\leq p-k$ we have \n$$x_1r_1^j+\\ldots+x_k r_k^j\\equiv f(1)^j+\\ldots+f(p)^j\\equiv 0\\pmod p.$$\nLet $s_1,\\ldots, s_{p-k}$ be the remainders mod $p$ different from $r_1,\\ldots, r_k$. Then we also have \n$$s_1^j+\\ldots+s_{p-k}^j+r_1^j+\\ldots+r_k^j\\equiv 0\\pmod p$$\nfor $1\\leq j\\leq p-k$, thus \n$$(x_1-1)r_1^j+\\ldots (x_k-1)r_k^j\\equiv s_1^j+\\ldots+s_{p-k}^j\\pmod p$$\nfor $1\\leq j\\leq p-k$, and this obviously also holds for $j=0$. Let \nnow $t_1,\\ldots, t_{p-k}$ the multiset consisting of $x_1-1$ copies of $r_1$, $x_2-1$ copies of \n$r_2$, etc. Then $$t_1^j+\\ldots+t_{p-k}^j\\equiv s_1^j+\\ldots+s_{p-k}^j\\pmod p$$\nfor $0\\leq j\\leq p-k$. Newton sums then imply that the symmetric sums of the $t_i$'s are the same modulo $p$ as the corresponding symmetric sums of the \n$s_j$'s, and so \n$$(X-t_1)\\ldots (X-t_{p-k})=(X-s_1)\\ldots (X-s_{p-k})$$\nas polynomials with coefficients mod $p$. But this is obviously impossible, since then \n$s_1$ would be one of the $t_i$'s, thus one of the $r_j$'s, which is clearly not the case.","subject":"number theory"}
{"id":"N44","problem":"Let $A_1, A_2,\\ldots, A_m$ be non-empty subsets of the positive integers, and let $S$ denote their union. Prove that\n\\[\\sum_{i=1}^m \\sum_{(a,b)\\in A_i^2}\\gcd(a,b)\\ge\\frac1m \\sum_{(a,b)\\in S^2}\\gcd(a,b).\\]","proof":"We will use Gauss' identity\n$$n=\\sum_{d\\mid n} \\varphi(d),$$\nvalid for all positive integers $n$. Thus \n$$\\sum_{i=1}^m \\sum_{(a,b)\\in A_i^2}\\gcd(a,b)=\\sum_{i=1}^m\\sum_{a,b\\in A_i}\\sum_{d\\mid a, d\\mid b} \\varphi(d).$$\nLet $D$ be the set of positive divisors of the elements in $S$ and for each $d\\in D$ let $f_i(d)$ be the number of multiples of $d$ in $A_i$. Finally, let \n$f(d)$ be the number of multiples of $d$ in $S$. Clearly $$f(d)\\leq \\sum_{i=1}^m f_i(d)$$ for all $d$. Thus, using the Cauchy-Schwarz inequality we obtain\n$$\\sum_{i=1}^m \\sum_{(a,b)\\in A_i^2}\\gcd(a,b)=\\sum_{d\\in D} \\sum_{i=1}^m \\varphi(d) f_i(d)^2\\geq \\sum_{d\\in D} \\varphi(d)\\frac{1}{m} (\\sum_{i=1}^m f_i(d))^2$$\n$$\\geq \\frac{1}{m}\\sum_{d\\in D} \\varphi(d) f(d)^2=\\frac1m \\sum_{(a,b)\\in S^2}\\gcd(a,b).$$","subject":"number theory"}
{"id":"N45","problem":"Prove that there are polynomials $S_1, S_2, \\ldots$ in the variables $x_1, x_2, \\ldots,y_1, y_2,\\ldots$ with integer coefficients such that for all $n\\geq 1$ $$\\sum_{d \\mid n} d \\cdot S_d ^{n/d}=\\sum_{d \\mid n} d \\cdot (x_d ^{n/d}+y_d ^{n/d}).$$","proof":"We prove by strong induction the existence of such polynomials, the case $n=1$ being clear.\nSuppose that we constructed $S_1,...,S_{n-1}$. Note that the desired relation uniquely defines a polynomial \n$S_n$ with rational coefficients. The issue is to show that its coefficients are integers. It suffices to show that for any prime $p$ with $k:=v_p(n)>0$ we have $$p^k \\mid \\displaystyle\\sum_{d\\mid n} d \\cdot (x_d^{n/d} + y_d^{n/d}) - \\displaystyle\\sum_{d\\mid n,d\\neq n} dS_d^{n/d}$$\nin $\\mathbb{Z}[x_1,x_2,..., y_1, y_2,...]$. Write $n=pm$ for some integer $m$ with $v_p(m)=k-1$. The terms \n$dS_d^{n/d}$ and $d \\cdot (x_d^{n/d} + y_d^{n/d})$ are divisible by $p^k$ for any $d$ which is not a divisor of \n$m$ (as such $d$ is already divisible by $p^k$). Thus it suffices to show that \n$$p^k\\mid \\displaystyle\\sum_{d\\mid m} d\\cdot (x_d^{n/d} + y_d^{n/d}) - \\displaystyle\\sum_{d\\mid m} dS_d^{n/d}.$$\nNote that \n$$\\sum_{d\\mid m} d\\cdot (x_d^{n/d} + y_d^{n/d}) - \\displaystyle\\sum_{d\\mid m} dS_d^{n/d}=\\sum_{d\\mid m}\nd(x_d^{pm/d} + y_d^{pm/d} )- \\displaystyle\\sum_{d\\mid m} dS_d^{pm/d} = \\displaystyle\\sum_{d\\mid m} d \\left( T_d^{m/d} - S_d^{pm/d}\\right),$$\nwhere \n$$T_d(x_1,x_2,...,y_1,...):=S_d(x_1^p, x_2^p,..., y_1^p,...).$$ \nWe will prove that $p^k\\mid d\\left( T_d^{m/d} - S_d^{pm/d}\\right)$ for any $d\\mid m$. Write \n$m/d=p^u q$ with $q$ relatively prime to $p$. Note that $u=v_p(m/d)=k-1-v_p(d)$, so \n$v_p(d)=k-1-u$, so it suffices to check that $p^{u+1}\\mid T_d^{m/d} - S_d^{pm/d}$. If \n$A\\in \\mathbb{Z}[x_1,x_2,..., y_1,...]$, using the binomial theorem it is easy to see that there is a polynomial \n$B\\in \\mathbb{Z}[x_1,x_2,..., y_1,...]$ such that \n$$A(x_1,x_2,...,y_1,...)^p-A(x_1^p,x_2^p,..., y_1^p,...)=pB(x_1,x_2,...,y_1,...).$$\nApply this to the polynomial $A=S_d^{pq}$, so we can write \n$T_d^q=A+pB$ for some $B\\in \\mathbb{Z}[x_1,x_2,..., y_1,...]$. Therefore we are reduced to proving that \n$$p^{u+1}\\mid (A+pB)^{p^u}-A^{p^u}$$\nfor all $A,B\\in \\mathbb{Z}[x_1,x_2,..., y_1,...]$. Simply expand using the binomial formula and observe that \n$v_p \\left(p^i \\binom{p^u}{i}\\right)\\geq u+1$ for all $i\\geq 1$.","subject":"number theory"}
{"id":"N46","problem":"Let $p$ be an odd prime not dividing $abcd$, where $a,b,c,d$ are pairwise distinct integers. Let \n$v_p(x)$ be the largest nonnegative integer $k$ such that $p^k$ divides the nonzero integer $x$. If the sequence \n$(v_p(ca^n-db^n))_{n\\geq 1}$ takes at least one positive value and is bounded above, prove that it takes exactly one positive value.","proof":"We will work in the ring $R$ of rational numbers of the form $a/b$ with $a,b$ integers, $b$ relatively prime to $p$. In this ring it still makes sense to consider congruences modulo powers of $p$ and extend the $p$-adic valuation $v_p$ to $R$ by setting \n$v_p(a/b)=v_p(a)$ for $a/b\\in R$ as above. Let $x=a/b$ and $y=d/c$, which are elements of \n$R$ by assumption, and let $x_n=v_p(x^n-y)$. Noting that \n$$x^n-y=\\frac{ca^n-db^n}{cb^n}$$ and \n$p$ does not divide $bc$, we see that we can reformulate the problem as: if $(x_n)$ is bounded above and takes at least one positive value, then its positive values are all the same. Let $t$ be the largest positive value of $x_n$ and let \n$o$ be the smallest positive integer such that $x^o\\equiv 1\\pmod p$ in $R$ (it exists since \n$x^{p-1}\\equiv 1\\pmod p$ in $R$ by Fermat's little theorem). Let $k$ be such that $x_k$ is maximal and write \n$$x^k=y+p^u v$$\nwith $u\\geq 1$ and $v$ prime to $p$. We will prove below that $v_p(x^o-1)>u$. Assume this for a moment and suppose that \n$x_n>0$, then by a standard argument $p\\mid x^n-y$ and $p\\mid x^k-y$ forces $p\\mid x^{n-k}-1$ in $R$ and then $n-k=wo$ for some integer $w$. But then \n$$v_p(x_n)=v_p(x^n-x^k+x^k-y)=\\min (v_p(x^n-x^k), v_p(x^k-y))=v_p(x^k-y)=x_k,$$\nsince $$v_p(x^n-x_k)=v_p(x^{n-k}-1)\\geq v_p(x^o-1)>u=v_p(x_k).$$\nThis finishes the proof.\n\nIt remains to prove the key inequality $v_p(x^o-1)>u$. Suppose that $v_p(x^o-1)\\leq u$. Using the lifting the exponent lemma (which still holds in $R$) \n$$v_p(x^{o'}-1)=u,$$\nwhere $o'=op^{u-v_o(x^o-1)}$. We will prove that for a suitable $m$ we have \n$$v_p(x^{k+o'm}-y)>v_p(x_k)=u,$$\ncontradicting the maximality of $v_p(x_k)$. Note that \n$$x^{k+o'm}-y=x^k(x^{o'm}-1)+x_k,$$\nand $x^{o'}=1+p^u t$ with $v_p(t)=0$. Thus \n$$x^{o'm}-1=(1+p^ut)^{m}-1\\equiv mt p^u\\pmod {p^{u+1}},$$\nso it suffices to choose $m$ such that \n$$mt p^u+x_k\\equiv 0\\pmod p^{u+1},$$\nwhich exists since $v_p(t)=0$ and $v_p(x_k/p^u)=0$.","subject":"number theory"}
{"id":"N47","problem":"Prove that every positive integer $n$, except a finite number of them, can be represented as a sum of $2004$ positive integers: $n=a_1+a_2+\\ldots +a_{2004}$, where $1\\le a_1<a_2<\\ldots <a_{2004}$, and $a_i \\mid a_{i+1}$ for all $1\\le i\\le 2003$.","proof":"We will prove by induction on $k$ that there exists\na positive integer $n_k$ such that all $n\\geq n_k$ can be written\n$n=a_1+a_2+...+a_k$ for an increasing sequence $1\\leq a_1<...<a_k$ with\n$a_1\\mid a_2\\mid...\\mid a_k$. Call such a decomposition admissible.\n\nThe statement is trivial for $k=1$ and for $k=2$ we can take $n_2=3$ (write\n$n=1+(n-1)$ for $n>2$). Suppose that $n_k$ exists and choose some large\n$n$. Write\n$n=2^{r}(2m+1)$ for some nonnegative integers $r$ and $m$.\nIf $n$ is large, then at least one of $r$ and $m$ is large.\n\nSuppose that $m$ is large, say $m\\geq n_k$. Then we can find an admissible\nwriting $m=a_1+a_2+...+a_k$ for $m$ and we obtain an admissible writing for $n$\n$$n=2^r+2^{r+1}a_1+2^{r+1}a_2+...+2^{r+1}a_k.$$\n\nSuppose now that $r$ is large. It is enough to find an admissible decomposition for\n$2^r$ (as then we can multiply all of its members by $2m+1$ to get an admissible writing for\n$n$). Write $r=2q+r_1$ with $r_1\\in \\{0,1\\}$ and $q\\geq 0$. By the same argument, it suffices to\nfind an admissible decomposition for $2^{2q}$. Assume that\n$2^q\\geq n_k$ and choose an admissible decomposition $2^q+1=a_1+...+a_k$ for $2^q+1$.\nWe obtain a new admissible decomposition of length $k+1$ for $2^{2q}$\n$$2^{2q}=1+(2^q-1)(2^q+1)=1+(2^q-1)a_1+...+(2^q-1)a_k.$$\n\nSuppose that $n\\geq 4n_k^3$. Then either\n$m\\geq n_k$ or $2^q\\geq n_k$. Indeed, otherwise\n$$n=2^{2q+r_1}(2m+1)< 2\\cdot n_k^2\\cdot 2n_k=4n_k^3,$$\na contradiction. As we have explained above, this is enough to obtain an admissible\ndecomposition of length $k+1$ for $n$, so we can take $n_{k+1}=4n_k^3$ and finish the inductive proof.","subject":"number theory"}
{"id":"N48","problem":"Let $n>1$ be an integer. Prove that $2n-1$ is a prime number if and only if\nfor any $n$ pairwise distinct positive integers $a_1, a_2, \\ldots ,\na_n$ there exist $i, j \\in \\{1, 2, \\ldots , n\\}$ such that\n\\[\\frac{a_i+a_j}{\\gcd(a_i,a_j)} \\geq 2n-1.\\]","proof":"Suppose first that $p=2n-1$ is a prime and let $a_1,...,a_n$ be pairwise distinct positive integers.\nSuppose that \\[\\frac{a_i+a_j}{\\gcd(a_i,a_j)}<p\\] for $i,j\\in\n\\{1,...,n\\}$. Dividing each of the numbers $a_1,...,a_n$ by\n$\\gcd(a_1,...,a_n)$, we may assume that $\\gcd(a_1,...,a_n)=1$.\n\nIf there is $i$ such that $p\\mid a_i$, then we can choose\n$j$ such that $p$ does not divide $a_j$ and then $p$ does not divide\n$\\gcd(a_i, a_j)$. Thus $p$ divides $\\frac{a_i}{\\gcd(a_i, a_j)}$ and\nwe obtain the plain contradiction\n$$p\\leq \\frac{a_i}{\\gcd(a_i, a_j)}<\\frac{a_i+a_j}{\\gcd(a_i,a_j)}<p.$$\n\nSuppose now that $a_1,a_2,...,a_n$ are not multiples of $p$.\nBy the pigeonhole principle, two of the numbers\n$a_1,a_2,...,a_n, -a_1,...,-a_n$ must give the same remainder when\ndivided by $p$. So we can find $i\\ne j$ such that $p\\mid a_i+a_j$ or\n$p\\mid a_i-a_j$. Note that $p$ does not divide $\\gcd(a_i, a_j)$, so\n$p$ divides $\\frac{a_i\\pm a_j}{\\gcd(a_i, a_j)}$ for a suitable\nchoice of the sign $\\pm$. We obtain again a contradiction\n$$p>\\frac{a_i+a_j}{\\gcd(a_i, a_j)}\\geq |\\frac{a_i\\pm a_j}{\\gcd(a_i, a_j)}|\\geq p.$$\nSo our initial assumption was wrong and the result follows.\n\nSuppose now that $2n-1$ is composite, so we can write it as $xy$, with\n$x,y>1$. Define $n$ integers $a_1,a_2,...,a_n$ by choosing the first\n$x$ positive integers $1,2,...,x$, then the next $n-x$ even numbers\n$x+1, x+3,..., xy-x$. It is not difficult to check that\n$\\frac{a_i+a_j}{\\gcd(a_i, a_j)}<2n-1$ for all $i,j$.","subject":"number theory"}
{"id":"N49","problem":"Prove that the equation $$(x+1)(x+2)\\ldots (x+2014)=(y+1)(y+2)\\ldots (y+4028)$$ has no solutions $(x,y)$ in positive integers.","proof":"Let $n=2014$ and take a potential solution $(x,y)$. Letting $z=y^2+(2n+1)y$, we rewrite the equation \n$$(x+1)(x+2)\\ldots (x+n)=(z+2n)(z+2(2n-1))\\ldots (z+n(n+1)).$$\nIt is clear that $x>z$, write $x=z+t$, so that letting $a_i=i(2n+1-i)$ we obtain\n$$(z+1+t)(z+2+t)\\ldots (z+t+n)=(z+a_1)(z+a_2)\\ldots (z+a_n).$$\nIn particular, noting that $a_n$ is the largest of the $a_i$'s we obtain\n$$(z+1+t)^n<(z+a_n)^n,$$\nthus $t<n^2+n$.\nExpanding and cancelling terms, we can rewrite this \n$$z^{n-1}(\\sum_{i=1}^n (t+i)-\\sum_{i=1}^n a_i)+z^{n-2}(\\sum_{1\\leq i<j\\leq n} (t+i)(t+j)-\\sum_{1\\leq i<j\\leq n} a_i a_j)+\\ldots+\n\\prod_{i=1}^n (t+i)-\\prod_{i=1}^n a_i=0.$$\n\nThe coefficient of $z^{n-1}$ is \n$$\\alpha=nt+\\frac{n(n+1)}{2}-(2n+1)\\frac{n(n+1)}{2}+\\frac{n(n+1)(2n+1)}{6}=n(t+\\frac{n+1}{2}-\\frac{(n+1)(2n+1)}{3}),$$\nwhich is clearly nonzero. Letting $b_i$ be the coefficient of $z^{n-i}$ in the above equation, it follows that \n$$z^{n-1}\\leq |b_2|z^{n-2}+\\ldots+|b_n|.$$ Note that \n$$|b_i|=|\\sum_{1\\leq k_1<\\ldots<k_i\\leq n} (t+k_1)\\ldots (t+k_i)-a_{k_1}\\ldots a_{k_i}|<$$\n$$\\binom{n}{i}((t+n)^i+a_n^i)<2^i((n^2+2n)^i+(n^2+n)^i)<2^{i+1} (n^2+2n)^i.$$\nIt follows that \n$$\\frac{1}{z}\\leq \\sum_{i=2}^n \\frac{2^{i+1}(n^2+2n)^i}{z^i}.$$\nWe will see below that $z>8n(2n^2+4n)^2$, hence in the above sum the term for \n$i=2$ is the largest and so \n$$\\frac{1}{z}<\\frac{8n(n^2+2n)^2}{z^2},$$\na contradiction.\n\nThus we need to find a good lower bound for $z$ and since \n$z>x-(n^2+n)$, it suffices to prove that $x>50 n^5$. For this we will exploit that \n$(2n)!$ divides $(y+1)\\ldots (y+2n)$, thus it must divide $(x+1)\\ldots (x+n)$. Let\n$x+i$ be the term among $x+1,\\ldots, x+n$ having the largest $2$-adic valuation. Then for \n$1\\leq j\\ne i\\leq n$ we have $$v_2(x+j)=v_2(x+i+j-i)=v_2(j-i)$$\nsince it is easy to see that $v_2(x+j)<v_2(x+i)$, thus \n$$v_2(j-i)=v_2(x+j-(x+i))=\\min (v_2(x+j), v_2(x+i))=v_2(x+j)<v_2(x+i).$$\nThus \n$$v_2((2n)!)\\leq v_2((x+1)\\ldots (x+n))=v_2(x+i)+\\sum_{j\\ne i} v_2(j-i)\\leq v_2(x+i)+v_2(n!).$$\nIt follows that \n$$x+n\\geq 2^{v_2(x+n)}\\geq 2^{v_2((n+1)\\ldots (n+n))}=2^n.$$\nBut it is very easy to see that for our $n$ we have $2^n>100 n^5$, finishing the proof.","subject":"number theory"}
{"id":"N50","problem":"A function $f:\\mathbf{N}\\to \\mathbf{N}$ has the property that\n$\\gcd(f(m), f(n))=1$ whenever $\\gcd(m,n)=1$, and $n\\leq f(n)\\leq n+2012$ for all $n$. Prove that if $n>1$ then\nany prime divisor of $f(n)$ is a prime divisor of $n$.","proof":"We start by proving that $f$ has many fixed points, more precisely we prove the existence of\nan infinite sequence $1<j_1<j_2<...$ of pairwise relatively prime integers such that $f(j_k)=j_k$ for all $k$.\nConsider the sequence $(a_n)$ defined by $a_1=2013!+1$ and $a_{i+1}=a_i!+1$ for $i\\geq 1$.\nThen clearly $a_1, a_2,...$ are pairwise relatively prime, so $f(a_1), f(a_2),...$ are also pairwise relatively prime.\nSince\n$0\\leq f(a_i)-a_i\\leq 2012$ for all $i$, there is $k\\in \\{0,1,...,2012\\}$ and an infinite sequence\n$i_1<i_2<...$ such that $f(a_{i_1})-a_{i_1}=f(a_{i_2})-a_{i_2}=...=k$.\nSince $k+1\\mid a_i-1=a_{i-1}!$ for $i\\geq 2$ (note that $a_j>2013$ for all $j$),\nwe have $k+1\\mid a_{i_j}+k=f(a_{i_j})$ for all $j\\geq 2$. Since $f(a_{i_2})$ and\n$f(a_{i_3})$ are relatively prime, this forces $k=0$ and so we can take\n$j_1=a_{i_1}, j_2=a_{i_2},...$, establishing the desired result.\nNote that\nsince $j_1, j_2,...$ are pairwise relatively prime, for any $N>1$ there are infinitely many $k$ such that\n$\\gcd(j_k, N)=1$.\n\nLet now $n>1$ and let $p$ be a prime factor of $f(n)$. Suppose that $p$ does not divide $n$. By the previous paragraph\nwe can find pairwise relatively prime numbers\n$q_1<...<q_{2012}$ which are relatively prime to $pn\\cdot 2012!$ and satisfy $f(q_i)=q_i$ for $1\\leq i\\leq 2012$.\nBy the Chinese remainder theorem there is an integer\n$a>1$ such that $a\\equiv 0\\pmod p$, $a\\equiv 1\\pmod n$ and\n$a\\equiv -i\\pmod {q_i}$ for $1\\leq i\\leq 2012$. Since $\\gcd(a,n)=1$ and\n$p\\mid \\gcd(a, f(n))$, we cannot have $f(a)=a$, thus\n$f(a)=a+i$ for some $1\\leq i\\leq 2012$. Then\n$$\\gcd(f(q_i), f(a))=\\gcd(q_i, a+i)>1,$$\nwhich gives\n$\\gcd(q_i, a)>1$. Combined with the congruence\n$a\\equiv -i\\pmod {q_i}$, this yields $\\gcd(q_i, i)>1$, which is impossible since\n$\\gcd(q_i, 2012!)=1$. Thus $p$ must divide $n$ and the result follows.","subject":"number theory"}