Double Counting Notes by Victoria Krakovna

by SomeonecoolLovesMaths, Mar 12, 2025, 2:46 PM

In many combinatorics problems, it is useful to count a quantity in two ways. Let’s start with a simple example.

$\textbf{Example 1.}$ (Iran 2010 \#2) There are $n$ points in the plane such that no three of them are collinear. Prove that the number of triangles, whose vertices are chosen from these $n$ points and whose area is $1$, is not greater than $\frac{2}{3}(n^2 - n)$.

$\textit{Solution.}$ Let the number of such triangles be $k$. For each edge between two points in the set we count the number of triangles it is part of. Let the total number over all edges be $T$.

On the one hand, for any edge $AB$, there are at most $4$ points such that the triangles they form with $A$ and $B$ have the same area. This is because those points have to be the same distance from line $AB$, and no three of them are collinear. Thus, $T \leq 4\binom{n}{2}$. On the other hand, each triangle has $3$ edges, so $T \geq 3k$. Thus,
\[
k \leq \frac{T}{3} \leq \frac{4}{3} \binom{n}{2} = \frac{2}{3}(n^2 - n).
\]
It’s a good idea to consider double counting if the problem involves a pairing like students and committees, or an array of numbers; it’s also often useful in graph theory problems.

$\textbf{Example 2.}$ (IMO 1987 #1) Let $p_n(k)$ be the number of permutations of the set $\{1, 2, 3, \dots, n\}$ which have exactly $k$ fixed points. Prove that
\[
\sum_{k=0}^{n} k \cdot p_n(k) = n!.
\]
$\textit{Solution.}$ The first idea that might occur here would be to find $p_n(k)$, then multiply it by $k$, sum it up… probably resulting in a big expression. However, if we look at the required result, we see that it suggests a natural counting — the left-hand side is the total number of fixed points over all permutations. Another way to obtain that is to consider that each element of $\{1, 2, 3, \dots, n\}$ is a fixed point in $(n-1)!$ permutations, so the total is $n(n - 1)! = n!$. (Note that we are counting pairs of the form (point, permutation) such that the point is a fixed point of the permutation.) $\square$

$\bigskip$

$\textbf{Example 3.}$ (China Hong Kong MO 2007) In a school there are 2007 girls and 2007 boys. Each student joins no more than 100 clubs in the school. It is known that any two students of opposite genders have joined at least one common club. Show that there is a club with at least 11 boys and 11 girls.

$\textit{Solution.}$ Since we are only given information about club membership of students of different gender, this suggests that we should consider triples of the form (boy, girl, club), where the boy and girl both attend the club. Let the total number of such triples be $T$.

For each pair (boy, girl), we know that they attend at least one club together, so since there are $2007^2$ such pairs,
\[
T \ge 2007^2 \cdot 1.
\]
Assume that there is no club with at least 11 boys and 11 girls. Let $X$ be the number of triples involving clubs with at most 10 boys, and $Y$ be the number of triples involving clubs with at most 10 girls. Since any student is in at most 100 clubs, the number of (girl, club) pairs is at most $2007 \cdot 100$, so $X \le 2007 \cdot 100 \cdot 10$. Similarly, $Y \le 2007 \cdot 100 \cdot 10$. Then,
\[
2007^2 \le T \le X + Y \le 2 \cdot 2007 \cdot 1000 = 2007 \cdot 2000
\]which is a contradiction. $\square$

$\textbf{Theorem: } \textit{(Fermat’s Little Theorem)}$ If $a$ is an integer and $p$ is a prime, then
\[
a^p \equiv a \pmod{p}.
\]
$\textit{Proof.}$ Consider the set of strings of length $p$ using an alphabet with $a$ different symbols. Note that these strings can be separated into equivalence classes, where two strings are equivalent if they are rotations of each other. Here is an example of such an equivalence class (called a "necklace") for $p = 5$:
\[
\{ \text{BCCCB}, \text{CCBCB}, \text{CBBCC}, \text{BBCCC}, \text{CCCBB} \}.
\]
Let’s call a string with at least two distinct symbols in it \textit{non-trivial}. All the rotations of a non-trivial string are distinct — since $p$ is prime, a string cannot consist of several identical substrings of size greater than $1$. Thus, all the equivalence classes have size $p$, except for those formed from a trivial string, which have size $1$.

Thus, there are two ways to count the number of non-trivial strings. Since there are $a^p$ strings in total, $a$ of which are trivial, we have $a^p - a$ non-trivial strings. Also, the number of non-trivial strings is $p$ times the number of equivalence classes formed by non-trivial strings. Therefore, $p$ divides $a^p - a$. $\square$


might contain mistakes

Every Inequality you will need! (Might contain mistakes)

by SomeonecoolLovesMaths, Feb 21, 2025, 1:49 PM

$$\text{Useful Inequalities} $$
$$\text{\textbf{Cauchy–Schwarz}}$$$$
\left(\sum_{i=1}^n x_i y_i\right)^2 \le \left(\sum_{i=1}^n x_i^2\right)
\left(\sum_{i=1}^n y_i^2\right).
$$
$$\text{\textbf{Minkowski for }} p\ge 1 $$$$
\left(\sum_{i=1}^n |x_i+y_i|^p\right)^{\frac{1}{p}} \le
\left(\sum_{i=1}^n |x_i|^p\right)^{\frac{1}{p}} +
\left(\sum_{i=1}^n |y_i|^p\right)^{\frac{1}{p}}.
$$
$$\text{\textbf{Hölder for }} p,q>1,\; \frac{1}{p}+\frac{1}{q}=1$$$$
\sum_{i=1}^n |x_i y_i| \le
\left(\sum_{i=1}^n |x_i|^p\right)^{\frac{1}{p}}
\left(\sum_{i=1}^n |y_i|^q\right)^{\frac{1}{q}}.
$$
$$\text{\textbf{Bernoulli}}$$$$
(1+x)^r \ge 1+rx,\quad x\ge -1,\; r\in\mathbb{R}\setminus(0,1).
$$$$
\text{(Reverse for } r\in[0,1]\text{)}
$$
$$
(1+x)^r \le \frac{1}{1-rx},\quad x\in\left[-1,\frac{1}{r}\right),\; r\ge 0.
$$
$$
(1+x)^r \le 1 + \left(\frac{x}{x+1}\right)^r,\quad x\ge 0.
$$
$$
(1+x)^r \le 1 + (2r-1)x,\quad x\in[0,1],\; r\in\mathbb{R}\setminus(0,1).
$$
$$
(1+nx)^{n+1} \ge \Bigl(1+(n+1)x\Bigr)^n,\quad x\ge 0,\; n\in\mathbb{N}.
$$
$$
(a+b)^n \le a^n + nb\,(a+b)^{n-1},\quad a,b\ge 0,\; n\in\mathbb{N}.
$$
$$\text{\textbf{Exponential Approximation}}$$$$
e^x \ge \left(1+\frac{x}{n}\right)^n \ge 1+x.
$$
$$
\left(1+\frac{x}{n}\right)^n \ge e^x\left(1-\frac{x^2}{n}\right),\quad n\ge 1,\; |x|\le n.
$$
$$
\frac{x^n}{n!}+1 \le e^x \le \left(1+\frac{x}{n}\right)^{n+\frac{x}{2}},\quad x,n>0.
$$$$
e^x \ge \left(e^{\frac{x}{n}}\right)^n,\quad x,n>0.
$$$$\text{\textbf{Algebraic and Exponential Inequalities}}$$$$
xy + yx > 1, \quad xy > \frac{x}{x+y}, \quad e^x > \left(1+\frac{x}{y}\right)^y > e^{\frac{xy}{x+y}}, \quad x^y \ge e^{\frac{x-y}{x}}, \quad x,y>0.
$$$$
\frac{1}{2-x} < x^x < x^2 - x + 1, \quad e^{2x} \le 1+x^{1-x}, \quad x\in (0,1).
$$$$
x^{\frac{1}{r}}(x-1) \le r\,x\Bigl(x^{\frac{1}{r}}-1\Bigr), \quad x,r\ge 1, \quad 2^{-x} \le 1 - x^2, \quad x\in[0,1].
$$$$
x\,e^x \ge x+ x^2 + \frac{x^3}{2}, \quad e^x \le x+ e^{x^2}, \quad e^x+e^{-x} \le 2e^{\frac{x^2}{2}}, \quad x\in\mathbb{R}.
$$$$
e^{-x} \le 1 - x^2, \quad x\in [0,1.59], \quad e^x \le 1+x+x^2, \quad x<1.79.
$$$$
\left(1+\frac{x}{p}\right)^p \ge \left(1+\frac{x}{q}\right)^q, \quad \text{for } 
\begin{cases}
x>0,\; p>q>0, \\ 
-p < -q < x < 0, \\ 
-q > -p > x > 0.
\end{cases}
$$$$
\text{Reversed for } q<0<p, -q>x>0, \quad \text{and } q<0<p, -p<x<0.
$$
$$\text{\textbf{Logarithmic and Harmonic Inequalities}}$$$$
\frac{x}{1+x} \le \ln(1+x) \le \frac{x(6+x)}{6+4x} \le x, \quad x>-1.
$$$$
\frac{2}{2+x} \le \frac{1}{\sqrt{1+x+\frac{x^2}{12}}} \le \frac{\ln(1+x)}{x} \le \frac{1}{\sqrt{x+1}} \le \frac{2+x}{2+2x}, \quad x>-1.
$$$$
\ln(n)+\frac{1}{n+1} < \ln(n+1) < \ln(n) + \frac{1}{n} \le \sum_{i=1}^n \frac{1}{i} \le \ln(n)+1, \quad n\ge 1.
$$$$
|\ln x| \le \frac{1}{2}\left|\frac{x-1}{x}\right|, \quad \ln(x+y) \le \ln x + \frac{y}{x}, \quad \ln x \le y\Bigl(x^{\frac{1}{y}}-1\Bigr), \quad x,y>0.
$$$$
\ln(1+x) \ge x-\frac{x^2}{2}, \quad x\ge 0, \quad \ln(1+x) \ge x-x^2, \quad x\ge -0.68.
$$
$$\text{\textbf{Trigonometric and Hyperbolic Inequalities}}$$$$
x-\frac{x^3}{2} \le x\cos x \le x\cos\left(x^{1-\frac{x^2}{3}}\right) \le x^3\sqrt{\cos x} \le x-\frac{x^3}{6} \le x\cos x\sqrt{3} \le \sin x.
$$$$
x\cos x \le x^3\sinh^2 x \le x\cos^2\left(\frac{x}{2}\right) \le \sin x \le \frac{x\cos x+ 2x}{3} \le x^2\sinh x.
$$$$
\max\left\{\frac{2}{\pi},\frac{\pi^2-x^2}{\pi^2+x^2}\right\} \le \frac{\sin x}{x} \le \cos^2 x \le 1 \le 1+\frac{x^2}{3} \le \frac{\tan x}{x}, \quad x\in\left[0,\frac{\pi}{2}\right].
$$$$\text{\textbf{Power Mean, AM-GM, and Related Inequalities}}$$$$
\left( \frac{x_1^p + x_2^p + \dots + x_n^p}{n} \right)^{\frac{1}{p}} \ge 
\left( \frac{x_1^q + x_2^q + \dots + x_n^q}{n} \right)^{\frac{1}{q}}, 
\quad \text{for } p > q.
$$$$
\frac{x_1 + x_2 + \dots + x_n}{n} \ge \sqrt[n]{x_1 x_2 \dots x_n} \ge 
\frac{n}{\frac{1}{x_1} + \frac{1}{x_2} + \dots + \frac{1}{x_n}}.
$$$$
\frac{x+y}{2} \ge \sqrt{xy} \ge \frac{2xy}{x+y}, \quad x, y > 0.
$$$$
\frac{x+y+z}{3} \ge \sqrt[3]{xyz} \ge \frac{3xyz}{xy+yz+zx}.
$$$$
\frac{x^r+y^r}{2} \ge \left( \frac{x+y}{2} \right)^r, \quad x, y > 0, \; r \ge 1.
$$
$$\text{\textbf{Jensen’s Inequality (Convex Functions)}}$$$$
\varphi \left( \sum_{i=1}^{n} p_i x_i \right) \leq \sum_{i=1}^{n} p_i \varphi(x_i),
\quad \text{for convex } \varphi \text{ and } p_i \geq 0, \sum p_i = 1.
$$
$$\text{\textbf{Chebyshev’s Inequality (Monotonic Functions)}}$$$$
\sum_{i=1}^{n} f(x_i) g(x_i) p_i \geq 
\left( \sum_{i=1}^{n} f(x_i) p_i \right) 
\left( \sum_{i=1}^{n} g(x_i) p_i \right),
$$$$
\text{for } x_1 \leq x_2 \leq \dots \leq x_n, \text{ with } f, g \text{ increasing}.
$$
$$\text{\textbf{Rearrangement Inequality}}$$$$
\sum_{i=1}^{n} a_i b_{\sigma(i)} \geq \sum_{i=1}^{n} a_i b_{\tau(i)},
$$$$
\text{for } a_1 \leq a_2 \leq \dots \leq a_n \text{ and } b_1 \leq b_2 \leq \dots \leq b_n,
$$$$
\text{where } \sigma \text{ is the identity permutation and } \tau \text{ any other permutation}.
$$
$$\text{\textbf{Majorization Inequality}}$$$$
\sum_{i=1}^{n} \varphi(a_i) \geq \sum_{i=1}^{n} \varphi(b_i),
$$$$
\text{if } a \text{ majorizes } b, \text{ and } \varphi \text{ is convex}.
$$
$$\text{\textbf{Generalized Nesbitt’s Inequality}}$$$$
\sum_{i=1}^{n} \frac{x_i}{x_{i+1} + x_{i+2} + \dots + x_{i+k}} \geq 
\frac{n}{k}, \quad x_i > 0.
$$
$$\text{\textbf{Weighted AM-GM Inequality}}$$$$
w_1 x_1 + w_2 x_2 + \dots + w_n x_n \geq x_1^{w_1} x_2^{w_2} \dots x_n^{w_n},
$$$$
\text{where } w_i \geq 0, \sum w_i = 1, \text{ and } x_i > 0.
$$
$$\text{\textbf{Weighted Power Mean Inequality}}$$$$
\left( \sum w_i x_i^p \right)^{\frac{1}{p}} \geq \left( \sum w_i x_i^q \right)^{\frac{1}{q}},
\quad \text{for } p > q.
$$
$$\text{\textbf{Karamata’s Inequality (Convex Functions and Majorization)}}$$$$
\sum_{i=1}^{n} \varphi(a_i) \geq \sum_{i=1}^{n} \varphi(b_i),
$$$$
\text{if } a \text{ majorizes } b, \text{ and } \varphi \text{ is convex}.
$$$$\text{\textbf{Inequalities in Probability and Statistics}}$$$$
\Pr(|X| \geq a) \leq \frac{E[|X|]}{a}, \quad a > 0 \quad \text{(Markov's Inequality)}
$$$$
\Pr(|X - E[X]| \geq t) \leq \frac{\operatorname{Var}(X)}{t^2}, \quad t > 0 \quad \text{(Chebyshev's Inequality)}
$$$$
\Pr(|X - \mathbb{E}[X]| \geq \delta) \leq 2\exp\left(-\frac{2\delta^2}{\sum_{i=1}^{n} (b_i - a_i)^2}\right),
$$$$
\text{for independent } X_i \text{ with } X_i \in [a_i, b_i] \quad \text{(Hoeffding's Inequality)}.
$$
$$\text{\textbf{Bernstein’s Inequality}}$$$$
\Pr\left(S_n - E[S_n] \geq t\right) \leq \exp\left(\frac{-t^2}{2(\sigma^2 + Rt/3)}\right),
$$$$
\text{for i.i.d. } X_i \text{ with } |X_i - E[X_i]| \leq R \text{ and variance } \sigma^2.
$$
$$\text{\textbf{Chernoff Bound (Multiplicative Form)}}$$$$
\Pr(S_n \geq (1+\delta)E[S_n]) \leq \exp\left(-\frac{\delta^2}{2+\delta} E[S_n]\right),
$$$$
\Pr(S_n \leq (1-\delta)E[S_n]) \leq \exp\left(-\frac{\delta^2}{2} E[S_n]\right),
$$$$
\text{for independent } X_i \text{ taking values in } [0,1].
$$
$$\text{\textbf{Azuma’s Inequality}}$$$$
\Pr(|S_n - E[S_n]| \geq t) \leq 2\exp\left(-\frac{t^2}{2 \sum_{i=1}^{n} c_i^2}\right),
$$$$
\text{for a martingale } S_n \text{ with bounded differences } |S_i - S_{i-1}| \leq c_i.
$$
$$\text{\textbf{Gibb’s Inequality (Relative Entropy)}}$$$$
\sum_{i=1}^{n} p_i \ln \frac{p_i}{q_i} \geq 0, \quad \text{for probability distributions } \{p_i\}, \{q_i\}.
$$
$$\text{\textbf{Jensen’s Inequality (Convex Functions in Expectation)}}$$$$
\varphi(\mathbb{E}[X]) \leq \mathbb{E}[\varphi(X)],
$$$$
\text{for convex } \varphi.
$$
$$\text{\textbf{Fano’s Inequality (Information Theory)}}$$$$
H(Y|X) \leq h_b(P_e) + P_e \log(|\mathcal{Y}| - 1),
$$$$
\text{where } P_e \text{ is the probability of classification error}.
$$
$$\text{\textbf{Stirling’s Approximation}}$$$$
\sqrt{2\pi n} \left(\frac{n}{e}\right)^n \leq n! \leq e \sqrt{2\pi n} \left(\frac{n}{e}\right)^n.
$$$$
\text{Asymptotic form: } n! \sim \sqrt{2\pi n} \left(\frac{n}{e}\right)^n.
$$
$$\text{\textbf{Entropy Inequalities}}$$$$
H(X) \leq \log|\mathcal{X}|,
$$$$
H(X) \geq \sum_{i=1}^{n} p_i \log \frac{1}{p_i} = -\sum p_i \log p_i.
$$
$$\text{\textbf{Log-Sum Inequality}}$$$$
\sum_{i=1}^{n} p_i \log \frac{p_i}{q_i} \geq \left(\sum_{i=1}^{n} p_i\right) \log \frac{\sum_{i=1}^{n} p_i}{\sum_{i=1}^{n} q_i}.
$$
$$\text{\textbf{Generalized Mean Inequalities (Hölder’s Inequality for Sums)}}$$$$
\left( \sum_{i=1}^{n} p_i |x_i|^p \right)^{\frac{1}{p}} \geq \left( \sum_{i=1}^{n} p_i |x_i|^q \right)^{\frac{1}{q}}, \quad \text{for } p > q.
$$
$$\text{\textbf{Subadditivity of Entropy}}$$$$
H(X, Y) \leq H(X) + H(Y).
$$
$$\text{\textbf{Pinsker’s Inequality (Total Variation Distance and KL Divergence)}}$$$$
D_{\text{KL}}(P||Q) \geq \frac{1}{2} ||P - Q||_{\text{TV}}^2.
$$
This post has been edited 3 times. Last edited by SomeonecoolLovesMaths, Feb 21, 2025, 2:11 PM

Has anyone done this?

by SomeonecoolLovesMaths, Feb 21, 2025, 1:13 PM

1. Find all surjective functions \( f : \mathbb{N} \to \mathbb{N} \) such that
\[
f(n) \ge n + (-1)^n,\quad \forall n \in \mathbb{N}.
\]
2. Find all functions \( g : \mathbb{R} \to \mathbb{R} \) such that for any real numbers \( x \) and \( y \)
\[
g(x+y) + g(x)g(y) = g(xy) + g(x) + g(y).
\]
3. Find all real valued functions defined on \(\mathbb{R}\) such that for every real \( x, y \)
\[
f(x^2-y^2) = xf(x) - yf(y).
\]
4. Find all real valued functions defined on \(\mathbb{R}\) such that for every real \( x, y \)
\[
f\bigl(xf(x) + f(y)\bigr) = f(x)^2 + y.
\]
5. Find all functions \( f : \mathbb{N} \to \mathbb{N} \) such that
\[
f(f(n)) + (f(n))^2 = n^2 + 3n + 3,\quad \forall n\in\mathbb{N}.
\]
6. Let \( n \) be a positive integer. Find all strictly increasing functions \( f : \mathbb{N}^* \to \mathbb{N}^* \) such that the equation
\[
\frac{f(x)}{n} = k - x
\]has an integral solution \( x \) for all \( k \in \mathbb{N} \).

7. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that
\[
f\Bigl(\frac{x+y}{2}\Bigr) = \frac{2f(x)f(y)}{f(x)+f(y)} \quad \forall x,y \in \mathbb{R}^+.
\]
8. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(1-x) = 1 - f(f(x)) \quad \forall x \in \mathbb{R}.
\]
9. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that
\[
f(1+xf(y)) = yf(x+y) \quad \forall x,y \in \mathbb{R}^+.
\]
10. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that
\[
f(xf(y)) = f(x+y) \quad \forall x,y \in \mathbb{R}^+.
\]
11. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)+y\bigr) = f\bigl(x^2-y\bigr) + 4yf(x) \quad \forall x,y \in \mathbb{R}.
\]
12. Find all functions \( f,\, g,\, h : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x+y) + g(x-y) = 2h(x) + 2h(y) \quad \forall x,y \in \mathbb{R}.
\]
13. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x+y+z) = f(x) \cdot f(1-y) + f(y) \cdot f(1-z) + f(z) \cdot f(1-x) \quad \forall x,y,z \in \mathbb{R}.
\]
14. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)-f(y)\bigr) = (x-y)^2\,f(x+y) \quad \forall x,y \in \mathbb{R}.
\]
15. Find all functions \( f,\, g : \mathbb{R} \to \mathbb{R} \) such that
If \( x < y \), then \( f(x) < f(y) \);
For all \( x,y \in \mathbb{R} \), we have
\[
    f(xy) = g(y)f(x) + f(y).
    \]16. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl((x+z)(y+z)\bigr) = \bigl(f(x)+f(z)\bigr)\bigl(f(y)+f(z)\bigr) \quad \forall x,y,z \in \mathbb{R}.
\]
17. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) that satisfy
\[
f(x^3+y^3) = x^2f(x) + yf(y^2) \quad \forall x,y \in \mathbb{R}.
\]
18. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) that satisfy
\[
f(m+nf(m)) = f(m) + m\,f(n) \quad \forall m,n \in \mathbb{R}.
\]
19. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x)\,f(y) = f(x+y) + xy \quad \forall x,y \in \mathbb{R}.
\]
20. Find all functions \( f : \mathbb{N}\cup\{0\} \to \mathbb{N}\cup\{0\} \) such that
\[
x\cdot 3f(y) \text{ divides } f(x)\cdot 3y \quad \forall x,y \in \mathbb{N}\cup\{0\}.
\]
21. Find all continuous functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x+y)\,f(x-y) = \bigl(f(x)f(y)\bigr)^2 \quad \forall x,y \in \mathbb{R}.
\]
22. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
(x+y)\Bigl(f(x)-f(y)\Bigr) = (x-y)f(x+y) \quad \forall x,y \in \mathbb{R}.
\]
23. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)+y\bigr) = f\bigl(x^2-y\bigr) + 4f(x)y \quad \forall x,y \in \mathbb{R}.
\]
24. Find all functions \( f : \mathbb{Z} \to \mathbb{R} \) such that
\[
f(m+n-mn) = f(m)+f(n)-f(mn) \quad \forall m,n \in \mathbb{Z}.
\]
25. Find all functions \( f : (0,1) \to (0,1) \) such that \( f\Bigl(\frac{1}{2}\Bigr) = \frac{1}{2} \) and
\[
\Bigl(f(ab)\Bigr)^2 = \Bigl(af(b)+f(a)\Bigr)\Bigl(bf(a)+f(b)\Bigr) \quad \forall a,b \in (0,1).
\]
26. Find all functions \( f : \mathbb{Q} \to \mathbb{Q} \) such that
\[
f(x+y+f(x)) = x+f(x)+f(y) \quad \forall x,y \in \mathbb{Q}.
\]
27. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x^2+f(y)) = (x-y)^2\,f(x+y) \quad \forall x,y \in \mathbb{R}.
\]
28. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
\begin{cases}
f(x+y)=f(x)+f(y), & \forall x,y \in \mathbb{R},\\[1mm]
f(x)=x^2\,f\Bigl(\frac{1}{x}\Bigr), & \forall x\in \mathbb{R}\setminus\{0\}.
\end{cases}
\]
29. Let \( a>\frac{3}{4} \) be a real number. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(f(x)) + a = x^2 \quad \forall x \in \mathbb{R}.
\]
30. Find all injective functions \( f : \mathbb{N} \to \mathbb{N} \) which satisfy
\[
f(f(n)) \le \frac{n+f(n)}{2} \quad \forall n \in \mathbb{N}.
\]
31. Find all continuous functions \( f(x),\, g(x),\, q(x) : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x^2)+f(y^2) = \Bigl[q(x)-q(y)\Bigr]\,g(x+y) \quad \forall x,y \in \mathbb{R}.
\]
32. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) so that
\[
f(x+y)+f(x-y)=2f(x)\cos y \quad \forall x,y \in \mathbb{R}.
\]
33. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x-f(y)) = f(x) + x\,f(y) + f(f(y)) \quad \forall x,y \in \mathbb{R}.
\]
34. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that
\[
f(f(x)) = 6x - f(x) \quad \forall x \in \mathbb{R}^+.
\]
35. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x+y)+f(xy)+1 = f(x)+f(y)+f(xy+1) \quad \forall x,y \in \mathbb{R}.
\]
36. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
x^2y^2\Bigl(f(x+y)-f(x)-f(y)\Bigr) = 3(x+y)f(x)f(y) \quad \forall x,y \in \mathbb{R}.
\]
37. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(x^3+y^3\bigr) = x\,f(x^2) + y\,f(y^2) \quad \forall x,y \in \mathbb{R}.
\]
38. Find all functions \( f : \mathbb{Q} \to \mathbb{R} \) such that
\[
\lvert f(x)-f(y) \rvert \le (x-y)^2 \quad \forall x,y \in \mathbb{Q}.
\]
39. Find all functions \( f : \mathbb{R} \to \mathbb{R}^+ \) such that
\[
f(x+y)=f(x^2+y^2) \quad \forall x \in \mathbb{R}^+.
\]
40. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
x^2y^2\Bigl(f(x+y)-f(x)-f(y)\Bigr)=3(x+y)f(x)f(y) \quad \forall x,y \in \mathbb{R}.
\]
41. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)+f(y)+f(z)\bigr)=f\bigl(f(x)-f(y)\bigr)+f\bigl(2xy+f(z)\bigr)+2f(xz-yz) \quad \forall x,y \in \mathbb{R}.
\]
42. Find all functions \( f : \mathbb{N} \to \mathbb{N} \) such that
\[
m^2+f(n) \mid f(m)^2+n \quad \forall m,n \in \mathbb{N}.
\]
43. Let \( n \) be a positive integer. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x+f(y)) = f(x)+y^n \quad \forall x,y \in \mathbb{R}.
\]
44. Find all functions \( f : \mathbb{N} \to \mathbb{N} \) such that
\[
3f\bigl(f(f(n))\bigr) + 2f\bigl(f(n)\bigr) + f(n) = 6n \quad \forall n \in \mathbb{N}.
\]
45. Find all functions \( f : \mathbb{N}^* \to \mathbb{N}^* \) satisfying
\[
\Bigl(f^2(m)+f(n)\Bigr) \mid \Bigl(m^2+n^2\Bigr)^2 \quad \forall m,n \in \mathbb{N}^*.
\]
46. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that
\[
f\Bigl(\frac{2xy}{x+y}\Bigr) = \frac{2f(x)f(y)}{f(x)+f(y)} \quad \forall x,y \in \mathbb{R}^+.
\]
47. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(xy) = \max\{f(x),y\} + \min\{f(y),x\} \quad \forall x,y \in \mathbb{R}.
\]
48. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
\begin{cases}
f(x+f(y)) = y+f(x) & \forall x,y \in \mathbb{R}, \\
\{f(x)/x : x \in \mathbb{R}\} \text{ is finite.}
\end{cases}
\]
49. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)+f(y)\bigr)+f\bigl(f(x)\bigr)=2f(x)+y \quad \forall x,y \in \mathbb{R}.
\]
50. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\Bigl(x^2(z^2+1)+f(y)(z+1)\Bigr)=1-f(z)(x^2+f(y))-z\Bigl((1+z)x^2+2f(y)\Bigr) \quad \forall x,y,z \in \mathbb{R}.
\]
51. Prove that there is no bijective function \( f : \{1,2,3,\dots\} \to \{0,1,2,3,\dots\} \) such that
\[
f(mn)=f(m)+f(n)+3f(m)f(n).
\]
52. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(x-f(y)\bigr)=f\bigl(f(y)\bigr)+x\,f(y)+f(x)-1 \quad \forall x,y \in \mathbb{R}.
\]
53. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(xf(x+y)\bigr)=f\bigl(yf(x)\bigr)+x^2 \quad \forall x,y \in \mathbb{R}.
\]
54. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\Bigl(x^2+\frac{x}{3}+\frac{1}{9}\Bigr)=f(x) \quad \forall x \in \mathbb{R}.
\]
55. Given \(0<p<2\), find all continuous functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)\bigr)=f(x)+px \quad \forall x \in \mathbb{R}.
\]
56. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(x+xy+f(y)\bigr)=\Bigl(f(x)+\frac{1}{2}\Bigr)\Bigl(f(y)+\frac{1}{2}\Bigr) \quad \forall x,y \in \mathbb{R}.
\]
57. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)+y\bigr)=f(x+y)+x\,f(y)-xy-x+1 \quad \forall x,y \in \mathbb{R}.
\]
58. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
x\Bigl(f(x)+f(-x)+2\Bigr)+2f(-x)=0 \quad \forall x \in \mathbb{R}.
\]
59. Find all non-decreasing functions \( f : \mathbb{R}^+ \cup \{0\} \to \mathbb{R}^+ \cup \{0\} \) such that for each \( x,y \in \mathbb{R}^+ \cup \{0\} \)
\[
f\Bigl(x+f(x)^2+y\Bigr)=2x-f(x)+f\bigl(f(y)\bigr).
\]
60. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
(1+f(x)f(y))\,f(x+y)=f(x)+f(y) \quad \forall x,y \in \mathbb{R}.
\]
61. For the function \( f : \mathbb{R} \to \mathbb{R} \) given by
\[
f(x^2+x+3)+2\,f(x^2-3x+5)=6x^2-10x+17,
\]calculate \( f(2009) \).

62. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\Bigl(f(x)y+\frac{x}{y}\Bigr)=(f(x))^n+y+f(y) \quad \forall x,y \in \mathbb{R},\; n\in\mathbb{Z}_{\ge2}.
\]
63. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x^2+y^2)=f(x^2)+f(y^2)+2f(x)f(y) \quad \forall x,y \in \mathbb{R}.
\]
64. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x+y)f(x-y) = \Bigl(f(x)+f(y)\Bigr)^2 - 4x^2f(y) \quad \forall x,y \in \mathbb{R}.
\]
65. Find all injective functions \( f : \mathbb{N} \to \mathbb{R} \) such that
\[
f(1)=2,\quad f(2)=4,\quad \text{and}\quad f\bigl(f(m)+f(n)\bigr)=f\bigl(f(m)\bigr)+f(n) \quad \forall m,n \in \mathbb{N}.
\]
66. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that for any real numbers \( a,b,c,d>0 \) with \( abcd=1 \), we have
\[
\Bigl(f(a)+f(b)\Bigr)\Bigl(f(c)+f(d)\Bigr)=(a+b)(c+d).
\]
67. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x^2)\Bigl(f(x)^2+f\Bigl(\frac{1}{y^2}\Bigr)\Bigr)=1+f\Bigl(\frac{1}{xy}\Bigr) \quad \forall x,y \in \mathbb{R}\setminus\{0\}.
\]
68. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)-f(y)\bigr)=f\bigl(f(x)\bigr)-2x^2f(y)+f(y^2) \quad \forall x,y \in \mathbb{R}.
\]
69. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that
\[
f(x+1)=f(x)+1 \quad \text{and} \quad f\Bigl(\frac{1}{f(x)}\Bigr)=\frac{1}{x} \quad \forall x \in \mathbb{R}^+.
\]
70. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x+f(x)f(y))=f(x)+x\,f(y) \quad \forall x,y \in \mathbb{R}.
\]
71. Find all continuous functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x)+f(y)-f(x+y)=xy \quad \forall x,y \in \mathbb{R}.
\]72. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x^2+y^2) = f\bigl(f(x)\bigr) + f(xy) + f\bigl(f(y)\bigr) \quad \forall x,y \in \mathbb{R}.
\]
73. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that
\[
(x+y)f\bigl(f(x)y\bigr) = x^2f\bigl(f(x)+f(y)\bigr) \quad \forall x,y \in \mathbb{R}^+.
\]
74. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x+y^2) \ge (y+1)f(x) \quad \forall x,y \in \mathbb{R}.
\]
75. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x)f(y) \le f(xy) \quad \text{and} \quad f(x)+f(y) \le f(x+y) \quad \forall x,y \in \mathbb{R}.
\]
76. Find all functions \( f : \mathbb{Q} \to \mathbb{R}^+ \) such that
\[
\begin{aligned}
& f(x) \ge 0 \quad \forall x \in \mathbb{Q}, \quad f(x)=0 \iff x=0,\\[1mm]
& f(xy) = f(x) \cdot f(y),\\[1mm]
& f(x+y) \le \max\{f(x),f(y)\} \quad \forall x,y \in \mathbb{Q}.
\end{aligned}
\]
77. Determine all functions \( f : \mathbb{R} \to \mathbb{R} \) satisfying
\[
xf(y) - yf(x) = f\Bigl(\frac{y}{x}\Bigr) \quad \forall x,y \in \mathbb{R} \text{ with } x \neq 0.
\]
78. Determine all functions \( f : \mathbb{N} \to \mathbb{N} \) such that
\[
\sum_{k=1}^{n} \frac{1}{f(k)\cdot f(k+1)} = \frac{f(f(n))}{f(n+1)} \quad \forall n \in \mathbb{N}.
\]
79. Find all functions \( f : \mathbb{N} \to \mathbb{N} \) such that for all \( m,n \in \mathbb{N} \),
\[
(2m+1)f(n)f(2mn) = 2m f(n)^2 + f(2mn)^2 + (2m-1)^2 n.
\]
80. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x - f(y)) = f\bigl(f(y)\bigr) - 2x f(y) + f(x) \quad \forall x,y \in \mathbb{R}.
\]
81. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)-y^2\bigr) = f(x)^2 - 2f(x)y^2 + f(y^2) \quad \forall x,y \in \mathbb{R}.
\]
82. Find all functions \( f : [0,+\infty) \to [0,+\infty) \) such that
\[
f\bigl(x+f(x)+2y\bigr) = 2x + f\bigl(2f(y)\bigr) \quad \forall x,y \in [0,+\infty).
\]
83. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x^2)+f(xy) = f(x)f(y) + yf(x) + x\,f(x+y) \quad \forall x,y \in \mathbb{R}.
\]
84. Find all functions \( f : \mathbb{Q} \to \mathbb{Q} \) such that
\[
f\bigl(x+f(x)+2y\bigr) = 2x + 2f\bigl(f(y)\bigr) \quad \forall x,y \in \mathbb{Q}.
\]
85. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
\begin{aligned}
& f\bigl(x+f(x)^2+y+f(2z)\bigr) = 2x - f(x) + f\bigl(f(f(y))\bigr) + 2f\bigl(f(z)\bigr) \quad \forall x,y,z \in \mathbb{R},\\[1mm]
& f\bigl(f(0)\bigr) = f(0).
\end{aligned}
\]
86. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) which satisfy:
\[
\begin{aligned}
& f(x+f(y)) = f(x)f(y) \quad \forall x,y>0,\\[1mm]
& \text{there are at most finitely many } x \text{ with } f(x)=1.
\end{aligned}
\]
87. Find all functions \( f : \mathbb{N} \cup \{0\} \to \mathbb{N} \cup \{0\} \) such that for all \( m,n \in \mathbb{N} \cup \{0\} \),
\[
m f(n) + n f(m) = (m+n)f\bigl(m^2+n^2\bigr).
\]
88. Find all functions \( f : (0,1) \to \mathbb{R} \) such that
\[
f(xyz) = x f(x) + y f(y) + z f(z) \quad \forall x,y,z \in (0,1).
\]
89. Find all functions \( f : \mathbb{Z} \to \mathbb{Z} \) satisfying
\[
f(x^3+y^3+z^3) = f(x)^3 + f(y)^3 + f(z)^3.
\]
90. Determine all real functions \( f(x) \) that are defined and continuous on the interval \((-1,1)\) and that satisfy the functional equation
\[
f(x+y)=\frac{f(x)+f(y)}{1-f(x)f(y)}
\]for all \( x,y,x+y \in (-1,1) \).

91. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(x^n+2f(y)\bigr) = (f(x))^n + y + f(y) \quad \forall x,y \in \mathbb{R},\; n\in \mathbb{Z}_{\ge2}.
\]
92. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x^2+y^2)=f(x^2)+f(y^2)+2f(x)f(y) \quad \forall x,y \in \mathbb{R}.
\]
93. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x+y)f(x-y)=\Bigl(f(x)+f(y)\Bigr)^2-4x^2f(y) \quad \forall x,y \in \mathbb{R}.
\]
94. Find all injective functions \( f : \mathbb{N} \to \mathbb{R} \) such that
\[
f(1)=2,\quad f(2)=4,\quad \text{and}\quad f\bigl(f(m)+f(n)\bigr)=f\bigl(f(m)\bigr)+f(n) \quad \forall m,n \in \mathbb{N}.
\]
95. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that for any real numbers \( a,b,c,d>0 \) satisfying \( abcd=1 \), we have
\[
\Bigl(f(a)+f(b)\Bigr)\Bigl(f(c)+f(d)\Bigr) = (a+b)(c+d).
\]
96. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x^2)\Bigl(f(x)^2+f\Bigl(\frac{1}{y^2}\Bigr)\Bigr)=1+f\Bigl(\frac{1}{xy}\Bigr) \quad \forall x,y \in \mathbb{R}\setminus\{0\}.
\]
97. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(f(x)-f(y)\bigr)=f\bigl(f(x)\bigr)-2x^2f(y)+f(y^2) \quad \forall x,y \in \mathbb{R}.
\]
98. Find all functions \( f : \mathbb{R}^+ \to \mathbb{R}^+ \) such that
\[
f(x+1)=f(x)+1 \quad \text{and} \quad f\Bigl(\frac{1}{f(x)}\Bigr)=\frac{1}{x} \quad \forall x \in \mathbb{R}^+.
\]
99. Find all functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f\bigl(x+f(x)f(y)\bigr)=f(x)+x\,f(y) \quad \forall x,y \in \mathbb{R}.
\]
100. Find all continuous functions \( f : \mathbb{R} \to \mathbb{R} \) such that
\[
f(x)+f(y)-f(x+y)=xy \quad \forall x,y \in \mathbb{R}.
\]
This post has been edited 1 time. Last edited by SomeonecoolLovesMaths, Feb 21, 2025, 1:18 PM

Why did I just come across this?

by SomeonecoolLovesMaths, Feb 21, 2025, 11:02 AM

$$\textbf{Jacobi's Two-Square Theorem:} \\$$Denote the number of divisors of \(n\) as \(d(n)\), and write \(d_{a}(n)\) for the number of those divisors with \(d \equiv a \pmod{4}\).

Let
\[
n \;=\; 2^f \,p_1^{r_1}\,p_2^{r_2}\,\dots\,q_1^{s_1}\,q_2^{s_2}\,\dots 
\]where \(p_i \equiv 1 \pmod{4}\) and \(q_i \equiv 3 \pmod{4}\).

Let \(r_2(n)\) be the number of ways \(n\) can be represented as the sum of two squares. Then:
\[
r_2(n) \;=\; 0 \quad \text{if any of the exponents } s_j \text{ are odd.}
\]\[
\text{If all } s_j \text{ are even, then } 
r_2(n) \;=\; 4\bigl(d_1(n)\;-\;d_3(n)\bigr).
\]$$\textbf{Lagrange's Four-Square Theorem:} \\$$Every positive integer \(n\) can be expressed as the sum of four integer squares. That is, for every \(n \in \mathbb{N}\), there exist integers \(a\), \(b\), \(c\), and \(d\) such that
\[
n = a^2 + b^2 + c^2 + d^2.
\]
This post has been edited 1 time. Last edited by SomeonecoolLovesMaths, Feb 21, 2025, 12:17 PM

Art of Random Solving

by SomeonecoolLovesMaths, Jan 27, 2025, 10:29 PM

Here are a few of my random solves:
Quote:
In a grid of unit squares, a $\emph{cucumber}$ is defined as a pair of unit squares which share a vertex but do not share a side. For which pairs of integers $(m, n)$ can an $m \times n$ rectangular grid of unit squares be tiled with cucumbers?

My Solution
Quote:
Determine all finite nonempty sets $S$ of positive integers satisfying $$\frac{i+j}{\gcd(i,j)}$$is an element of $S$ for all $i$ and $j$ (not necesarily distinct in S)

My Solution
Quote:
The numbers $p$ and $q$ are prime and satisfy
\[\frac{p}{{p + 1}} + \frac{{q + 1}}{q} = \frac{{2n}}{{n + 2}}\]for some positive integer $n$. Find all possible values of $q-p$.

My Solution
Quote:
Let $p_1, p_2, \ldots$ be a sequence of primes such that $p_1 =2$ and for $n\geq 1, p_{n+1}$ is the largest prime factor of $p_1 p_2 \ldots p_n +1$ . Prove that $p_n \not= 5$ for any $n$.

My Solution
ISL 1977 wrote:
Let $a,b$ be two natural numbers. When we divide $a^2+b^2$ by $a+b$, we the the remainder $r$ and the quotient $q.$ Determine all pairs $(a, b)$ for which $q^2 + r = 1977.$

Solution
Quote:
Find the greatest possible value of $5\cos x + 6\sin x$.

Solution
Quote:
For how many value of $n$ the $11^n+363$ is a perfect square number.

Solution
Quote:
Find all $n$ natural numbers such that for each of them there exist $p , q$ primes such that these terms satisfy.

$1.$ $p+2=q$
$2.$ $2^n+p$ and $2^n+q$ are primes.

Solution
This post has been edited 8 times. Last edited by SomeonecoolLovesMaths, Mar 6, 2025, 2:58 PM

Mathematically Absurd

by SomeonecoolLovesMaths, Jan 3, 2025, 6:52 PM

Prove that for any positive integers $a_1, a_2, \dots, a_n$,
\[ \prod_{1 \leq i < j \leq n} \frac{a_i-a_j}{i-j} \in \mathbb{Z} .\]
Proof:
We shall show that for any prime $p$
\[ v_p \left( \prod_{1 \leq i < j \leq n} (a_i-a_j) \right) \geq v_p \left( \prod_{1 \leq i < j \leq n} (i-j) \right). \]The divisibility immediately follows. Indeed, the problem statement is equivalent to showing that the quantity
\[ v_p \left( \prod_{1 \leq i < j \leq n} (a_i-a_j) \right) \]is minimised when $a_i=i$ for all $i$. To prove this we find some reasonable way of computing the above quantity.
Denote $A_{p^k} =  \{ (i,j) \mid p^k \text{ divides } a_i-a_j\} $. Then
\[ v_p \left( \prod_{1 \leq i < j \leq n} (a_i-a_j) \right) = \sum_{1 \leq i < j \leq n} v_p \left( a_i-a_j \right) = \sum_{k \geq 1} |A_{p^k}| .\]We proceed by computing the size of each individual set $A_{p^k}$. I claim the cardinality of this set is minimised when $a_i=i$ for all $i$. Indeed, let
\[ A_{(p^k, x)} = \left\{  a_i \mid a_i \equiv x \pmod{p^k} \right\} \]for $0 \leq x \leq p^k-1$. We remark that the union of $A_{(p^k, x)}$ partitions the set $\{a_1, a_2, \dots a_n\}$ because modular congruence is an equivalence relation. Moreover, $(i, j) \in A_{p^k}$ if and only if $\{a_i, a_j \} \subseteq A_{(p^k,x)}$ for some $x$. Thus
\[ |A_{p^k}| = \sum_{x=0}^{p^k-1} \binom{|A_{(p^k,x)}|}{2} .\]I claim that the above sum is minimised if there exists an integer $k$ such that $|A_{(p^k,x)}| \in \{k, k+1 \}$ for all $x$. (Note that this is very close to Jensen's Inequality.) Suppose for the sake of contradiction that the function
\[ f(a_0, a_1, \dots, a_{p^k-1} )=\sum_{x=0}^{p^k-1} \binom{a_x}{2} \]has minimal value at $(a_0, a_1, \dots , a_{p^k-1})$ that does not satisfy the above claim. Then there exists $i, j$ such that $a_i-a_j \geq 2$.
Rearrange to $a_i -a_j-2 \geq 0$ and rewrite as
\begin{align*} 0 < a_i -a_j-1 &= \frac{2(a_i-1)-2(a_j)}{2}\\
&=\frac{(a_i-1)(a_i-(a_i-2))-a_j(a_j+1-(a_j-1))}{2} \\
&= \frac{a(a_i-1)}{2}-\frac{(a_i-1)(a_i-2)}{2} -\frac{(a_j+1)a_j}{2} + \frac{a_j(a_j-1)}{2} \\
&= \binom{a_i}{2} + \binom{a_j}{2}-\binom{a_i-1}{2}-\binom{a_j+1}{2}.
\end{align*}Then
\[ \binom{a_i-1}{2} + \binom{a_j+1}{2} < \binom{a_i}{2}+\binom{a_j}{2} .\]Finally, if we assume without loss of generality that $j > i$ we conclude
\[ f(a_0, a_1, \dots ,a_{p^k-1} ) > f(a_0, a_1, \dots , a_i-1, \dots, a_j+1, \dots, a_{p^k-1} ) \]contradicting the minimality of $(a_0, a_1, \dots a_{p^k-1})$.
Because $\{ a_1 ,a_2 , \dots ,a_n \}$ is partitioned by the $A_{(p^k,x)}$, we have that
\[ |A_{(p^k,0)}|+|A_{(p^k,1)}|+\dots+|A_{(p^k,p^k-1)}|=n . \]We may say that $n$ has remainder $r$ upon Euclidean division by $p^k$. Then from our above work it follows that,
\[ |A_{p^k}|=f \left( | A_{(p^k,0)}|, |A_{(p^k,1)}|, \dots, |A_{(p^k,p^k-1)}|\right) \geq r\binom{\left\lfloor \frac{n}{p^k}\right\rfloor +1 }{2} + (p^k-r)\binom{\left\lfloor \frac{n}{p^k}\right\rfloor}{2}. \]It remains to show that this value is taken when $a_i=i$. For that case, we define $A_{p^k}^{\star}=\{ (i,j) \mid p^k \text{ divides } i-j\}$ and $A^{\star}_{(p^k,x)}= \left\{  i \mid i \equiv x \pmod{p^k} \right\} $. It's fairly easy to see that
\[ |A_{(p^k,x)}|= \space
\begin{cases}\left\lfloor \frac{n}{p^k}\right\rfloor +1 &\text{ if } 0 \leq x \leq r \\
\left\lfloor \frac{n}{p^k}\right\rfloor & \text{ if } r < x \leq p^k-1. 
\end{cases} \]Then
\[ |A_{p^k}^{\star}|=f \left( | A_{(p^k,0)}^{\star}|, |A_{(p^k,1)}^{\star}|, \dots, |A_{(p^k,p^k-1)}^{\star}|\right) =  \sum_{x=0}^{p^k-1} \binom{|A_{(p^k,x)}^{\star}|}{2} = r\binom{\left\lfloor \frac{n}{p^k}\right\rfloor +1 }{2} + (p^k-r)\binom{\left\lfloor \frac{n}{p^k}\right\rfloor}{2} \]when $a_i=i$. Thus $A_{p^k} \geq A_{p^k}^star$.
\[ v_p \left( \prod_{1 \leq i < j \leq n} (i-j) \right) = \sum_{1 \leq i < j \leq n} v_p \left( i-j \right) = \sum_{k \geq 1} |A^{\star}_{p^k}|. \leq \sum_{k \geq 1} |A_{p^k}|= v_p \left( \prod_{1 \leq i < j \leq n} (a_i-a_j) \right) ,\]completing the proof.

Thanks to HKIS200543

2025 begins

by SomeonecoolLovesMaths, Dec 31, 2024, 7:04 PM

The year has ended and a new year has started, but has anything really changed? I hope so. Anyways.

[asy]
size(30cm);
pen[][] p={{red,yellow,green},
{magenta,orange,yellow},
{blue,red,orange}};
latticeshade(texpath("Happy New Year to all!"),p);
[/asy]

A Collection of Geometry Problems

by SomeonecoolLovesMaths, Dec 6, 2024, 9:54 AM

Here is a collection of geometry problems and solutions for new ideas:

Q1

S1

S1 by lbh_qys

Q2

S2

Q3

S3

Q4

S4

S4 by Mathzeus1024

Q5

S5

Q6

S6

Q7

S7

Q8

S8

Q9

S9
This post has been edited 12 times. Last edited by SomeonecoolLovesMaths, Jan 8, 2025, 4:47 PM

A Collection of Combinatorics Problems

by SomeonecoolLovesMaths, Dec 4, 2024, 3:52 PM

Here is a collection of combinatorics problems and solutions for new ideas:

P1

S1 (Gap Method)

Q2

S2

Comment
This post has been edited 1 time. Last edited by SomeonecoolLovesMaths, Dec 6, 2024, 4:18 PM

A Collection of Functional Equations

by SomeonecoolLovesMaths, Dec 3, 2024, 1:09 PM

Here are a few problems of Functional Equations:

Q1

S1

Q2

S2

Q3

S3
This post has been edited 3 times. Last edited by SomeonecoolLovesMaths, Dec 3, 2024, 1:22 PM

My First Blog

avatar

SomeonecoolLovesMaths
Shouts
Submit
  • I will bookmarked this blog

    by giangtruong13, Yesterday at 7:37 AM

  • W blog op

    by quasar_lord, Mar 10, 2025, 5:32 PM

  • orz blog
    how so orzzzz

    by Erratum, Jan 31, 2025, 9:47 AM

  • shouts; your post is too short , it must be atleast 8 characters

    by mqoi_KOLA, Dec 5, 2024, 6:37 PM

  • Guys it took my like 10 hours to do this! Idk why did I even do this, but now it looks kinda satisfying ngl.

    by SomeonecoolLovesMaths, Nov 25, 2024, 5:07 PM

  • add this one new thing to the intergrals that is lim n tends to infinity b-a/n summation k=1 to n f(a+k(b-a)/n))= int_{a}^b f(x) dx

    by Levieee, Nov 21, 2024, 8:37 PM

  • woahh hi HSM main orz blog!!!

    by eg4334, Nov 17, 2024, 3:31 PM

  • Me in 4 years of Aops - 555 posts.

    This guy in 10 months of Aops - 2608 posts

    by HoRI_DA_GRe8, Oct 17, 2024, 10:22 AM

  • Remember; the one who falls and gets back up is stronger than the ones who never tried... Good luck for next year's IOQM

    by alexanderhamilton124, Oct 15, 2024, 7:03 AM

  • fourth shout

    by QueenArwen, Sep 2, 2024, 4:05 PM

  • Hii
    !!!!!!!!!!!

    by Yummo, Apr 2, 2024, 2:43 PM

  • i am shouting. it is very loud.

    by fruitmonster97, Mar 21, 2024, 7:49 PM

  • real!!!!!

    by SirAppel, Mar 17, 2024, 6:22 PM

13 shouts
Tags
About Owner
  • Posts: 3139
  • Joined: Dec 22, 2023
Blog Stats
  • Blog created: Mar 17, 2024
  • Total entries: 20
  • Total visits: 1249
  • Total comments: 19
Search Blog
a