11

Prove or disprove:

There is a sequence $x$ with each $x_i\in\{1,2,3,4\}$ so that $\pi$ can be written as the average $$\pi = \lim_{n\rightarrow\infty}\sum_{i=1}^{n}\frac{x_i}{n}$$

I am sure that this question would be trivial using advanced number theory concepts, but I would like a solution using just high-school olympiad level mathematics.

Thanks a lot. ☺

mathworker21
  • 35,247
  • 1
  • 34
  • 88
N-N
  • 547
  • 1
    Do you mean $\pi=\lim_{n\to\infty}$? – Rhys Hughes Jun 27 '20 at 14:08
  • yes . Edited it ,thanks:) – N-N Jun 27 '20 at 14:09
  • I think that the solution has more to do with analysis than number theory. Generally for any $\alpha < \beta$, we can write any $x$ with $\alpha \le x \le \beta$ as such a limit with $x_i \in {\alpha, \beta}$. I don't think there's an answer to your question that exploits any properties of $\pi$ to make it simpler. – Izaak van Dongen Jun 27 '20 at 14:18
  • 1
    @IzaakvanDongen .Yes, I just chose $\pi$ for fun ☺. – N-N Jun 27 '20 at 14:25
  • 1
    Fun fact: In my earliest days as a "shareware" developer, I called my enterprise "$n\pi$ Software", and I priced my titles at multiples of $$\pi$. Later, when I started creating products for the iOS App Store, I was annoyed that prices had to be of the form $$x.99$. A colleague suggested what is effectively your idea (but with only two values): frequently bouncing my price between $$2.99$ to $$3.99$ so that the long-term average approached $$\pi$. Too much trouble to implement, of course, but still neat. Congratulations on devising this notion yourself! – Blue Jun 27 '20 at 20:40

7 Answers7

15

You could define the sequence recursively in terms of the average of the previous terms of the sequence:

$$x_k = \begin{cases} 3 & \text{ if } & a_{k-1} > \pi \\ 4 & \text{ if } & a_{k-1} < \pi \\ \end{cases}$$

where

$$a_n = \frac {1}{n}\sum_k^n x_k$$


The convergence of $|a_n - \pi| \to 0$ follows from

$$- \frac{\pi - 3}{n} < a_n - \pi < \frac{4 - \pi}n$$

when $(x_{n-1}, x_n)$ is $(3, 4)$ or $(4, 3)$. Also, $|a_n - \pi|$ is decreasing in the other cases.

In the $(3, 4)$ case, $a_{n-1} < \pi$ so $$\begin{array} {rcl} a_n &=& (a_{n-1}\cdot(n-1) + 4)/n \\ &<& (\pi \cdot (n-1) + 4)/n \\ &=& \pi + (4 - \pi)/n \end{array}$$

Similarly for the $(4, 3)$ case.


To be pedantically rigorous, it would also need to pointed out that there is no final time $a_n - \pi$ changes signs.

J.G.
  • 118,053
DanielV
  • 24,386
  • 3
    I see.I understand that it makes obvious sense logically.But is there a formal proof that the sequence converges to $\pi$. – N-N Jun 27 '20 at 14:21
  • 1
    Its an algorithm which helps us choose $x_i$. It results in the series in the question. – N-N Jun 27 '20 at 14:23
  • Ohhhhh I misunderstood the notation of the question, my bad – Riemann'sPointyNose Jun 27 '20 at 14:25
  • Well it is an algorithm assuming you have a decision procedure for $r > \pi$ for rational number $r$. I'll try to think of a rigorous proof. – DanielV Jun 27 '20 at 14:27
  • Needs a proof of convergence to $\pi$ ! –  Jun 27 '20 at 14:48
  • @YvesDaoust It would be more of a proof that the definition of convergence is sufficiently strong to establish this obviously true statement. – DanielV Jun 27 '20 at 14:51
  • @DanielV: what ? You should prove 1) that the sequence converges and 2) that it converges to $\pi$. If this is obvious, your proof should take two lines. –  Jun 27 '20 at 14:52
  • @YvesDaoust Hypothetically, if someone proved that there isn't a proof that this series converges to $\pi$, would you say "Oh it must not converge as to $\pi$" or would you say "Hmm the definition of convergence needs to be improved"? To me the second. – DanielV Jun 27 '20 at 14:55
  • I don't think you are able to provide a proof. Convergence is usually shown by an $M-\epsilon$ argument. –  Jun 27 '20 at 14:55
  • @YvesDaoust Indeed not off the top of my head. I'm thinking about it casually. I could brute force a proof from the definition of limits but I'm wondering if there is some common lemma that makes it easier. – DanielV Jun 27 '20 at 14:57
  • 3
    This is similar to the textbook example used to prove the Riemann Rearrangement Theorem. You could prove it by showing that if $x_i$ is all $3$s from some point, then $p_i \to 3$, or if $x_i$ is all $4$s, then $p_i \to 4$. Lastly, $p_{i + 1} - p_i \to 0$. From these it follows that $p_i \to \pi$, since $p_i - \pi$ changes sign infinitely often, so informally, we can make the terms close together and wait for $p_i - \pi$ to change sign, and then from that point all the terms must be close to $\pi$. This requires some layers of $\varepsilon$s to make rigorous. – Izaak van Dongen Jun 27 '20 at 15:07
  • @N-N Proof added as requested. I think I managed to keep it at a highschool Olympiad level? – DanielV Jun 27 '20 at 17:53
3

Each term in either of these sums is equal to either $\left\lfloor\pi\right\rfloor = 3$ or $\left\lceil\pi\right\rceil = 4$: \begin{align*} \pi & = \lim_{n\to\infty}\frac{\left\lfloor{n\pi}\right\rfloor}{n} = \lim_{n\to\infty}\frac1{n}\sum_{i=1}^n(\left\lfloor{i\pi}\right\rfloor - \left\lfloor{(i - 1)\pi}\right\rfloor) \\ & = \lim_{n\to\infty}\frac{\left\lceil{n\pi}\right\rceil}{n} = \lim_{n\to\infty}\frac1{n}\sum_{i=1}^n(\left\lceil{i\pi}\right\rceil - \left\lceil{(i - 1)\pi}\right\rceil). \end{align*}

0

You can take $n-\lfloor n(\pi-3)\rfloor$ times $3$ and $\lfloor n(\pi-3)\rfloor$ times $4$ and you get an error smaller than $\dfrac1n$, because the average is

$$3+\dfrac{\lfloor n(\pi-3)\rfloor}n=\dfrac{\lfloor n\pi\rfloor}n.$$

E.g. for $n=10000$, take $8585$ times $3$ and $1415$ times $4$, for average $3.1415$.


The digits $1$ and $2$ are more embarrassing than helpful.

0

Such a sequence clearly exists, for example I could say:

$$\frac{1}{7}(4+3+3+3+3+3+3)=\frac{22}{7}\approx\pi$$

and, continuing such a process towards an infinite number of terms, there exists a configuration that can get as close to $\pi$ (or any other number) as we like.

However, in terms of finding that configuration, I doubt there's much better than DanielV's answer.

Rhys Hughes
  • 13,103
0

Using only $3$s and $4$s, with $n$ of them you can make any integer number between $3n$ and $4n$.
Let $\frac{p}{q}$ be a convergent of the continued fraction of $\pi$: by choosing $n=q$ we may realize $p$ as a sum of $q$ numbers in $\{3,4\}$, since $p>3q$ and $p<4q$. Moreover $\left|\pi-\frac{p}{q}\right|\leq \frac{1}{q^2}$. If we consider the concatenation of these sequences given by convergents we get an infinite sequence whose average value clearly converges to $\pi$ as wanted.

$$ \color{red}{\frac{3}{1}},\color{blue}{\frac{22}{7}},\color{purple}{\frac{333}{106}},\ldots\Longrightarrow \color{red}{3}\color{blue}{3333334}\color{purple}{3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333444444444444444}\ldots $$

Jack D'Aurizio
  • 361,689
0

Yes. Consider $a \le \omega \le b$. (In this specific case $a=3; b=4; \omega = \pi$)

Define $x_1=\begin{cases}b &\omega \le \frac {a+b}2\\a &\omega >\frac{a+b}2\end{cases}$

$v_k= average(x_1,....., x_k)=\frac {\sum_{i=1}^k x_i}k$.

$x_{k+1} = \begin{cases}b &\omega \le v_k\\a &\omega > v_k\end{cases}$.

It's easy to algebraically claim:

Claim 1: $|v_{k+1} - v_k| \le \frac {b-a}{k+1}$

And it's easy to use that claim to claim by induction that

Claim 2: $|v_k - \omega| \le \frac {b-a}{k}$.

Then using the definition

Def: $\lim_{n\to \infty} v_n =\omega$ if when for any $\epsilon > 0$ there is an $N$ so that whenever $n > N$ then $|v_n -\omega| < \epsilon$.

the result follows:

Assuming $b > a$ (if $a=b$ then $\omega = a =b$ and $x_k = a_k = \omega = a=b$ and there is nothing to prove) then if we an $\epsilon > 0$ and we let $n > N \ge \frac 1{(b-a)}\epsilon$ then $|v_n - \omega| \le {b-a}{n+1} < \frac {b-a}n < \frac {b-a}N\le \epsilon$. So $\lim_{n\to \infty} v_n =\omega$

fleablood
  • 130,341
0

Let me propose a "chemical approach" :
we want a mixture of elements of atomic weight $\{ 1,2,3,4 \}$ such that the resulting average atomic weight is $\pi$.

We should then have the following diophantine system
$$ \left( {\matrix{ 1 & 2 & 3 & 4 \cr 1 & 1 & 1 & 1 \cr } } \right) \left( {\matrix{ {n_{\,1} } \cr {n_{\,2} } \cr {n_{\,3} } \cr {n_{\,4} } \cr } } \right) = \left( {\matrix{ {22} \cr 7 \cr } } \right) $$
where the solutions shall be non-negative.

The system is under-determined so we are free to add some further bounds, for instance that the mixture be
somehow "centered", e.g.
$$ \eqalign{ & \left( {\matrix{ 1 & 2 & 3 & 4 \cr 1 & 1 & 1 & 1 \cr 1 & { - 1} & { - 1} & 1 \cr 0 & { - 1} & 1 & 0 \cr } } \right) \left( {\matrix{ {n_{\,1} } \cr {n_{\,2} } \cr {n_{\,3} } \cr {n_{\,4} } \cr } } \right) = \left( {\matrix{ {N\,\pi } \cr N \cr 0 \cr 0 \cr } } \right) \cr & {\bf A}\;{\bf n} = N\;{\bf p} \cr} $$

Here I have chosen the matrix so that
$$ {\bf A}^{\, - \,1} \;{\bf p} = \left( {\matrix{ {\left( {13 - 4\pi } \right)/12} \cr {1/4} \cr {1/4} \cr {\left( {4\pi - 7} \right)/12} \cr } } \right) $$
the limit to which the ratio of the concentrations shall tend contains all positive values.

Then we can arrange the sequence in such a way that the proportion of the elements tend to the above.

So starting with $N=12$ we get
$$ {\bf n}_{\,12} = \left( {\matrix{{13 - 4\pi } \cr 3 \cr 3 \cr {4\pi - 7} \cr } } \right) \buildrel {\left\lfloor {} \right\rfloor } \over \longrightarrow \left( {\matrix{ 0 \cr 3 \cr 3 \cr 5 \cr } } \right) \buildrel {n = 12} \over \longrightarrow \left( {\matrix{ 1 \cr 3 \cr 3 \cr 5 \cr } } \right) $$

I took the floor, but rounding would be good as well, and optionally adjust for the total quantity.

The further step for e.g. $N=120$ gives $$ {\bf n}_{\,120} = \left( {\matrix{ {\left( {13 - 4\pi } \right)10} \cr {30} \cr {30} \cr {\left( {4\pi - 7} \right)10} \cr } } \right)\buildrel {\left\lfloor {} \right\rfloor } \over \longrightarrow \left( {\matrix{ 4 \cr {30} \cr {30} \cr {55} \cr } } \right)\buildrel {n = N} \over \longrightarrow \left( {\matrix{ 5 \cr {30} \cr {30} \cr {55} \cr } } \right) $$ and we shall add to the sequence the ${\bf n}_{\,120} -{\bf n}_{\,12} $ elements.

G Cab
  • 35,964