# Thread: 2 interesting problems

1. ## 2 interesting problems

1. Let $g(n)$ be the greatest odd divisor of $n$, show that $
\mathop {\lim }\limits_{n \to + \infty } \tfrac{1}
{n} \cdot \sum\limits_{k = 1}^n {\tfrac{{g\left( k \right)}}
{k}}
$
exists and find it ( Bulgaria 1985)
2. Find all $
k \in \mathbb{Z}\text{ with }k \geq 2
$
such that $
n \not|g(k^n+1)
$
, $
\forall n \in \mathbb{Z}/n > 1
$
(Olimpíada Rioplatense 2008) - $g(n)$ is defined as in 1 -

Have fun!

2. Originally Posted by PaulRS
1. Let $g(n)$ be the greatest odd divisor of $n$, show that $
\mathop {\lim }\limits_{n \to + \infty } \tfrac{1}
{n} \cdot \sum\limits_{k = 1}^n {\tfrac{{g\left( k \right)}}
{k}}
$
exists and find it ( Bulgaria 1985)
a simple observation shows that $\sum_{k=1}^n \frac{g(k)}{k} = \sum_{k=1}^m \frac{1}{2^{k-1}} \left \lfloor \frac{n+2^{k-1}}{2^k} \right \rfloor,$ where $m=\lfloor \log_2 n \rfloor + 1.$ the value of $m$ is not important. what we need is to see that $m \rightarrow \infty$ as $n \rightarrow \infty.$

now since $x-1 < \lfloor x \rfloor \leq x,$ the squeeze theorem gives us: $\lim_{n\to\infty} \frac{1}{n} \sum_{k=1}^n \frac{g(k)}{k}=\frac{2}{3}. \ \ \Box$

the second problem is left for other members to try!

3. Originally Posted by NonCommAlg
a simple observation shows that $\sum_{k=1}^n \frac{g(k)}{k} = \sum_{k=1}^m \frac{1}{2^{k-1}} \left \lfloor \frac{n+2^{k-1}}{2^k} \right \rfloor,$ where $m=\lfloor \log_2 n \rfloor + 1.$ the value of $m$ is not important. what we need is to see that $m \rightarrow \infty$ as $n \rightarrow \infty.$

now since $x-1 < \lfloor x \rfloor \leq x,$ the squeeze theorem gives us: $\lim_{n\to\infty} \frac{1}{n} \sum_{k=1}^n \frac{g(k)}{k}=\frac{2}{3}. \ \ \Box$

the second problem is left for other members to try!
How did you obtain $\sum_{k=1}^n \frac{g(k)}{k} = \sum_{k=1}^m \frac{1}{2^{k-1}} \left \lfloor \frac{n+2^{k-1}}{2^k} \right \rfloor,$ where $m=\lfloor \log_2 n \rfloor + 1$?

4. Originally Posted by chiph588@
How did you obtain $\sum_{k=1}^n \frac{g(k)}{k} = \sum_{k=1}^m \frac{1}{2^{k-1}} \left \lfloor \frac{n+2^{k-1}}{2^k} \right \rfloor,$ where $m=\lfloor \log_2 n \rfloor + 1$?
First note that: $
a + 2^{t } \equiv 0\left( {\bmod .2^{t+1} } \right) \Leftrightarrow a \equiv 2^{t} \left( {\bmod .2^{t+1} } \right)
$
(sum $2^{t}$ on both sides)

The idea is that $
a = 2^t \cdot s{\text{ with }}s \ne \dot 2
$
iff $a\equiv{2^{t}}(\bmod.2^{t+1})$

Indeed, to prove this:
$
a = 2^t \cdot \left( {2l + 1} \right) \equiv 2^t \left( {\bmod .2^{t + 1} } \right)
$
, conversly if $
a \equiv 2^t \left( {\bmod .2^{t + 1} } \right)
$
then $
\left. {2^t } \right|{a }
$
and $2 ^{t+1}\not|a$

Now since $
\left\lfloor {\tfrac{n}
{a}} \right\rfloor - \left\lfloor {\tfrac{{n - 1}}
{a}} \right\rfloor = \left\{ \begin{gathered}
1{\text{ if }}\left. a \right|n \hfill \\
0{\text{ otherwise}} \hfill \\
\end{gathered} \right.
$

It follows easily that: $
\sum\limits_{k = 1}^\infty {\tfrac{1}
{{2^{k - 1} }} \cdot \left( {\left\lfloor {\tfrac{{n + 1 + 2^{k - 1} }}
{{2^k }}} \right\rfloor - \left\lfloor {\tfrac{{n + 2^{k - 1} }}
{{2^k }}} \right\rfloor } \right)} = \tfrac{{g\left( {n + 1} \right)}}
{{n + 1}}
$
(only one of the terms is not 0 )

My proof of (1) is based on the following observation: $
\tfrac{{g\left( n \right)}}
{n} = 2 - \sum\limits_{\left. {2^s } \right|n{\text{ ; }}s \geqslant 0} {\tfrac{1}
{{2^s }}}
$
then by a simple counting argument ( $2^j$ appears as many times as multiples of $2^j$ there are in between 1 and n -both included-, that is $\left\lfloor {\tfrac{n}
{{2^k }}} \right\rfloor$
): $
\sum\limits_{k = 1}^n {\tfrac{{g\left( k \right)}}
{k}} = 2 \cdot n - \sum\limits_{k = 0}^\infty {\tfrac{1}
{{2^k }} \cdot \left\lfloor {\tfrac{n}
{{2^k }}} \right\rfloor }
$
...

5. Sorry to be a bother, but I'm still a bit confused...

6. Originally Posted by PaulRS
1. Let $g(n)$ be the greatest odd divisor of $n$, show that $
\mathop {\lim }\limits_{n \to + \infty } \tfrac{1}
{n} \cdot \sum\limits_{k = 1}^n {\tfrac{{g\left( k \right)}}
{k}}
$
exists and find it ( Bulgaria 1985)
2. Find all $
k \in \mathbb{Z}\text{ with }k \geq 2
$
such that $
n \not|g(k^n+1)
$
, $
\forall n \in \mathbb{Z}/n > 1
$
(Olimpíada Rioplatense 2008) - $g(n)$ is defined as in 1 -

Have fun!
Any hints on 2?

7. Originally Posted by PaulRS
Find all $
k \in \mathbb{Z}\text{ with }k \geq 2
$
such that $
n \not|g(k^n+1)
$
, $
\forall n \in \mathbb{Z}/n > 1
$
(Olimpíada Rioplatense 2008) - $g(n)$ is defined as in 1 -
Correct me if I am wrong but the question is not clear as stated. Does the question mean to ask

$
r \not|g(k^r+1)
$
, $
\forall r \in \mathbb{Z}/n > 1
$

or perhaps

$
r \not|g(k^n+1)
$
, $
\forall r \in \mathbb{Z}/n > 1
$

or does it mean to ask

$
n\not|g(k^n+1)
$
, $
\forall n
$

the way that for all is used currently doesn't make sense to me, since the quantified variable $n$ is used to define the domain set $\mathbb{Z}/n$.

8. The bar there ("/") means "such that". So what I mean is that that should hold for all integers n greater than 1.