I think the title is self explanatory, but consider this equation:
$$ \frac {n+(n+1)+(n+2)}3 = A $$
where $A$ is always a whole number.
This is true for any $3^m$ numbers.
What is the reason for that?
I think the title is self explanatory, but consider this equation:
$$ \frac {n+(n+1)+(n+2)}3 = A $$
where $A$ is always a whole number.
This is true for any $3^m$ numbers.
What is the reason for that?
On
We can write the arithmetic mean of $3^k$ consecutive integers as $$A=\frac{\sum_{j=0}^{3^k-1}(n+j)}{3^k}.$$ So $A\in\mathbb Z\iff 3^k\mid \sum_{j=0}^{3^k-1}(n+j)$. But $$\sum_{j=0}^{3^k-1}(n+j)= \sum_{j=0}^{3^k-1}n+ \sum_{j=0}^{3^k-1}j=n3^k+\frac{3^k(3^k-1)}2=3^k(n+\frac{3^k-1}2) $$ where $2\mid 3^k-1 \; \forall k\in \mathbb N$. So we have our proof.
On
This doesn't have anything to do with $3^m$. What really matters is that the number of terms is odd. Note that in every interval $n,\dots,n+(m-1)$ contains at least one integer $k$ that is a multiple of $m$. From there, notice that $(k-j)+(k+j)=2k$ is a multiple of $k$, and thus a multiple of $m$. If $k-j$ is in the interval but $k+j$ isn't, then $k+j-m$ is in the interval, and $(k-j)+(k+j-m)=2k-m$ is a multiple of $m$. Likewise, if $k-j$ isn't in the interval but $k+j$ is, then $k-j+m$ is in the interval, and $(k-j+m)+(k+j)=2k+m$ is a multiple of $m$. Furthermore, this covers the entire interval if $m$ is odd.
An explicit example of the above for $m=5$ and $n=9$:
\begin{align}9+10+11+12+13&=10+(9+11)+(12+13)\\&=\underbrace{2\times5}_k+\underbrace{2\times2\times5}_{2k}+\underbrace{2\times2\times5}_{2k+m}\end{align}
which is a multiple of $m$, which is $5$ here.
On
Let $k$ be a positive integer.
The sum of $k$ consecutive integers whose first term is $v$ is \begin{align*} &v+(v+1)+\cdots + (v+(k-1))\\[4pt] &=kv+\bigl(1+\cdots+(k-1)\bigr)\\[4pt] &=kv+\frac{k(k-1)}{2}\\[8pt] &\text{hence the average is}\\[8pt] &\frac{kv+{\large{\frac{k(k-1)}{2}}}}{k}\\[4pt] &=v+\frac{k-1}{2}\\[4pt] \end{align*} which is an integer if and only if $k$ is odd.
In particular, since $3^m$ is odd, the average of $3^m$ consecutive integers is an integer.
The average of $$a,a+1,a+2,...,a+3^k-1$$ is the average of the first and the last number. Thus the average is $$(a+a+3^k-1)/2=a+(3^k-1)/2$$ which is an integer because $3^k-1$ is always even.