2

I am looking for the correct name for mathematics like this:

$$ 1 + 2 \times 3 + 4 \times 5 + 6 \times 7 + 8 = 77 $$ $$ 1 + 2 + 3 + 4 + 5 + 6 + 7 \times 8 = 77 $$ $$ 1 \times 2 \times 3 + 4 + 5 + 6 + 7 \times 8 = 77 $$

That is to say: maths that uses the same digits, in sequence, but with varying mathematical symbols, in order to reach the same integer.

For clarification:

  • The sum doesn't need to be 77, that just an example.
  • Only addition and multiplication are used1
  • It could be less digits (e.g. just using 1, 2, 3, and 4)
  • It could be all digits (i.e. 1, 2, 3, 4, 5, 6, 7, 8, 9)2

Anyway, I'd like to learn/read more about things like this, but I have no idea what to look for.

So... How are these kind of calculations called?


Until a name for these equations comes to light, I will name them after myself:

Peachey Equations

To calculate them, I have created the Peachey Equation Generator


1 if there is a term, but only if division and subtraction are included, then that's okay too...

2 Not sure if/where zero fits in here...

  • 2
    Although it is impossible to say something about the entire universe of mathematical literature, I do not think there exists any name for this phenomenon nor any literature on this phenomenon. – Lee Mosher Jun 10 '22 at 17:53
  • Math riddle? Coincidence? – emacs drives me nuts Jun 10 '22 at 18:15
  • If no name seems to be present... Should I just name them? Call "Potherca Sequence" or something? – Potherca Jun 13 '22 at 07:53
  • I decided to name them "Peachey Equations" also available: a Peachey Equation generator: https://gist.pother.ca/650622174093f7d07e3ef8849e908f8c – Potherca May 12 '23 at 08:14

2 Answers2

2

This is more of a long comment than an answer.

I don't know about a name, but note that there is nothing special about the digits $1$ to $9$; you can extend the problem to any (multi)set of numbers, e.g., say, $(1, 2, \ldots, 15)$ or $(0,4,4,-2)$.

For my own curiosity, I've made some histograms of the number of of ways to get each result. I'm using the set $(1, \ldots, N-1)$ ("minus one" because I messed up the plot titles haha) and plotting on a log scale on the $x$-axis (with 50 bins). It seems to be approaching some normal-ish distribution in the limit. Interesting topics could be finding the mean/mode/variance etc. of this distribution. I'm sure some heuristic arguments could get nice results.

enter image description here

Milten
  • 7,031
  • The only significance of the digits 1-9 is to limit the scale/scope of possible equation to a fixed set. This allows calculating tall possible equations, instead of having an open-ended formula which I would not be able to create with my limited math skills. – Potherca May 17 '23 at 08:19
  • I've assigned the bounty to @freddie, just for the shear amount of work and explanation. Hope you don't mind. – Potherca May 19 '23 at 08:11
2

$\DeclareMathOperator\erf{erf}$

Following on from Milten's answer, we can consider expressions like these over a sequence of integers $(a_n)$. In particular we have a formula for the means $\mu_1,\mu_2,\dots$, where $\mu_n$ is defined as the arithmetic mean of all the expressions of the form $a_1\ast a_2\ast\cdots\ast a_n$ where each $\ast$ stands for $+$ or $\times$, namely $$\mu_n=\frac{h(n)}{2^{n-1}}+\sum_{k=1}^{n-1}\frac{h(k)}{2^k}$$ where $$h(n)=\prod_{k=1}^na_k+\frac{1}{2}\sum_{k=1}^{n-1}2^k\left(\prod_{r=k+1}^na_r\right).$$ For $(a_n)=(n)$, this formula gives us an asymptotic formula for $\mu_n$. We have $$\mu_n\sim(e^2+1)\frac{n!}{2^n}.$$ To show this we will consider the sequence $(S_n)$ given by the sum of all the expressions $a_1\ast a_2\ast\cdots\ast a_n$, e.g. $S_1=a_1$, $S_2=(a_1+a_2)+(a_1\times a_2)$, etc. Note $\mu_n=S_n/2^{n-1}$.

We can find a recursive formula for $S_n$ by considering the possible forms of $a_1\ast a_2\ast\cdots\ast a_n$. In particular, we are summing expressions of the form: \begin{align*} 1~\colon~&a_1\ast a_2\ast\cdots\ast a_{n-1}+a_n\\ 2~\colon~&a_1\ast a_2\ast\cdots\ast a_{n-2}+a_{n-1}\times a_n\\ 3~\colon~&a_1\ast a_2\ast\cdots\ast a_{n-3}+a_{n-2}\times a_{n-1}\times a_n\\ \vdots\\ n-1~:~&a_1+a_2\times\cdots\times a_n\\ n~:~&a_1\times\cdots\times a_n \end{align*} The sum of all the expressions of form $1$ is $S_{n-1}+2^{n-2}a_n$ because there are $2^{n-2}$ expressions of form $1$, likewise the sum of all the expressions of form $2$ is $S_{n-2}+2^{n-3}a_{n-1}a_n$, and so on until the expressions of form $n$ whose sum is $a_1a_2\cdots a_n$. It follows that $$S_n=\prod_{k=1}^na_k+\sum_{k=1}^{n-1}\left(S_{n-k}+2^{n-1-k}\prod_{r=0}^{k-1}a_{n-r}\right).$$ Reversing the order of summation and re-indexing the product inside the sum we get \begin{align*} S_n&=\prod_{k=1}^na_k+\sum_{k=1}^{n-1}\left(S_k+2^{k-1}\prod_{r=k+1}^na_r\right)\\ &=\prod_{k=1}^na_k+\frac{1}{2}\sum_{k=1}^{n-1}\left(2^k\prod_{r=k+1}^na_r\right)+\sum_{k=1}^{n-1}S_k\\ &=h(n)+\sum_{k=1}^{n-1}S_k. \end{align*} Where $h(n)$ is defined as above. Repeated applications of this recurrence yield a formula for $S_n$, $$S_n=h(n)+2^{n-1}\sum_{k=1}^{n-1}\frac{h(k)}{2^k}$$ and so $$\mu_n=\frac{h(n)}{2^{n-1}}+\sum_{k=1}^{n-1}\frac{h(k)}{2^k}.$$ If $(a_n)$ is such that $a_n\geq n$ for all $n\geq 1$, we can obtain an asymptotic formula for $\mu_n$, in particular I claim that $$\mu_n\sim\frac{h(n)}{2^{n-1}}.$$ To show this, we must show that $$\lim_{n\rightarrow\infty}\left(\frac{2^{n-1}}{h(n)}\sum_{k=1}^{n-1}\frac{h(k)}{2^k}\right)=0.$$ We have \begin{align*} h(n)&=\prod_{k=1}^na_k+\frac{1}{2}\sum_{k=1}^{n-1}2^k\left(\prod_{r=k+1}^na_r\right)\\ &=a_n\left(\prod_{k=1}^{n-1}a_k+\frac{1}{2}\sum_{k=1}^{n-1}2^k\left(\prod_{r=k+1}^{n-1}a_r\right)\right)\\ &=a_n\left(\prod_{k=1}^{n-1}a_k+\frac{1}{2}\sum_{k=1}^{n-2}2^k\left(\prod_{r=k+1}^{n-1}a_r\right)+2^{n-2}\right)\\ &=a_n\left(h(n-1)+2^{n-2}\right)\\ &\geq a_nh(n-1). \end{align*} We have $a_n\geq n$ for all $n\geq1$ and hence \begin{align*} h(n)&\geq nh(n-1)\\ &\geq n(n-1)h(n-2)\\ &~~\vdots\\ &\geq n(n-1)\cdots(k+1)h(k)\\ &=\frac{n!}{k!}h(k). \end{align*} From which it follows $$\frac{h(k)}{h(n)}\leq\frac{k!}{n!}$$ and so for all $n\geq2$, \begin{align*} \frac{2^{n-1}}{h(n)}\sum_{k=1}^{n-1}\frac{h(k)}{2^k}&\leq \frac{2^{n-1}}{n!}\sum_{k=1}^{n-1}\frac{k!}{2^k}\\ &=\frac{2}{n}\left(\frac{1}{2}+\frac{2^{n-2}}{(n-1)!}\sum_{k=1}^{n-2}\frac{k!}{2^k}\right)\\ &\leq \frac{2}{n}\left(\frac{1}{2}+\frac{2^{n-2}}{(n-1)!}\sum_{k=1}^{n-2}\frac{(n-2)!}{2^{n-2}}\right)\\ &=\frac{2}{n}\left(\frac{1}{2}+\frac{n-2}{n-1}\right)\\ &\leq\frac{2}{n}\left(\frac{1}{2}+1\right)\\ &=\frac{3}{n}. \end{align*} The third line is justified by the fact that $k!/2^k$ is monotonically increasing. Hence $$\lim_{n\rightarrow\infty}\left(\frac{2^{n-1}}{h(n)}\sum_{k=1}^{n-1}\frac{h(k)}{2^k}\right)=0$$ and $$\mu_n\sim\frac{h(n)}{2^{n-1}}.$$ Since $(a_n)$ is a sequence of positive integers, we can write $$h(n)=\left(1+\frac{1}{2}\sum_{k=1}^{n-1}\frac{2^k}{\prod_{r=1}^ka_r}\right)\prod_{k=1}^na_k.$$ The sum in this expression for $h(n)$ converges because every term is positive and $$\sum_{k=1}^{n-1}\frac{2^k}{\prod_{r=1}^ka_r}\leq\sum_{k=1}^{n-1}\frac{2^k}{k!}\leq e^2-1.$$ Thus $$h(n)\sim\left(1+\frac{1}{2}\sum_{k=1}^{\infty}\frac{2^k}{\prod_{r=1}^ka_r}\right)\prod_{k=1}^na_k$$ and $$\mu_n\sim\left(2+\sum_{k=1}^{\infty}\frac{2^k}{\prod_{r=1}^ka_r}\right)\frac{1}{2^n}\prod_{k=1}^na_k.$$

The following table shows the asymptotic behaviour of $\mu_n$ for various $(a_n)$. $$\begin{array}{|c|c|}\hline a_n & \sim\mu_n \\ \hline n & \displaystyle{(e^2+1)\frac{n!}{2^n}} \\ \hline mn & \displaystyle{(e^{2/m}+1)\left(\frac{m}{2}\right)^nn!} \\ \hline 2n-1 & \displaystyle{\left(1+e\sqrt{\pi}\erf(1)\right)\frac{(2n)!}{2^{2n}n!}} \\\hline 2^n & \displaystyle{\approx(3.64163)2^\frac{n(n-1)}{2}} \\\hline 2^{n^2} & \displaystyle{\approx(3.12549)2^\frac{(2n+5)n(n-1)}{6}} \\\hline n^2 & \displaystyle{\approx(5.25235)\frac{n!^2}{2^n}} \\\hline n^{11} & \displaystyle{\approx(4.00195)\frac{n!^{11}}{2^n}} \\\hline F_n & \displaystyle{\approx(19.6833)\frac{\varphi^{\frac{n(n+1)}{2}}}{(2\sqrt{5})^n}} \\\hline 1 & \displaystyle{\frac{n+1}{2}\quad(\textrm{Exact})} \\\hline 2 & \displaystyle{\frac{n^2+5n+2}{4}\quad(\textrm{Exact})} \\\hline \end{array}$$ Note $F_n$ is the $n$th Fibonacci number and $\varphi$ is the golden ratio. Since $F_2< 2$, we cannot immediately use the asymptotic formula above, the trick is to use the law of total expectation to find that $\mu_n=\mu_{n-1}^*+1/2$, where $\mu_n^*$ is the sequence of means associated to $(F_{n+1})$. In the end we find that the asymptotic formula works just the same for $(F_n)$, which shows that the condition given for the asymptotic formula to hold is not a necessary one.

Remarks

I suspect a similar method to this could be used to determine the behaviour of the variance, at least for some choices of $(a_n)$. I have no idea about determining which values are taken more than once by such expressions, I suppose one might want to consider the primitive cases of this, i.e. $1+2+3=1\times2\times3$ is primitive while $1+2+3+4=1\times2\times3+4$ is not.

Edit

There is a much stronger result for the asymptotic behaviour of such sequences, namely:

If $(a_n)$ is a sequence of non-negative real numbers such that $$\lim_{n\rightarrow\infty}a_n=\infty,$$ then $$\mu_n\sim h(n)/2^{n-1}.$$ Proof

For all $M\in\mathbb{R}$, there is an $N\in\mathbb{N}$ such that for all $n\geq N$, $a_n>M$. Let $M>2$, then using the recurrence for $h(n)$ from before, we have for all $n> k\geq N$ \begin{align*} h(n)&=a_n(h(n-1)+2^{n-2})\\ &\geq Mh(n-1)\\ &~~\vdots\\ &\geq M^{n-k}h(k). \end{align*} If $h(n)=0$ then $h(n+1)=a_{n+1}2^{n-1}>0$, so $h(n)\neq0$ for all sufficiently large $n$, thus $$\frac{h(k)}{h(n)}\leq M^{k-n}.$$ Again for $n$ sufficiently large \begin{align*} \frac{2^{n-1}}{h(n)}\sum_{k=1}^{n-1}\frac{h(k)}{2^k}&\leq\frac{2^{n-1}}{h(n)}\left(\sum_{k=1}^N\frac{h(k)}{2^k}+\sum_{k=N+1}^{n-1}\frac{h(k)}{2^k}\right)\\ &\leq\frac{2^{n-1}}{h(n)}\sum_{k=1}^N\frac{h(k)}{2^k}+2^{n-1}\sum_{k=N+1}^{n-1}\left(\frac{M^{k-n}}{2^k}\right)\\ &\leq \frac{2^{n-1}}{h(n)}\sum_{k=1}^N\frac{h(k)}{2^k}+\frac{1}{2}\left(\frac{2}{M}\right)^n\sum_{k=0}^{n-1}\left(\frac{M}{2}\right)^k\\ &=\frac{2^{n-1}}{h(n)}\sum_{k=1}^N\frac{h(k)}{2^k}+\frac{1}{2}\left(\frac{2}{M}\right)^n\frac{\left(\frac{M}{2}\right)^n-1}{\frac{M}{2}-1}\\ &= \frac{2^{n-1}}{h(n)}\sum_{k=1}^N\frac{h(k)}{2^k}+\frac{1-\left(\frac{2}{M}\right)^n}{M-2}\\ &\leq \frac{2^{n-1}}{h(n)}\sum_{k=1}^N\frac{h(k)}{2^k}+\frac{1}{M-2}. \end{align*} The recurrence for $h(n)$ tells us that $2^{n-1}/h(n)\leq2/a_n$, so $$\frac{2^{n-1}}{h(n)}\sum_{k=1}^{n-1}\frac{h(k)}{2^k}\leq\frac{2}{a_n}\sum_{k=1}^N\frac{h(k)}{2^k}+\frac{1}{M-2}.$$ For sufficiently large $n$, $$\frac{2}{a_n}\sum_{k=1}^N\frac{h(k)}{2^k}\leq\frac{1}{M},$$ and so $$\frac{2^{n-1}}{h(n)}\sum_{k=1}^{n-1}\frac{h(k)}{2^k}\leq\frac{1}{M}+\frac{1}{M-2}.$$ Finally, letting $M\rightarrow\infty$, and hence also $n\rightarrow\infty$, we have the result $$\lim_{n\rightarrow\infty}\left(\frac{2^{n-1}}{h(n)}\sum_{k=1}^{n-1}\frac{h(k)}{2^k}\right)=0.$$ If $a_n\neq0$ for all $n\geq1$, we may write $$\mu_n\sim\left(2+\sum_{k=1}^{\infty}\frac{2^k}{\prod_{r=1}^ka_r}\right)\frac{1}{2^n}\prod_{k=1}^na_k.$$ Note the sum converges because from some point on $a_n>2$.

The same result probably also holds if $a_n$ can take negative values, but the proof seems a bit finicky and I had limited time.

Freddie
  • 326
  • 1
    Great answer! From what I can see, it doesn’t matter that the $a_n$ are integers, right? Also, I guess we just need $a_n\ge n$, and not really that the sequence is increasing? Or is that wrong? – Milten May 16 '23 at 18:50
  • @Milten Thanks! $a_n\geq n$ and is the only necessary part for the proof, i'm not sure why I got so hung up on $a_n$ being strictly increasing. Note $a_n\geq n$ is not a necessary condition for the asymptotic formula, $F_n$ for example. – Freddie May 16 '23 at 19:01
  • I guess $F_n\geq n $ for sufficiently large $n$ though, maybe thats a necessary condition. – Freddie May 16 '23 at 19:05
  • 1
    Wow. That is awesesome! – Potherca May 17 '23 at 08:15
  • 1
    My math skills are limited, but would it be possible to create a single formula out of all of this? – Potherca May 17 '23 at 08:21
  • @Potherca The main formula in this answer would probably be the one given for $\mu_n$ at the very beginning, but with $h(n)$ defined recursively as $h(n)=a_n(h(n-1)+2^{n-2})$ and $h(1)=a_1$. The approximate value of $\mu_n$ is given by the asymptotic formula, I have updated my answer with a more general condition on $a_n$ for which it holds. The asymptotic formula works best for $a_n$ that grow fast, for $a_n=2^{n^2}$, the exact value of $\mu_3$ is $6413$ and the asymptotic formula gives $\approx6401$. – Freddie May 17 '23 at 20:49
  • 1
    I'm accepting this answer and assigning the bounty. Great work, much appreciated! – Potherca May 19 '23 at 08:11