Darij's posts on the PEN forum: http://www.mathlinks.ro/Forum/index.php?f=456 (This forum has been formerly hosted at http://www.problem-solving.be/pen/ , where some of these posts can also be found - sometimes in OUTDATED versions.) This file contains the source code of all of my mathematical posts on the PEN forum. I have decided to upload this on my website because the PEN forum, unfortunately, does not have the best server of the world and is sometimes difficult to access. Darij Grinberg ---------------------------------------------------------------------------------------------------------------------------- Note that the set $\mathbb{N}$ of natural numbers is defined as $\mathbb{N}=\left\{1,2,3,...\right\}$ throughout PEN. ---------------------------------------------------------------------------------------------------------------------------- http://www.problem-solving.be/pen/viewtopic.php?t=346 http://www.mathlinks.ro/Forum/viewtopic.php?t=150712 Problem I 11 [quote="Peter"]Let $p$ be a prime number of the form $4k+1$. Show that $$ \sum^{p-1}_{i=1} \left( \left \lfloor \frac{2i^2}{p} \right \rfloor - 2\left \lfloor \frac{i^2}{p} \right \rfloor \right) = \frac{p-1}{2}. $$[/quote] Lemma 1 from http://www.mathlinks.ro/Forum/viewtopic.php?t=150711 (or http://www.problem-solving.be/pen/viewtopic.php?t=345 ) states: [b]Lemma 1.[/b] For any integer $n$ and any non-integer real number $a$, we have $\lfloor a \rfloor + \lfloor n-a \rfloor = n-1$. Now, since $p$ is a prime number of the form $4k+1$, it is known that $-1$ is a quadratic residue modulo $p$. Thus, there exists an integer $\lambda$ such that $\lambda^2\equiv -1\text{ mod }p$. Now, $p\nmid\lambda$ (because else, we would have $\lambda^2\equiv 0\text{ mod }p$, contradicting $\lambda^2\equiv -1\text{ mod }p$). Therefore, multiplication with $\lambda$ is a permutation of the nonzero residues modulo $p$. In other words, if we define a function $L$ from $\left\{1;\;2;\;...;\;p-1\right\}$ to $\left\{1;\;2;\;...;\;p-1\right\}$ by letting $L\left(i\right)$ be the remainder of $\lambda i$ upon division by $p$ for every $i\in\left\{1;\;2;\;...;\;p-1\right\}$, then this function $L$ is a permutation of $\left\{1;\;2;\;...;\;p-1\right\}$. Thus, [color=green][b](1)[/b][/color] $\sum^{p-1}_{i=1} \left( \left \lfloor \frac{2i^2}{p} \right \rfloor - 2\left \lfloor \frac{i^2}{p} \right \rfloor \right) = \sum^{p-1}_{i=1} \left( \left \lfloor \frac{2\left(L\left(i\right)\right)^2}{p} \right \rfloor - 2\left \lfloor \frac{\left(L\left(i\right)\right)^2}{p} \right \rfloor \right)$. Now, for every $i\in\left\{1;\;2;\;...;\;p-1\right\}$, both integers $i^2$ and $2i^2$ are coprime with $p$ (since $i$ is coprime with $p$ because $p$ is a prime and $1\leq i
1, then the number $\Phi_3\left(x\right)$ is a proper divisor of $\Phi_3\left(x^k\right)$. In fact, since x is an integer and $\Phi_3$ and u are polynomials with integer coefficients, the equation $\Phi_3\left(x^k\right)=u\left(x\right)\cdot \Phi_3\left(x\right)$ yields that the number $\Phi_3\left(x\right)$ divides the number $\Phi_3\left(x^k\right)$, and in fact it is a proper divisor since it is not equal to 1 (in fact, $\Phi_3\left(x\right)=x^2+x+1>1$) and not equal to $\Phi_3\left(x^k\right)$ (since $\Phi_3\left(x\right)=x^2+x+1<\left(x^k\right)^2+x^k+1=\Phi_3\left(x^k\right)$).
Now, if the number n is not a power of 3, then it has a prime divisor $\neq 3$. Let q be this prime divisor. Then, q is a positive integer, q > 1 (since q is a prime), and q is not divisible by 3 (since q is a prime $\neq 3$), and also, the number n can be written in the form n = qr, where r is some positive integer. Hence, by the above, the number $\Phi_3\left(2^r\right)$ is a proper divisor of $\Phi_3\left(\left(2^r\right)^q\right)$. Thus, $\Phi_3\left(\left(2^r\right)^q\right)$ cannot be a prime. But $\Phi_3\left(\left(2^r\right)^q\right)=\Phi_3\left(2^{qr}\right)=\Phi_3\left(2^n\right)=\left(2^n\right)^2+2^n+1=1^n+2^n+4^n$ must be a prime by the condition of the problem. Hence, n must be a power of 3.
That's all.
darij
----------------------------------------------------------------------------------------------------------------------------
http://www.problem-solving.be/pen/viewtopic.php?t=556
http://www.mathlinks.ro/Forum/viewtopic.php?t=150922
Problem P 20
[quote="Peter"]If an integer $n$ is such that $7n$ is the form $a^2 +3b^2$, prove that $n$ is also of that form.[/quote]
In fact, let $A$ and $B$ be two integers satisfying $7n=A^2+3B^2$. Then, $7\mid A^2+3B^2$, so that also $7\mid\left(A^2+3B^2\right)-7B^2=A^2-4B^2=\left(A+2B\right)\left(A-2B\right)$. Thus, since $7$ is prime, we have $7\mid A+2B$ or $7\mid A-2B$.
If $7\mid A+2B$, then $\frac{A+2B}{7}$ is an integer; then, by writing
$\left(2\cdot\frac{A+2B}{7}-B\right)^2+3\left(\frac{A+2B}{7}\right)^2=\frac{A^2+3B^2}{7}=\frac{7n}{7}=n$,
we obtain a representation of $n$ in the form $a^2+3b^2$.
If $7\mid A-2B$, then $\frac{A-2B}{7}$ is an integer; then, by writing
$\left(2\cdot\frac{A-2B}{7}+B\right)^2+3\left(\frac{A-2B}{7}\right)^2=\frac{A^2+3B^2}{7}=\frac{7n}{7}=n$,
we obtain a representation of $n$ in the form $a^2+3b^2$.
In both cases, we have seen that $n$ can be represented in the form $a^2+3b^2$. This completes the solution.
Darij
----------------------------------------------------------------------------------------------------------------------------
http://www.problem-solving.be/pen/viewtopic.php?t=618
http://www.mathlinks.ro/Forum/viewtopic.php?t=150984
Problem S 14
[quote="Peter"]Let $p$ be an odd prime. Determine positive integers $x$ and $y$ for which $x \le y$ and $\sqrt{2p}-\sqrt{x}-\sqrt{y}$ is nonnegative and as small as possible.[/quote]
Copying [url=http://www.mathlinks.ro/Forum/viewtopic.php?t=48300]my solution from MathLinks[/url]:
Can anyone check my solution below? It looks very different from the proposed solution, it has less ugly computations than the proposed solution, and it uses the primality of p only at the very end (it wouldn't use it at all if we would replace "non-negative" by "positive" in the condition of the problem), so I am wondering whether it can be correct...
[color=blue][b]Problem.[/b] Let p be an odd prime. Determine the positive integers x and y with $x\leq y$ for which the number $\sqrt{2p}-\sqrt{x}-\sqrt{y}$ is non-negative and as small as possible.[/color]
[i]Solution.[/i] We claim that the required integers x and y are $x=\frac{p-1}{2}$ and $y=\frac{p+1}{2}$.
In fact, first note that
$\left(\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\right)^{2}=\frac{p-1}{2}+\frac{p+1}{2}+2\cdot\sqrt{\frac{p-1}{2}}\cdot\sqrt{\frac{p+1}{2}}$
$=p+\sqrt{\left(p-1\right)\left(p+1\right)}=p+\sqrt{p^{2}-1}$.
Now, $\frac{p-1}{2}$ and $\frac{p+1}{2}$ are integers (since p is odd, and thus p - 1 and p + 1 are even), and $\sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ is indeed non-negative (this is equivalent to
$\sqrt{2p}\geq\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\ \ \ \ \ \Longleftrightarrow\ \ \ \ \ 2p\geq\left(\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\right)^{2}$
$\Longleftrightarrow\ \ \ \ \ 2p\geq p+\sqrt{p^{2}-1}\ \ \ \ \ \Longleftrightarrow\ \ \ \ \ p\geq\sqrt{p^{2}-1}\ \ \ \ \ \Longleftrightarrow\ \ \ \ \ p^{2}\geq p^{2}-1$,
what is true).
So it remains to prove that $\sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ is indeed the smallest possible nonnegative sum of the form $\sqrt{2p}-\sqrt{x}-\sqrt{y}$ for positive integers x and y with $x\leq y$ and achieved only for $x=\frac{p-1}{2}$ and $y=\frac{p+1}{2}$.
In order to prove this, we assume that x and y are positive integers with $x\leq y$ and
$0\leq\sqrt{2p}-\sqrt{x}-\sqrt{y}\leq\sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$.
If we succeed to show that $x=\frac{p-1}{2}$ and $y=\frac{p+1}{2}$, then we will be done.
The inequality chain $0\leq\sqrt{2p}-\sqrt{x}-\sqrt{y}\leq\sqrt{2p}-\sqrt{\frac{p-1}{2}}-\sqrt{\frac{p+1}{2}}$ rewrites as
$\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\leq\sqrt{x}+\sqrt{y}\leq\sqrt{2p}$.
We square this inequality (it's not the time to worry about positive and negative yet ;) ):
$\left(\sqrt{\frac{p-1}{2}}+\sqrt{\frac{p+1}{2}}\right)^{2}\leq\left(\sqrt{x}+\sqrt{y}\right)^{2}\leq 2p$
$\Longleftrightarrow\ \ \ \ \ p+\sqrt{p^{2}-1}\leq x+y+2\cdot\sqrt{x}\cdot\sqrt{y}\leq 2p$.
Now, we have $x+y 1$. Thus, the number $p^{p-1}+p^{p-2}+...+p+1$ has a prime factor $q$. Then, since $p^p-1=\left(p-1\right)\left(p^{p-1}+p^{p-2}+...+p+1\right)$, we also have $q\mid p^p-1$, so that $p^p\equiv 1\text{ mod }q$. Hence, $p$ is divisible by $\text{ord}_q p$. Since $p$ is a prime, this yields that $\text{ord}_q p=1$ or $\text{ord}_q p=p$.
If $\text{ord}_q p=1$, then $p\equiv 1\text{ mod }q$, and thus $p^{p-1}+p^{p-2}+...+p+1\equiv 1^{p-1}+1^{p-2}+...+1+1=p\equiv 1\text{ mod }q$, what contradicts $q\mid p^{p-1}+p^{p-2}+...+p+1$.
Hence, $\text{ord}_q p=1$ is not possible, so we must have $\text{ord}_q p=p$. Since $\text{ord}_q p\mid q-1$ (because $q$ is a prime), this yields $p\mid q-1$, so that $q\equiv 1\mod p$. Since $q$ is prime and divides $p^p-1$, it thus follows that $q$ is a prime factor of $p^p-1$ which is congruent to $1$ modulo $p$, and we are done.
darij
----------------------------------------------------------------------------------------------------------------------------
http://www.problem-solving.be/pen/viewtopic.php?t=151
http://www.mathlinks.ro/Forum/viewtopic.php?t=150517
Problem D 17
[quote="Peter"]Determine all positive integers $n$ such that $ xy+1 \equiv 0 \; \pmod{n} $ implies that $ x+y \equiv 0 \; \pmod{n}$.[/quote]
In order to fill the ??? in the source: This is part [b](b)[/b] of AMM problem S 9 [1979, 306] by M. S. Klamkin and A. Liu. Reference from JSTOR:
Solutions of Problems Dedicated to Emory P. Starke
S9
M. S. Klamkin; A. Liu; Arnold Adelberg; Jeffrey M. Cohen
The American Mathematical Monthly, Vol. 87, No. 6. (Jun. - Jul., 1980), p. 488.
For the sake of completeness, part [b](a)[/b] states that: Determine all positive integers $n$ such that $\gcd\left(x,n\right)=1$ implies that $x^2\equiv 1\pmod n$.
Darij
----------------------------------------------------------------------------------------------------------------------------
http://www.problem-solving.be/pen/viewtopic.php?t=347
http://www.mathlinks.ro/Forum/viewtopic.php?t=150713
Problem I 12
[quote="Peter"]Let $p=4k+1$ be a prime. Show that $$ \sum^{k}_{i=1} \left \lfloor \sqrt{ ip } \right \rfloor = \frac{p^2 -1}{12}. $$[/quote]
A convention first: If $\mathcal{A}$ is an assertion, then we denote by $\left[ \mathcal{A}\right] $ the logical value of the assertion $\mathcal{A}$, defined by $\left[ \mathcal{A}\right] =\left\{ \begin{array}{c} 1\text{, if }\mathcal{A}\text{ is true};\\ 0\text{, if }\mathcal{A}\text{ is false}\end{array} \right. $. Then, if $X$ is a set and $Y$ is a finite subset of $X$, then the number of elements of $Y$ equals $\left\vert Y\right\vert =\sum_{x\in X}\left[ x\in Y\right] $. This equation makes sense even if $X$ is an infinite set, because the sum $\sum_{x\in X}\left[ x\in Y\right] $ may have infinitely many terms, but only finitely many of them are nonzero - namely, those corresponding to $x$ being element of $Y$ (and $Y$ has finitely many elements).
Let $u$ be a nonnegative real. Applying the equation $\left\vert Y\right\vert =\sum_{x\in X}\left[ x\in Y\right] $ to $X=\mathbb{N}$ and $Y=\left\{ t\in\mathbb{N}\mid t\leq u\right\} $, we see that $\left\vert \left\{ x\in\mathbb{N}\mid x\leq u\right\} \right\vert =\sum_{x\in\mathbb{N}}\left[ x\in\left\{ t\in\mathbb{N}\mid t\leq u\right\} \right] $. This simplifies to $\left\vert \left\{ x\in\mathbb{N}\mid x\leq u\right\} \right\vert =\sum_{x\in\mathbb{N}}\left[ x\leq u\right] $. But since $u$ is nonnegative, $\left\vert \left\{ x\in\mathbb{N}\mid x\leq u\right\} \right\vert =\left\lfloor u\right\rfloor $. Thus, we have proven that
[color=green][b](1)[/b][/color] $\left\lfloor u\right\rfloor =\sum_{x\in\mathbb{N}}\left[ x\leq u\right] $
for every nonnegative real $u$.
Thus, for each integer $i$ with $1\leq i\leq k$, we have
[color=green][b](2)[/b][/color] $\left\lfloor \sqrt{ip}\right\rfloor =\sum_{x\in\mathbb{N}}\left[ x\leq\sqrt{ip}\right] =\sum_{x\in\mathbb{N}}\left[ x^{2}\leq ip\right] $.
Now, $i\leq k$ yields $ip\leq kp$. Hence, if $x$ is an integer such that $x\geq2k+1$, then $x^{2}\geq\left( 2k+1\right) ^{2}=4k^{2}+4k+1>4k^{2}+k=k\left( 4k+1\right) =kp\geq ip$, so that $x^{2}\leq ip$ cannot hold, and thus we have $\left[ x^{2}\leq ip\right] =0$. Thus,
$\sum_{x\in\mathbb{N}}\left[ x^{2}\leq ip\right] =\sum_{x=1}^{2k}\left[ x^{2}\leq ip\right] $ (because all the terms $\left[ x^{2}\leq ip\right] $ for $x\geq2k+1$ are $=0$).
Combining this with [color=green][b](2)[/b][/color], we get
$\left\lfloor \sqrt{ip}\right\rfloor =\sum_{x=1}^{2k}\left[ x^{2}\leq ip\right] $.
Now, for any integer $x$ with $1\leq x\leq2k$, we have $\left[ x^{2}\leq ip\right] =1-\left[ x^{2}\geq ip\right] $, because the assertion $x^{2}\leq ip$ holds if and only if the assertion $x^{2}\geq ip$ does not hold (in fact, $x^{2}=ip$ cannot hold, since $x$ is coprime with $p$, because $p$ is a prime and $1\leq x\leq2k<4k+1=p$). Thus,
$\left\lfloor \sqrt{ip}\right\rfloor =\sum_{x=1}^{2k}\left[ x^{2}\leq ip\right] =\sum_{x=1}^{2k}\left( 1-\left[ x^{2}\geq ip\right] \right) $
$=2k-\sum_{x=1}^{2k}\left[ x^{2}\geq ip\right] =2k-\sum_{x=1}^{2k}\left[ i\leq\frac{x^{2}}{p}\right] $
(since $x^{2}\geq ip$ is equivalent to $i\leq\frac{x^{2}}{p}$). Consequently,
$\sum_{i=1}^{k}\left\lfloor \sqrt{ip}\right\rfloor =\sum_{i=1}^{k}\left( 2k-\sum_{x=1}^{2k}\left[ i\leq\frac{x^{2}}{p}\right] \right) =k\cdot2k-\sum_{i=1}^{k}\sum_{x=1}^{2k}\left[ i\leq\frac{x^{2}}{p}\right] $
$=2k^{2}-\sum_{x=1}^{2k}\sum_{i=1}^{k}\left[ i\leq\frac{x^{2}}{p}\right] $.
Now, for any integer $x$ with $1\leq x\leq2k$, we have $x^{2}\leq\left( 2k\right) ^{2}=k\cdot4k 2 (since $p\geq u+3$). We start with the Gauss trick:
$2\sum_{k=1}^{p-1}\frac{1}{k^{u}}=\sum_{k=1}^{p-1}\frac{1}{k^{u}}+\sum_{k=1}^{p-1}\frac{1}{\left(p-k\right)^{u}}=\sum_{k=1}^{p-1}\left(\frac{1}{k^{u}}+\frac{1}{\left(p-k\right)^{u}}\right)=\sum_{k=1}^{p-1}\frac{k^{u}+\left(p-k\right)^{u}}{k^{u}\left(p-k\right)^{u}}$.
Using the fact that u is odd, we can expand $\left(p-k\right)^{u}$ according to the binomial formula:
$2\sum_{k=1}^{p-1}\frac{1}{k^{u}}=\sum_{k=1}^{p-1}\frac{k^{u}+\left(p^{u}-up^{u-1}k\pm ...+upk^{u-1}-k^{u}\right)}{k^{u}\left(p-k\right)^{u}}=\sum_{k=1}^{p-1}\frac{p^{u}-up^{u-1}k\pm ...+upk^{u-1}}{k^{u}\left(p-k\right)^{u}}$.
All terms of the numerator are divisible by p, so we can pull p out of the sum:
$2\sum_{k=1}^{p-1}\frac{1}{k^{u}}=p\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}$.
But since p > 2, we have $v_{p}\left(2\right)=0$, so that
$v_{p}\left(2\sum_{k=1}^{p-1}\frac{1}{k^{u}}\right)=v_{p}\left(2\right)+v_{p}\left(\sum_{k=1}^{p-1}\frac{1}{k^{u}}\right)=v_{p}\left(\sum_{k=1}^{p-1}\frac{1}{k^{u}}\right)$.
On the other hand,
$v_{p}\left(2\sum_{k=1}^{p-1}\frac{1}{k^{u}}\right)=v_{p}\left(p\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\right)=v_{p}\left(p\right)+v_{p}\left(\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\right)$
$=1+v_{p}\left(\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\right)$.
Thus,
$v_{p}\left(\sum_{k=1}^{p-1}\frac{1}{k^{u}}\right)=1+v_{p}\left(\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\right)$.
Hence, instead of showing $v_{p}\left(\sum_{k=1}^{p-1}\frac{1}{k^{u}}\right)\geq 2$, it will be enough to prove $v_{p}\left(\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\right)\geq 1$. This is equivalent to $v_{p}\left(\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\right)>0$, i. e. to $\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\equiv 0\mod p$. Now we start working in $\mathbb{Z}_{p}$. In fact, we can consider all the fractions $\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}$ in $\mathbb{Z}_{p}$ since they have nonnegative p-adic evaluations (because their denominators, $k^{u}\left(p-k\right)^{u}$, are not divisible by p, since $1\leq k\leq p-1$ and p is a prime). The numerators $p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}$ of these fractions can be heavily simplified, namely to $uk^{u-1}$, since $p\equiv 0\mod p$, and thus all terms containing p can be omitted. Also, the denominators can be simplified: Since $p-k\equiv-k\mod p$, we have $k^{u}\left(p-k\right)^{u}\equiv k^{u}\left(-k\right)^{u}=\left(-1\right)^{u}k^{2u}$. Hence,
$\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\equiv\sum_{k=1}^{p-1}\frac{uk^{u-1}}{\left(-1\right)^{u}k^{2u}}\equiv\frac{u}{\left(-1\right)^{u}}\sum_{k=1}^{p-1}k^{-u-1}\mod p$.
But we are working in $\mathbb{Z}_{p}$, and thus, by Fermat's small theorem, $k^{p-1}\equiv 1\mod p$ for every integer k such that $1\leq k\leq p-1$. Thus, $k^{-u-1}\equiv k^{-u-1}k^{p-1}=k^{p-u-2}\mod p$, and this sum becomes
$\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\equiv\frac{u}{\left(-1\right)^{u}}\sum_{k=1}^{p-1}k^{p-u-2}\mod p$.
Now, $p-u-2\geq 1$ (since $p\geq u+3$) and $p-u-2\leq p-2$. Also, p is an odd prime (since p is a prime and p > 2). Now, according to http://www.problem-solving.be/pen/viewtopic.php?t=676 part [b]a)[/b] (and also http://www.mathlinks.ro/Forum/viewtopic.php?t=40171 ), we have:
[color=blue][b]Theorem 2.[/b] If p is an odd prime and $\rho$ is an integer such that $1\leq\rho\leq p-2$, then $p\mid\sum_{k=1}^{p-1}k^{\rho}$.[/color]
Applying this Theorem 2 to our prime p and $\rho=p-u-2$ (we know that p is an odd prime and $\rho=p-u-2$ satisfies $1\leq p-u-2\leq p-2$), we get $p\mid\sum_{k=1}^{p-1}k^{p-u-2}$, so that $\sum_{k=1}^{p-1}k^{p-u-2}\equiv 0\mod p$, and thus
$\sum_{k=1}^{p-1}\frac{p^{u-1}-up^{u-2}k\pm ...+uk^{u-1}}{k^{u}\left(p-k\right)^{u}}\equiv\frac{u}{\left(-1\right)^{u}}\sum_{k=1}^{p-1}k^{p-u-2}\equiv\frac{u}{\left(-1\right)^{u}}\cdot 0=0\mod p$.
This completes the proof of Theorem 1.
Darij
----------------------------------------------------------------------------------------------------------------------------
http://www.problem-solving.be/pen/viewtopic.php?t=34
http://www.mathlinks.ro/Forum/viewtopic.php?t=150400
Problem A 32
I don't like problems about primes abusing the letter $p$, so let's rename stuff:
[quote="Peter"]Let $a$ and $b$ be natural numbers such that $$ \frac{a}{b}=1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\cdots -\frac{1}{1318}+ \frac{1}{1319}. $$ Prove that $a$ is divisible by $1979$.[/quote]
I will assume paragraphs 1. and 2. of http://www.mathlinks.ro/Forum/viewtopic.php?t=150391 (or http://www.problem-solving.be/pen/viewtopic.php?t=25 ) post #4 as known.
Note that $1979$ is a prime (I am wondering whether the IMO contestants had to check that by hand or they were supposed to know that). We are going to prove $v_{1979}\left(\frac{a}{b}\right)\geq 1$, because this will yield $v_{1979}\left(a\right)=v_{1979}\left(\frac{a}{b}\cdot b\right)=\underbrace{v_{1979}\left(\frac{a}{b}\right)}_{\geq 1}+\underbrace{v_{1979}\left(b\right)}_{\geq 0\text{, since }b\text{ is an integer}}\geq 1$, so that $1979\mid a$, and thus the problem will be solved.
In order to prove that $v_{1979}\left(\frac{a}{b}\right)\geq 1$, we note that $\frac{a}{b}=1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\cdots -\frac{1}{1318}+ \frac{1}{1319}=\sum_{i=1}^{\left\lfloor 2\cdot 1979/3\right\rfloor}\frac{\left(-1\right)^{i-1}}{i}$, so we have to show that $v_{1979}\left(\sum_{i=1}^{\left\lfloor 2\cdot 1979/3\right\rfloor}\frac{\left(-1\right)^{i-1}}{i}\right)\geq 1$. This is a particular case ($p=1979$) of the following theorem:
[color=blue][b]Theorem 1.[/b] Let $p$ be a prime such that $p>3$. Then, $v_p\left(\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{\left(-1\right)^{i-1}}{i}\right)\geq 1$.[/color]
[i]Proof of Theorem 1.[/i] First we prove that
[color=green][b](1)[/b][/color] $p-\left\lfloor \left\lfloor 2p/3\right\rfloor /2\right\rfloor = \left\lfloor 2p/3\right\rfloor +1$.
In fact, since $p$ is a prime and $p>3$, we have $3\nmid p$. Thus, either $p\equiv 1\mod 3$ or $p\equiv 2\mod 3$.
If $p\equiv 1\mod 3$, then $\frac{p-1}{3}\in\mathbb{Z}$, so that $\left\lfloor\frac{2p}{3}\right\rfloor = 2\cdot\frac{p-1}{3}$ (since $2\cdot\frac{p-1}{3}\in\mathbb{Z}$ (because $\frac{p-1}{3}\in\mathbb{Z}$) and $2\cdot\frac{p-1}{3}\leq\frac{2p}{3}<2\cdot\frac{p-1}{3}+1$) and therefore $\left\lfloor\left\lfloor\frac{2p}{3}\right\rfloor /2\right\rfloor = \frac{p-1}{3}$ (since $\left\lfloor\frac{2p}{3}\right\rfloor /2=\left(2\cdot\frac{p-1}{3}\right)/2=\frac{p-1}{3}$ and $\frac{p-1}{3}\in\mathbb{Z}$), so that
$p-\left\lfloor\left\lfloor\frac{2p}{3}\right\rfloor /2\right\rfloor =p-\frac{p-1}{3}=2\cdot\frac{p-1}{3}+1= \left\lfloor\frac{2p}{3}\right\rfloor +1$,
and therefore [color=green][b](1)[/b][/color] is proven for the case $p\equiv 1\mod 3$.
If $p\equiv 2\mod 3$, then $\frac{p-2}{3}\in\mathbb{Z}$, so that $\left\lfloor\frac{2p}{3}\right\rfloor = 2\cdot\frac{p-2}{3}+1$ (since $2\cdot\frac{p-2}{3}+1\in\mathbb{Z}$ (because $\frac{p-2}{3}\in\mathbb{Z}$) and $2\cdot\frac{p-2}{3}+1\leq\frac{2p}{3}<\left(2\cdot\frac{p-2}{3}+1\right)+1$) and therefore $\left\lfloor\left\lfloor\frac{2p}{3}\right\rfloor /2\right\rfloor = \frac{p-2}{3}$ (since $\left\lfloor\frac{2p}{3}\right\rfloor /2=\left(2\cdot\frac{p-2}{3}+1\right)/2=\frac{p-2}{3}+\frac{1}{2}$ and $\frac{p-2}{3}\in\mathbb{Z}$), so that
$p-\left\lfloor\left\lfloor\frac{2p}{3}\right\rfloor /2\right\rfloor =p-\frac{p-2}{3}=\left(2\cdot\frac{p-2}{3}+1\right)+1= \left\lfloor\frac{2p}{3}\right\rfloor +1$,
and therefore [color=green][b](1)[/b][/color] is proven for the case $p\equiv 2\mod 3$.
Hence, [color=green][b](1)[/b][/color] is proven in both possible cases, and we can step to the actual proof of Theorem 1.
We work with fractions modulo $p$, noting that we can divide by every $i\in\left\{1;\;2;\;...;\;p-1\right\}$ modulo $p$. Obviously,
$\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{\left(-1\right)^{i-1}}{i}=\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is odd}}}\frac{\left(-1\right)^{i-1}}{i}+\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is even}}}\frac{\left(-1\right)^{i-1}}{i}$
$=\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is odd}}}\frac{1}{i}+\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is even}}}\frac{-1}{i}=\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is odd}}}\frac{1}{i}-\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is even}}}\frac{1}{i}$
$=\left(\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is odd}}}\frac{1}{i}+\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is even}}}\frac{1}{i}\right)-2\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is even}}}\frac{1}{i}=\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{1}{i}-2\sum_{\substack{1\leq i\leq \left\lfloor 2p/3\right\rfloor ;\\ i\text{ is even}}}\frac{1}{i}$
$=\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{1}{i}-2\sum_{j=1}^{\left\lfloor \left\lfloor 2p/3\right\rfloor /2\right\rfloor}\frac{1}{2j}=\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{1}{i}+\sum_{j=1}^{\left\lfloor \left\lfloor 2p/3\right\rfloor /2\right\rfloor}\frac{1}{-j}$.
$\equiv\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{1}{i}+\sum_{j=1}^{\left\lfloor \left\lfloor 2p/3\right\rfloor /2\right\rfloor}\frac{1}{p-j}$
$=\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{1}{i}+\sum_{i=p-\left\lfloor \left\lfloor 2p/3\right\rfloor /2\right\rfloor}^{p-1}\frac{1}{i}$ (here we substituted $j$ by $p-i$ in the second sum)
$=\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{1}{i}+\sum_{i=\left\lfloor 2p/3\right\rfloor+1}^{p-1}\frac{1}{i}$ (by [color=green][b](1)[/b][/color])
$=\sum_{i=1}^{p-1}\frac{1}{i}\mod p$.
Now, $\sum_{i=1}^{p-1}\frac{1}{i}\equiv 0\mod p$, as can be shown in different ways - e. g. as follows:
$\sum_{i=1}^{p-1}\frac{1}{i}=\frac12\cdot\left(\sum_{i=1}^{p-1}\frac{1}{i}+\sum_{i=1}^{p-1}\frac{1}{i}\right)$
$=\frac12\cdot\left(\sum_{i=1}^{p-1}\frac{1}{i}+\sum_{i=1}^{p-1}\frac{1}{p-i}\right)$ (here we substituted $i$ by $p-i$ in the second sum)
$=\frac12\cdot\sum_{i=1}^{p-1}\left(\frac{1}{i}+\frac{1}{p-i}\right)\equiv\frac12\cdot\sum_{i=1}^{p-1}\left(\frac{1}{i}+\frac{1}{-i}\right)=\frac12\cdot\sum_{i=1}^{p-1}0 = 0\mod p$;
hereby, we were allowed to divide by $2$ because $2\not\equiv 0\mod p$ (since $p>3$). Thus,
$\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{\left(-1\right)^{i-1}}{i} \equiv \sum_{i=1}^{p-1}\frac{1}{i} \equiv 0\mod p$,
so that $v_p\left(\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{\left(-1\right)^{i-1}}{i}\right)\geq 1$, and Theorem 1 is proven.
Darij
----------------------------------------------------------------------------------------------------------------------------
http://www.problem-solving.be/pen/viewtopic.php?t=26
http://www.mathlinks.ro/Forum/viewtopic.php?t=150392
Problem A 24
[quote="Peter"]Let $p>3$ is a prime number and $k=\lfloor\frac{2p}{3}\rfloor $. Prove that $$ {p \choose 1}+{p \choose 2}+\cdots +{p \choose k}$$ is divisible by $p^2$.[/quote]
I will assume paragraphs 1. and 2. of http://www.mathlinks.ro/Forum/viewtopic.php?t=150391 (or http://www.problem-solving.be/pen/viewtopic.php?t=25 ) post #4 as known.
We have to prove that $p^2\mid\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\binom{p}{i}$.
In http://www.mathlinks.ro/Forum/viewtopic.php?t=150400 (or http://www.problem-solving.be/pen/viewtopic.php?t=34 ) post #2, Theorem 1, I showed that $v_p\left(\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{\left(-1\right)^{i-1}}{i}\right)\geq 1$. This rewrites as $\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{\left(-1\right)^{i-1}}{i} \equiv 0\mod p$, where we are working with fractions modulo $p$ (what is allowed in our case because the denominators are integers $i$ satisfying $1\leq i\leq\left\lfloor 2p/3\right\rfloor$, and these integers are not divisible by $p$). In other words, $\sum_{i=1}^{\left\lfloor 2p/3\right\rfloor}\frac{1}{i}\left(-1\right)^{i-1}\equiv 0\mod p$.
Now we prove a simple lemma:
[color=blue][b]Lemma 1.[/b] If $p$ is a prime and $i$ is an integer satisfying $0\leq i\leq p-1$, then $\binom{p-1}{i}\equiv\left(-1\right)^i\mod p$.[/color]
[i]Proof of Lemma 1.[/i] We have $\binom{p-1}{i}=\frac{\left(p-1\right)\cdot\left(p-2\right)\cdot ...\cdot\left(p-i\right)}{i!}$, and thus
$i!\cdot\binom{p-1}{i}=\left(p-1\right)\cdot\left(p-2\right)\cdot ...\cdot\left(p-i\right)\equiv\left(-1\right)\cdot\left(-2\right)\cdot ...\cdot\left(-i\right)$
$=\left(-1\right)^i\cdot\left(1\cdot 2\cdot ...\cdot i\right)=\left(-1\right)^i\cdot i!\mod p$.
Now, $i!$ is coprime with $p$ (since $i!=1\cdot 2\cdot ...\cdot i$, and all the numbers $1$, $2$, ..., $i$ are coprime with $p$ since $p$ is a prime and $i 0$ only. In this case, $k!$ is coprime with $p$ (since $k!=1\cdot 2\cdot ...\cdot k$, and all numbers $1$, $2$, ..., $k$ are coprime with $p$, since $p$ is a prime and $k u$, since $p^2=u^2+2v^2>u^2$ what is because $v$ is positive.
The prime $p$ is odd. This is because else we would have $p=2$, so that $4=2^2=p^2=u^2+2v^2$, and thus $4\geq 2v^2$, so that $2\geq v^2$, and thus $v\leq\sqrt2$, so that $v=1$ (since $v$ is a positive integer, and the only positive integer $\leq\sqrt2$ is $1$), so that $4=u^2+2v^2=u^2+2\cdot 1^2=u^2+2$ yields $2=u^2$, what is impossible since $u$ is an integer and $2$ is not a square.
Since $p$ is odd, $p^2$ must also be odd. Since $p^2=u^2+2v^2$, this yields that $u^2+2v^2$ is odd, so that $u^2$ is odd, so that $u$ is odd. Thus, $u\neq 0$. Since we know that $u$ is nonnegative, it hence follows that $u$ is positive. We also know that $v$ is positive.
Assume that the two integers $\frac{p-u}{2}$ and $\frac{p+u}{2}$ have a common prime divisor $q$. Then, $q$ also divides $\frac{p-u}{2}+\frac{p+u}{2}=p$. Thus, $q$ is a prime divisor of $p$. Since $p$ is a prime, and thus the only prime divisor of $p$ is $p$ itself, this yields $q=p$. Hence, $p$ is a common prime divisor of $\frac{p-u}{2}$ and $\frac{p+u}{2}$. Therefore, $p$ also divides $\frac{p+u}{2}-\frac{p-u}{2}=u$. Since $u$ is positive, this yields $u\geq p$. This contradicts with $p>u$. Hence, our assumption that the two integers $\frac{p-u}{2}$ and $\frac{p+u}{2}$ have a common prime divisor was wrong. Hence, the two integers $\frac{p-u}{2}$ and $\frac{p+u}{2}$ are coprime.
Now, we divide the equation $\left(p-u\right)\left(p+u\right)=2v^2$ by $4$ and obtain $\frac{p-u}{2}\cdot\frac{p+u}{2}=\frac{v^2}{2}$. Since $\frac{p-u}{2}$ and $\frac{p+u}{2}$ are integers, this yields that $\frac{v^2}{2}$ is an integer, so that $v^2$ is even, so that $v$ is even, and thus $v=2V$ for some integer $V$. Since $v$ is positive, it follows that $V$ is positive as well.
Thus, $\frac{p-u}{2}\cdot\frac{p+u}{2}=\frac{v^2}{2}=\frac{\left(2V\right)^2}{2}=2V^2$. Hence, $2\mid\frac{p-u}{2}\cdot\frac{p+u}{2}$. Since $2$ is a prime, it thus follows that $2$ divides at least one of the numbers $\frac{p-u}{2}$ and $\frac{p+u}{2}$. We will only deal with the case when $2$ divides $\frac{p-u}{2}$; the case when $2$ divides $\frac{p+u}{2}$ is analogous and left to the reader.
Since $2$ divides $\frac{p-u}{2}$, the number $\frac{p-u}{2}/2=\frac{p-u}{4}$ is an integer; besides, it is positive (since $p>u$). Now, dividing the equation $\frac{p-u}{2}\cdot\frac{p+u}{2}=2V^2$ by $2$, we get $\frac{p-u}{4}\cdot\frac{p+u}{2}=V^2$.
Now, $\frac{p-u}{4}$ and $\frac{p+u}{2}$ are two coprime positive integers (in fact, we know that they are positive integers, and they are coprime because $\frac{p-u}{2}$ and $\frac{p+u}{2}$ are coprime). Since $\frac{p-u}{4}\cdot\frac{p+u}{2}=V^2$ is the $2$-nd power of a positive integer, Lemma 1 thus yields that both $\frac{p-u}{4}$ and $\frac{p+u}{2}$ are $2$-nd powers of positive integers. Hence, there exist positive integers $\lambda$ and $\mu$ such that $\frac{p-u}{4}=\lambda^2$ and $\frac{p+u}{2}=\mu^2$.
Thus, $p=\frac{p+u}{2}+2\cdot\frac{p-u}{4}=\mu^2+2\lambda^2$. Since $\lambda\neq 0$ (because $\lambda$ is positive), this yields $p\in A$, and the problem is solved.
Darij
----------------------------------------------------------------------------------------------------------------------------
http://www.problem-solving.be/pen/viewtopic.php?t=337
http://www.mathlinks.ro/Forum/viewtopic.php?t=150703
Problem I 2
[quote="Peter"]Prove that for any positive integer $n$, $$ \left\lfloor \frac{n}{3} \right\rfloor + \left\lfloor \frac{n+2}{6} \right\rfloor + \left\lfloor \frac{n+4}{6} \right\rfloor = \left\lfloor \frac{n}{2} \right\rfloor + \left\lfloor \frac{n+3}{6} \right\rfloor . $$[/quote]
A solution for every [b]real[/b] $n$, not just for positive integers $n$:
[color=blue][b]Theorem 1.[/b] Let $x$ be a real and $n$ a positive integer. Then,
[/color][color=green][b](1)[/b][/color][color=blue] $\sum_{k=0}^{n-1}\left\lfloor x+\frac{k}{n}\right\rfloor = \left\lfloor nx\right\rfloor$.[/color]
Here comes a somewhat nonstandard [i]proof of Theorem 1.[/i] We first note that it is enough to prove the equality [color=green][b](1)[/b][/color] for all [b]nonnegative[/b] reals $x$. This is because, once this equality is proven for all nonnegative reals $x$, we can conclude that it holds for all reals $x$ as follows:
For any real $y$, there exists an integer $s$ such that $y+s$ is nonnegative (just take $s$ big enough); therefore, since the formula [color=green][b](1)[/b][/color] holds for nonnegative $x$, we can apply it to $x=y+s$ and get
[color=green][b](2)[/b][/color] $\sum_{k=0}^{n-1}\left\lfloor \left(y+s\right)+\frac{k}{n}\right\rfloor = \left\lfloor n\left(y+s\right)\right\rfloor$;
but since $s$ is an integer,
$\sum_{k=0}^{n-1}\left\lfloor \left(y+s\right)+\frac{k}{n}\right\rfloor = \sum_{k=0}^{n-1}\left\lfloor y+\frac{k}{n}+s\right\rfloor = \sum_{k=0}^{n-1}\left(\left\lfloor y+\frac{k}{n}\right\rfloor+s\right)$
$= \left(\sum_{k=0}^{n-1}\left\lfloor y+\frac{k}{n}\right\rfloor\right)+sn$
and
$\left\lfloor n\left(y+s\right)\right\rfloor = \left\lfloor ny+sn\right\rfloor = \left\lfloor ny\right\rfloor +sn$,
so that [color=green][b](2)[/b][/color] becomes
$\left(\sum_{k=0}^{n-1}\left\lfloor y+\frac{k}{n}\right\rfloor\right)+sn = \left\lfloor ny\right\rfloor +sn$,
thus
$\sum_{k=0}^{n-1}\left\lfloor y+\frac{k}{n}\right\rfloor = \left\lfloor ny\right\rfloor $,
and therefore [color=green][b](1)[/b][/color] holds for $x=y$; hence, [color=green][b](1)[/b][/color] is proven for all reals $x$.
Thus, it is enough to prove [color=green][b](1)[/b][/color] for all nonnegative reals $x$ only. So we will assume that $x$ is nonnegative from now on.
Read [url=http://www.mathlinks.ro/Forum/viewtopic.php?p=849758#849758]http://www.mathlinks.ro/Forum/viewtopic.php?t=150713 post #2[/url] (or [url=http://www.problem-solving.be/pen/viewtopic.php?p=1004#1004]http://www.problem-solving.be/pen/viewtopic.php?t=347 post #2[/url]) until equation [color=green][b](1)[/b][/color], which states that
[color=green][b](3)[/b][/color] $\left\lfloor u\right\rfloor = \sum_{i\in\mathbb{N}}\left[ i\leq u\right]$
for every nonnegative real $u$.
Time for the actual idea of the proof:
$\sum_{k=0}^{n-1}\left\lfloor x+\frac{k}{n}\right\rfloor = \sum_{k=0}^{n-1}\sum_{i\in\mathbb{N}}\left[ i\leq x+\frac{k}{n}\right]$ (after [color=green][b](3)[/b][/color], since $x+\frac{k}{n}$ is nonnegative)
$ = \sum_{k=0}^{n-1}\sum_{i\in\mathbb{N}}\left[ in\leq nx+k\right] = \sum_{k=0}^{n-1}\sum_{i\in\mathbb{N}}\left[ in-k\leq nx\right]$
$= \sum_{k=0}^{n-1}\sum_{j\in\mathbb{N};\ j\equiv -k\text{ mod } n}\left[ j\leq nx\right]$ (since $\left\{in-k\mid i\in\mathbb{N}\right\}=\left\{j\mid j\in\mathbb{N}\and j\equiv -k\text{ mod } n\right\}$)
$= \sum_{j\in\mathbb{N}}\left[ j\leq nx\right] = \left\lfloor nx\right\rfloor$ (after [color=green][b](3)[/b][/color], since $nx$ is nonnegative).
Thus, we have proven [color=green][b](1)[/b][/color] - at least, for nonnegative $x$, but as we know this is enough to be sure that [color=green][b](1)[/b][/color] holds for all real $x$. Thus, Theorem 1 is proven.
Now, on to solving the original problem: Theorem 1 yields
$ \left\lfloor \frac{n}{6} \right\rfloor + \left\lfloor \frac{n}{6}+\frac13 \right\rfloor + \left\lfloor \frac{n}{6}+\frac23 \right\rfloor = \left\lfloor 3\frac{n}{6} \right\rfloor $,
what rewrites as
$ \left\lfloor \frac{n}{6} \right\rfloor + \left\lfloor \frac{n+2}{6} \right\rfloor + \left\lfloor \frac{n+4}{6} \right\rfloor = \left\lfloor \frac{n}{2} \right\rfloor $,
as well as
$ \left\lfloor \frac{n}{6} \right\rfloor + \left\lfloor \frac{n}{6}+\frac12 \right\rfloor = \left\lfloor 2\frac{n}{6} \right\rfloor $,
what rewrites as
$ \left\lfloor \frac{n}{6} \right\rfloor + \left\lfloor \frac{n+3}{6} \right\rfloor = \left\lfloor \frac{n}{3} \right\rfloor $.
Thus,
$\left\lfloor \frac{n}{3} \right\rfloor + \left\lfloor \frac{n+2}{6} \right\rfloor + \left\lfloor \frac{n+4}{6} \right\rfloor = \left( \left\lfloor \frac{n}{3} \right\rfloor - \left\lfloor \frac{n}{6} \right\rfloor \right) + \left( \left\lfloor \frac{n}{6} \right\rfloor + \left\lfloor \frac{n+2}{6} \right\rfloor + \left\lfloor \frac{n+4}{6} \right\rfloor \right)$
$= \left( \left\lfloor \frac{n}{3} \right\rfloor - \left\lfloor \frac{n}{6} \right\rfloor \right) + \left\lfloor \frac{n}{2} \right\rfloor = \left( \left\lfloor \frac{n}{2} \right\rfloor - \left\lfloor \frac{n}{6} \right\rfloor \right) + \left\lfloor \frac{n}{3} \right\rfloor$
$= \left( \left\lfloor \frac{n}{2} \right\rfloor - \left\lfloor \frac{n}{6} \right\rfloor \right) + \left( \left\lfloor \frac{n}{6} \right\rfloor + \left\lfloor \frac{n+3}{6} \right\rfloor \right) = \left\lfloor \frac{n}{2} \right\rfloor + \left\lfloor \frac{n+3}{6} \right\rfloor $,
and the problem is solved.
Darij
----------------------------------------------------------------------------------------------------------------------------
http://problem-solving.be/pen/viewtopic.php?t=448
http://www.mathlinks.ro/Forum/viewtopic.php?t=150814
Problem M 23
[quote="Peter"]Define $$\begin{cases}d(n, 0)=d(n, n)=1&(n \ge 0),\\ md(n, m)=md(n-1, m)+(2n-m)d(n-1,m-1)&(0