3
$\begingroup$

Consider a sequence of terms of powers of $m\in\mathbb{R}$ as $$ M_n = m^0, m^1, m^2, m^3, \ldots, m^n $$ and create a set that contains all the values of the various signed combinations of these terms. For example, for $M_2 = m^0,m^1,m^2$ we would have our set $S$ containing the values $$ |m^0 + m + m^2| $$ $$ |m^0 - m + m^2| $$ $$ |m^0 + m - m^2| $$ $$ |m^0 - m - m^2| $$

Notice that we always keep $m^0$ positive. Now, in the special case of $m=2$ it turns out that our set $S$ will always comprise of the first $2^n$ odd numbers. This means that our example with $M_2$ $$ S = \{1,3,5,7\} $$

This is very nice because we can create a nice, indexed closed form of our set using the formula $$ S = \{2k-1 | 1\leq k \leq n\} $$ which then makes summations incredibly easy.

My question is, does there exist such a closed form expression that iterates over all values of a set $S$, given any $m$ and any $n$?

$\endgroup$
4
  • $\begingroup$ Is this for the set with or without duplicates? $\endgroup$ Commented Jun 20, 2020 at 4:04
  • $\begingroup$ Actually, I think there are only duplicates if $m \in \{-1, 0, 1\}$ $\endgroup$ Commented Jun 20, 2020 at 4:11
  • $\begingroup$ just by the way I defined $m$, technically it can never be any of those listed values, so if those create duplicates you can ignore them. If it makes it easier $m$ is strictly larger than $1$, even though I left it out of the original post in order to possibly generalize, but use the easier case first if you have a thought! $\endgroup$
    – wjmccann
    Commented Jun 20, 2020 at 4:28
  • $\begingroup$ You claim to always keep $m^0 = 1$ positive, but then you take the absolute value, which will sometimes multiplies through by $-1$. In truth, for $m > 1$, it is $m^n$ that you are always keeping positive. $\endgroup$ Commented Jun 20, 2020 at 20:58

2 Answers 2

1
$\begingroup$

Input: $m,n$.

Algorithm: Solve $a_k:=ma_{k-1}-2$, $a_1=2$; and $b_k:=mb_{k-1}-1$, $b_1=1$.

Output: The set $S_{m,n}$ is given by the fractal sequence $$b_n+a_1+a_2+a_1+a_3+a_1+\cdots+a_{n-1}+\cdots+a_1+a_2+a_1$$

Example: For $m=5$, $a_k=\frac{1}{2}(3.5^{k-1}+1)=(2,8,38,188,938,\ldots)$.

$b_k=\frac{1}{4}(3.5^{k-1}+1)=(1, 4, 19, 94, 469, 2344,\ldots)$

$S_{5,5}$ is given by $$469+2+8+2+38+2+8+2+188+2+8+2+38+2+8+2$$ $$S_{5,5}=\{469, 471, 479, 481, 519, 521, 529, 531, 719, 721, 729, 731, 769, 771, 779, 781\}$$

$\endgroup$
1
  • $\begingroup$ This is the same answer as TonyK's, with $b_n=1\ldots 1_m-2\ldots2_m$ being the starting value rather than the final value $1\ldots1_m$, and $a_k$ are the values of successive numbers of $0$s and $2$s in difference form. $\endgroup$ Commented Jun 20, 2020 at 18:44
1
$\begingroup$

If $m$ is an integer $\ge 3$, then $S_n$ has a compact description in base $m$: it consists of all numbers of the form $\underbrace{11\ldots1_m}_{(n+1)\,1\text{'s}}-k$, where $k$ is an $n-$digit number containing only $0$'s and $2$'s.

For instance, if $m=5$ and $n=2$ then $111_5=31_{10}$ and we get $$S=\{31_{10}-00_5,31_{10}-02_5,31_{10}-20_5,31_{10}-22_5\}=\{31,29,21,19\}$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .