0
$\begingroup$

Let $S$ be the set of all $n$-digit ($n > 1$) numbers $N$ such that:

  1. $N$ is formed from digits $1,2,4,5$ and the difference between any two consecutive digits of $N$ is 1.

  2. $N$ is divisible by 11.

Denote $m(S)$ the arithmetic mean of all numbers in $S$. Evaluate $m(S)$.

Thanks for your help!

  • 0
    For $n\leq2$ and $4\leq n\leq 8$ the set $S$ is empty, so the arithmetic mean is undefined in these (and probably some other) cases.2012-10-04

2 Answers 2

0

By (1), the numbers are either have only 1 and 2 or 4 and 5 as digits.

More precisely, if $n=2k$ is even, then $N=c\cdot \frac{10^n-1}{99}$ with $c\in\{12,21,45,54\}$. Since the $c$ are not divisible by 11, $N$ is divisible by 11 only if $10^n\equiv 1\pmod {121}$, i.e. $n$ is a multiple of 22. In that case $m(S)= \frac{12+21+45+54}4\cdot \frac{10^n-1}{99} = \frac{10^n-1}3.$ However, if $n$ is not a multiple of 22, then $S$ is empty and $m(S)$ is undefined.

And if $n=2k+1$ is odd, then $\tag1N=10c\cdot \frac{10^{2k}-1}{99}+d$ with $c\in\{12,21,45,54\}$ and $d=c\bmod 10$. A quick check shows that $\frac{10^{2k}-1}{99}\equiv k\pmod{11}$. Hence we are looking for solutions of $d\equiv kc\pmod{11}$. This leads to $ k\equiv \begin{cases}2&c=12\\10&c=21\\5&c=45\\7&c=54\end{cases}$ We conclude that $S$ contains only one numer $N$, given by $(1)$, if $k\equiv 2, 5, 7, 10\pmod {11}$; then $m(S)$ is also this $N$. In all other cases, $m(S)$ is undefined.


Here's a quick proof that $\frac{10^{2k}-1}{99}\equiv k\pmod{11}$: Let $a_k=\frac{10^{2k}-1}{99}$. The statement is clearly true for $k=0$, i.e. $a_k=0$. The rest follows by induction from $a_{k+1}=100a_k+1\equiv a_k+1\equiv k+1\pmod {11}$.

  • 0
    You are doing something wrong in the second part, since $k=1$ (so $n=3$) gives the solution $N=121$ that you miss. It would seem to me that you should have $d=(\lfloor c/10\rfloor)\bmod 10$ rather than $d=c\bmod 10$.2012-10-05
0

If N has odd no.of digits i.e, $(2k-1)$digits.Then for the sequence $4545...4(2k-1 digits)$, k should be of the form $5-11r,r\in \mathbb{Z}$.(divisibility rule of 11)

for the sequence $5454...5(2k-1 digits)$, k should be of the form $11r-4,r\in \mathbb{Z}$.

for the sequence $1212...1(2k-1 digits)$, k should be of the form $2-11r,r\in \mathbb{Z}$.

for the sequence $2121...2(2k-1 digits)$, k should be of the form $11r-1,r\in \mathbb{Z}$.

You have to take all the possible values of $k$ which are positive. For a given $n$ check which conditions it satisfies and take the mean according to it. Then $k$ should be of the form $11r,r\in \mathbb{Z}$

If N has even no.of digits i.e, $(2k)$digits.Then You have to take all the possible values of $k$ which are positive. For a given $n$ check which conditions it satisfies and take the mean according to it.

  • 0
    sorry.i forgot that condtion2012-10-04