版本比较
lcm
标题
增加 1 行删除 1 行
11一篇题解lcm正文
增加 10 行删除 64 行
123456189101112131415161718192342223242526272829567323334353637383940414243444546474849891011125253541314155758161718192061626364656667686970717273747521$\#$ 已知 $f(x)$ 为定义域在 $\mathbb R$ 上的连续函数,满足有 $f(x)f(y)=f(xy)$,则有:
- $\textbf{推论 1}\,\,$ 若 $\exist\,x_0\ne0$ 使得 $f(x_0)=0$,则 $f(x)\equiv0$。- $\textbf{推论 2}\,\,$ 若 $\exist\,x_1\ne1$ 使得 $f(x_1)=1$,则 $f(x)\equiv1$。
$\text{证明:}$$$\begin{aligned}(\mathrm i)\,\,&f(x)=f\left(\frac{x}{x_0}\right)\cdot f(x_0)=0\\(\mathrm {ii})\,\,&\text{若}\,x_1\ge0\text{,则对于}\,\forall x>0\text{,总是}\,\exist k\in\mathbb R\,\text{使得}\,x=x_1^k\\&\text{构造有理数序列}\,\{k_n\}\,\text{使得}\,\lim_{n\to\infty} k_n=k\\&\because f(x)\,\text{连续}\\&\therefore f^k(x_1)=\lim_{n\to\infty} f^{k_n}(x_1)=\lim_{n\to\infty}f(x_1^{k_n})=f(x_1^k)=f(x)=1\\&\text{同理可证}\,\forall x<0\,\text{有}\,f(x)=f(-1)=\pm1\\&\text{又}\,f(x)\,\text{在}\,x=0\,\text{处连续,则:}\\&\lim_{x\to0-0}f(x)=\lim_{x\to0+0}f(x)=1\\&\text{于是}\,f(x)\equiv1\\&\text{对于}\,x_1<0\text{,则考虑}\,f(x_1^2)=f(x_1)=1\,\text{即可}\,\,\square.\end{aligned}\sum_{i=1}^n\sum_{j=1}^m\mathrm{lcm}(i,j)$$
$\#$ 考虑 $f(x)$ 不满足如上推论的条件,则有:- $\textbf{推论 3}\,\,$ 对于 $\forall x,y\in\mathbb R$,满足 $x\ne y$,有 $f(x)\ne f(y)$,即 $f$ 为单射。- $\textbf{推论 4}\,\,$ $f(x)$ 为奇函数。- $\textbf{推论 5}\,\,$ 对于任意的 $y\in\mathbb R$,总是 $\exist x\in\mathbb R$ 使得 $f(x)=y$。- $\textbf{推论 6}\,\,$ $f(x)$ 在 $[0,+\infty)$ 上为上凸函数。- $\textbf{推论 7}\,\,$ $f(x)\le x$ 对于 $\forall x\ge0$。
$\text{证明:}$令 $n\le m$。拆柿子,有:$$\begin{aligned}(\mathrm{iii})\,\,&\text{原命题}\Harr\text{若有}\,f(x)=f(y)\text{,则}\,x=y\\&\Rightarrow\frac{f(x)}{f(y)}=f\left(\frac{x}{y}\right)=1\,\,\,\,\Rightarrow\frac xy=1\\(\mathrm{iv})\,\,&\text{显然。}\\(\mathrm{v})\,\,&\text{若}\,f(x)\in[-1,1]\\&\because f(x)\cdot f(x^{-1})=1\\&\therefore f(x)=f(x^{-1})=1\\&\text{由推论 3 可知矛盾。}\\&\text{则必然}\,\exist x_0\,\text{使得}\,f(x_0^2)>f(x_0)>1\\&\Rightarrow\text{对于}\,\forall y>0\text{,必然}\,\exist k\in\mathbb R\text{,使得}\\& y=f^k(x_0^2)=f(x_0^{2k})\\&\text{对于}\,\forall y\le0\,\text{同理。}\\&\text{于是该函数为一个双射函数。}\\(\mathrm{vi})\,\,&\text{又连续函数与上述推论易得}\,f(x)\,\text{为增函数,由于} x_1,x_2>0\,\text{时有:}\\&\left(\frac{x_1+x_2}2\right)^2\ge x_1x_2\\&\text{于是}\,\ln f\left(\frac{x_1+x_2}2\right)\ge\frac{\ln f(x_1)+\ln f(x_1)}2\\&\text{满足 Jensen 不等式,于是}\,f\,\text{也为上凸函数。}\\&\text{注意到}\,f(x)\,\text{在}\,U^+(0,\delta)\,\text{领域内显然处处满足凸函数性质,便可延拓到点}\,x=0\\(\mathrm{vii})\,\,&\text{运用 Jensen 不等式的推论可得在}\,\mathbb N\,\text{上满足条件,稍加推导即得。}\,\,\square.\sum_{i=1}^n\sum_{j=1}^m\mathrm{lcm}(i,j)&=\sum_{i=1}^n\sum_{j=1}^m\frac{i\cdot j}{\gcd(i,j)}\\&=\sum_{d=1}^n\sum_{i=1}^n\sum_{j=1}^m\frac{i\cdot j}{d}[\gcd(i,j)=d]\\&=\sum_{d=1}^{n}d\sum_{i=1}^{\lfloor\frac{n}{d}\rfloor}\sum_{j=1}^{\lfloor\frac{m}{d}\rfloor}{i\cdot j}\,[\gcd(i,j)=1]\\\end{aligned}$$根据如上推论,我们可以最终确定 $f(x)$ 的显性表达式。- $\textbf{终极推论}\,\,$ 函数 $f(x)$ 为 $\mathbb R\rightarrow\mathbb R$ 上的线性映射,且满足:
使用莫比乌斯反演,得到:$$\begin{aligned}f:\mathbb R&\rightarrow\mathbb R\\x&\mapsto x\mathrm{RHS}&=\sum_{d=1}^{n}d\sum_{i=1}^{\lfloor\frac{n}{d}\rfloor}\sum_{j=1}^{\lfloor\frac{m}{d}\rfloor}{i\cdot j}\sum_{k|d}\mu(k)\\&=\sum_{d=1}^{n}d\sum_{i=1}^{\lfloor\frac{n}{d}\rfloor}\sum_{j=1}^{\lfloor\frac{m}{d}\rfloor}{i\cdot j}\sum_{k=1}\mu(k)[k|\gcd(i,j)]\\&=\sum_{d=1}^{n}d\left(\sum_{i=1}^{\lfloor\frac{n}{dk}\rfloor}i\right)\left(\sum_{j=1}^{\lfloor\frac{m}{dk}\rfloor}j\right)\sum_{k=1}\mu(k)\cdot k^2\\\end{aligned}$$$\text{证明:}$$$\begin{aligned}\#\,\,&\text{由于函数}\,f(x)\,\text{是一个变换,于是构造其逆变换}\\&\,f^{-1}(f(x))=f(f^{-1}(x))=x\\&\text{根据函数}\,f(x)\,\text{的定义,我们有:}\\&f^{-1}(f(x)f(y))=f^{-1}(f(xy))=f^{-1}(f(x))f^{-1}(f(y))\\&\text{令}\,p=f(x),q=f(y)\,\text{便可得到:}f^{-1}(p)f^{-1}(q)=f^{-1}(pq)\\&\text{满足我们最开始定义的函数的条件,于是其同时也满足推论,于是:}\\&\Rightarrow f^{-1}(x)\le x\,\,(\textbf{推论 7})\\&\text{由于}\,f(x)\,\text{与}\,f^{-1}(x)\,\text{关于}\,y=x\,\text{对称,于是:}\\&\because f^{-1}(x)\ge x\\&\therefore f^{-1}(x)=x\,\,\Rightarrow\,\,f(x)=x\,\,\square.\end{aligned}$$括号两个可以 $\Theta(1)$ 求解,后面的预处理前缀和,于是内外层都可以整出分块,时间复杂度 $O(n)$ 做完了。