Some questions about a sequence and concepts i developed to find its nth term.

776 Views Asked by At

So I developed these concepts and they seem to be useful to find nth term of certain types of sequences. I have only given definitions and rules and other things, i decided not to write what led me to each concepts since that would be too long.

Definitions and Rules

$\left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b$ is in 'normal form' when:

  1. $a_1 \leq a_2 \leq b,$
  2. $0 \leq a_1\leq a_2,$
  3. $b \geq 1, \text{ where } a_1, a_2, b \in \{0, 1, 2, 3, \ldots\}$

Rules to convert $\left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b$ into normal form:

  1. $\left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b = \left\langle\begin{array}{c}0\\a_2\end{array}\right\rangle_b$ if $a_1<0$ and $0 \leq a_2 \leq b$.
  2. $\left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b = \left\langle\begin{array}{c}a_1 \\ b\end{array}\right\rangle_b$ if $a_2 > b$ and $0 \leq a_1 \leq b$.
  3. $\left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b = \left\langle\begin{array}{c}0\\ b\end{array}\right\rangle_b$ if $a_1 < 0$ and $a_2 > b$.
  4. $\left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b = \langle\rangle$ if $a_1 > a_2$.
  5. $\left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b = \langle\rangle$ if $a_1, a_2 < 0$ or $a_1, a_2 > b$.

$\left\langle a_1, a_2, a_3, \ldots, a_k\right\rangle_b$ where $a_i\in \{0, 1, 2, 3, \ldots\}$ is in 'normal form' when: $0 \leq a_i \leq b$ for $i \in\{1,2,3, \ldots, k\}$.

To convert $\left\langle a_1, a_2, a_3, \ldots, a_k\right\rangle_b$ into normal form, remove all $a_i$ which are $<0$ or $> b$.

For example: $\langle 2,3,7\rangle_5=\langle 2,3\rangle_5$.

Operations

  1. $\left\langle a_1\right\rangle_b=\left\langle\begin{array}{c}a_1 \\ a_1\end{array}\right\rangle_b$.
  2. $\left\langle a_1\right\rangle_b + \left\langle a_2\right\rangle_b + \left\langle a_3\right\rangle_b + \ldots + \left\langle a_k\right\rangle_b = \left\langle a_1, a_2, \ldots, a_k\right\rangle_b$.
  3. $\left\langle a_1\right\rangle_b + \left\langle a_1+1\right\rangle_b + \left\langle a_1+2\right\rangle_b + \ldots + \left\langle a_2\right\rangle_b = \left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b$.
  4. $\left\langle a_1\right\rangle_b + \left\langle a_1\right\rangle_b + \ldots(n\ times)= n\left\langle a_1\right\rangle_b$.
  5. $n\left\langle a_1, a_2, \ldots, a_k\right\rangle_b=n\left\langle a_1\right\rangle_b + n\left\langle a_2\right\rangle_b + \ldots + n\left\langle a_k\right\rangle_b$.
  6. $\left\langle a_1\right\rangle_b - \left\langle a_1\right\rangle_b = \langle\rangle$.
  7. $\left\langle a_1\right\rangle_b \pm \langle\rangle = \left\langle a_1\right\rangle_b$.
  8. $n\left[a\left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b \pm c\left\langle\begin{array}{c}c_1 \\ c_2\end{array}\right\rangle_b \pm d\left\langle\begin{array}{c}d_1 \\ d_2\end{array}\right\rangle_b \pm \ldots\right]$ $= na\left\langle\begin{array}{c}a_1 \\ a_2\end{array}\right\rangle_b \pm nc\left\langle\begin{array}{c}c_1 \\ c_2\end{array}\right\rangle_b \pm nd\left\langle\begin{array}{c}d_1 \\ d_2\end{array}\right\rangle_b \pm \ldots$.

Functions

  1. $\left\langle\begin{array}{l}a_1 \\ a_2\end{array}\right\rangle_b(0)=\left\langle\begin{array}{l}a_1 \\ a_2\end{array}\right\rangle_b$.
  2. $\left\langle a_1, a_2, \ldots, a_k\right\rangle_b(0)=\left\langle a_1, a_2, \ldots, a_k\right\rangle_b$.
  3. $\left\langle\begin{array}{l}a_1 \\ a_2\end{array}\right\rangle_b(n)=\left\langle\begin{array}{l}a_1-n \\ a_2-n\end{array}\right\rangle_b+\left\langle\begin{array}{l}a_1+n \\ a_2+n\end{array}\right\rangle_b$ where $n \in \{1,2,3, \ldots\}$.
  4. $\left\langle a_1, a_2, \ldots, a_k\right\rangle_b(n)=\left\langle a_1-n, a_2-n, \ldots, a_k-n\right\rangle_b + \left\langle a_1+n, a_2+n, \ldots, a_k+n\right\rangle_b$.
  5. $\left\langle\begin{array}{l} a_1 \\ a_2 \end{array}\right\rangle_b\left(n_1, n_2, \ldots, n_m\right) $

$= \left\langle\begin{array}{l} a_1-n_1 \\ a_2-n_1 \end{array}\right\rangle_b\left(n_2, n_3, \ldots, n_m\right)+\left\langle\begin{array}{l} a_1+n_1 \\ a_2+n_1 \end{array}\right\rangle_b\left(n_2, n_3, \ldots, n_m\right)$. 6. $\left\langle a_1, a_2, \ldots, a_k\right\rangle_b\left(n_1, n_2, \ldots, n_m\right)$

$=\left\langle a_1-n_1, a_2-n_1, \ldots, a_k-n _1\right\rangle_b\left( n_2, n_3, \ldots, n_m \right)$ $+\left\langle a_1+n_1, a_2+n_1, \ldots, a_k+n _1\right\rangle_b\left( n_2, n_3, \ldots, n_m \right)$.

Value

The value of $\left\langle\begin{array}{l}a_1 \\ a_2\end{array}\right\rangle_b$ or any other expression of similar type, denoted as '$|\left\langle\begin{array}{l}a_1 \\ a_2\end{array}\right\rangle_b|$', is only calculated when it is in normal form.

Here are rules to calculate values of different expressions and their functions:

  1. $|\langle\rangle|=0$
  2. $|\left\langle\begin{array}{l}a_1 \\ a_2\end{array}\right\rangle_b| = a_2-a_1+1$
  3. $|\left\langle a_1, a_2, \ldots, a_k\right\rangle_b|=k$
  4. $|\left\langle a_1\right\rangle_b+\left\langle a_2\right\rangle_b+\ldots+\left\langle a_k\right\rangle_b| = |\left\langle a_1\right\rangle_b|+|\left\langle a_2\right\rangle_b|+\ldots+|\left\langle a_k\right\rangle_b|$
  5. $|\left\langle\begin{array}{l} a_1 \\ a_2 \end{array}\right\rangle_b\left(n_1, n_2, \ldots, n_m\right)|$ $= |\left\langle\begin{array}{l} a_1-n_1 \\ a_2-n_1 \end{array}\right\rangle_b\left(n_2, n_3, \ldots, n_m\right)|+|\left\langle\begin{array}{l} a_1+n_1 \\ a_2+n_1 \end{array}\right\rangle_b\left(n_2, n_3, \ldots, n_m\right)|$
  6. $|\left\langle a_1, a_2, \ldots, a_k\right\rangle_b\left(n_1, n_2, \ldots, n_m\right)|$

$=|\left\langle a_1-n_1, a_2-n_1, \ldots, a_k-n _1\right\rangle_b\left( n_2, n_3, \ldots, n_m \right)|$

$+|\left\langle a_1+n_1, a_2+n_1, \ldots, a_k+n _1\right\rangle_b\left( n_2, n_3, \ldots, n_m \right)|$

Why All this?

These concepts are the results of my research on a sequence I discovered a few months ago. The sequence $N_A$ is defined as follows: 'Let $A \in \{0, 1, 2, \ldots\}$ be a $k$-digit number in base-10, then we can represent $A$ as $(a_1, a_2, \ldots, a_k)$ where $a_i$ is the $i$-th digit from left and $a_1 \neq 0$ except when $A=0$. Let $S(A) = \{ (b_1, b_2, \ldots, b_{k+1}) : |b_i - b_{i+1}| = a_i, 1 \leq i \leq k, b_i \in \{0, 1, 2, \ldots, 9\} \}$ then $N_A=$ number of elements in $S(A)$.' For example, when $A=0$ then $S(0)= \{ (0,0), (1,1), (2,2), \ldots, (9,9) \}$ and $N_A= 10$.

It turns out $N_A= |\left\langle\begin{array}{l} 0 \\ 9 \end{array}\right\rangle_9\left(a_1, a_2, \ldots, a_k\right)|$, for example $ |\left\langle\begin{array}{l} 0 \\ 9 \end{array}\right\rangle_9\left(0\right)|= 9-0+1=10$.

Here is an image of sequence $\frac{N_A}{2}$ from $A=0$ to $A=9999$ displayed in a 100 by 100 table,even odd highlighted: enter image description here

Here is an example using some concepts (sorry for handwriting): enter image description here

Question

I would like to know you guys' thoughts on this, like how do you see this from a higher mathematical perspective ? Is it connected to some other concepts or does something similar exists already? Is there some branch of mathematics which study these type of concepts or something similar?

I have noticed that $\frac{|\left\langle\begin{array}{l} 0 \\ 9 \end{array}\right\rangle_9\left(a_1, a_2, \ldots,a_{k-1}, a_k\right)|}{2}$ is even or odd iff $\frac{|\left\langle\begin{array}{l} 0 \\ 9 \end{array}\right\rangle_9\left(a_1, a_2, \ldots,a_{k-1}, 10-a_k\right)|}{2}$ is even or odd, i.e., they have same parity. I have proved this using just the concepts i developed but i would like to know if this sequence and theorem can be reframed and solved from a different perspective, like a combinatorial approach or generating functions or something else.

Some findings

Here is an image of another interesting finding: enter image description here

1

There are 1 best solutions below

3
On

Your system of equations can be seen as involving a binary operation $$\circ_b:\mathbb{I}\times\mathbb{Z}^*\to\mathbb{N}$$ indexed by the positive integer base $b$ of a numeral system with digit-set $\{0\,\dots\,b-1\}$, where $\mathbb{I}$ is the set of finite intervals of integers, and $\mathbb{Z}^*$ is the set of finite tuples of integers. This binary operation is completely specified by the following four equations:

$$\begin{align} [\,] \circ_b (T) &= 0\tag{1a}\\ I\circ_b(\ ) &= \text{card}(\ I_b\ )\tag{1b}\\ I\circ_b(0,\, T) &= I\circ_b (T)\tag{1c}\\ I\circ_b(p,\, T) &= (I_b-p)\circ_b(T)\,+\,(I_b-p)\circ_b(T),\quad p\in\{1,2,3,\dots\}\tag{1d} \end{align}$$

where $I\in\mathbb{I}$ and $[\,]$ is the empty interval; $I_b=I\cap[0\ ..\ b-1]$; $(T)\in\mathbb{Z}^*$ and $(\,)$ is the empty tuple; $I-p$, (resp. $I+p$) denotes the interval $I$ shifted left (resp. right) by distance $p$.

A common notation for integer intervals (analogous to real intervals) is $[x,y]=\{x,x+1,\dots,y-1,y\}$, with the convention that this denotes the empty set when $x>y.$ Thus we can conveniently write $[x,y]_b$ instead of the rather unwieldy vertical array angle brackets $\left\langle\begin{array}{c}x \\ y\end{array}\right\rangle_{b-1}.$

From your definition of the sequence $(N_A)_{A=0,1,2,\dots},$ it is clear that generally, ${[0,b-1]\circ_b(T)}$ is equal to the number of base-$b$ digit sequences for which $(T)$ is their first-(forward or backward)-differences, and that half this number is equal to the number of base-$b$ digit sequences for which $(T)$ is their first-forward-differences.

Consequently, the number of sequences having a given tuple as their first-differences is equal to the number of sequences having the reverse of that tuple as their first-differences (since the same differences will simply occur in reverse order); i.e. $$\begin{align}[0,b-1]\circ_b \text{reverse}(T) &=[0,b-1]\circ_b(T).\tag{2}\\[2ex] \end{align}$$

Claim: For any even base $b$, ${[0,b-1]\circ_b(a_1,...,a_k)\over 2}, {[0,b-1]\circ_b(a_1,...,\overline{ a_k})\over 2}$ and ${[0,b-1]\circ_b(\overline{ a_1},...,a_k)\over 2}$ have the same parity, where $\overline{a}=(b-a)\bmod b.$

EDIT: The following is a sketch of how my originally incomplete proof of this claim might be completed, however tediously.

I think a proof of this claim can be obtained as follows. Generally, we have $$I\circ_b(\dots,a)=I^{(1)}\circ_b(a) + \dots + I^{(k)}\circ_b(a)\\ I\circ_b(\dots,\overline{a})=I^{(1)}\circ_b(\overline{a}) + \dots + I^{(k)}\circ_b(\overline{a})$$ where the exact same intervals $I^{(j)}$ (arising from the "$\dots$" part of the tuple) occur in both equations; hence, noting that $\overline{0}=0$ and $\overline{p}=b-p$ for a positive base-$b$ digit $p$, the claim is established if we show that ${[x,y]\circ_b(p)\over 2}$ and ${[x,y]\circ_b(\overline{p})\over 2}$ have the same parity for any positive base-$b$ digit $p$ and any of the intervals $[x,y]\subseteq[0,b-1]$ occurring among the $I^{(j)}$.

E.g., for $[x,y]=[0,b-1]$,
$${[0,b-1]\circ_b(p)\over 2}={[0,b-1-p] + [p,b-1]\over 2}=b-p=\overline{p}$$ and $${[0,b-1]\circ_b(\overline{p})\over 2}={[0,b-1-\overline{p}] + [\overline{p},b-1]\over 2}=b-\overline{p}={p}$$ must have the same parity, because an even $b$ implies $p$ and $b-p$ have the same parity. Completing the proof by this approach will involve separate treatment of the various cases of $([x,y]\pm p) \cap[0,...,b-1].$


In your third image, concerning the sequence $N_1,N_{11},N_{111},\dots$, I notice that the computations do not use same functions as in your preceding image; that is, rather than having $$\left\langle\begin{array}{c}x \\ y\end{array}\right\rangle_{9} (1,T) =\left\langle\begin{array}{c}x-1 \\ y-1\end{array}\right\rangle_{9} (T)+ \left\langle\begin{array}{c}x+1 \\ y+1\end{array}\right\rangle_{9} (T)$$ the table appears to use instead $$\left\langle\begin{array}{c}x \\ y\end{array}\right\rangle_{9} (1,T) =\left\langle\begin{array}{c}x-1 \\ y+1\end{array}\right\rangle_{9}(T)+ \left\langle\begin{array}{c}x+1 \\ y-1\end{array}\right\rangle_{9}(T)$$ with no explanation. In fact the RHSs can (tediously) be shown equivalent only for tuples of form $(1,1,\dots,1)$, which is of course the stated context.


Here's a Python program I used to confirm my results (and yours):

def intersect(P, b=10):
    # P is a pair of integers denoting the interval [P(0),P(1)]
    # intersect(P) is the intersection of [P(0),P(1)] and [0,b-1]
    return [max(P[0],0), min(P[1],b-1)]

def f(P, L, b=10):
    # returns P o_b L
    # P is empty or a pair of integers
    # L is a possibly-empty list of integers
    if P==[] or P[0]>P[1]:
        return 0
    if L==[]:
        P = intersect(P, b)
        return max(0, P[1]-P[0]+1)
    elif L[0]==0:
        return f(P, L[1:], b)
    else:
        P = intersect(P, b)  # intersect the interval, then shift it by -L[0] and +L[0] 
        return f([P[0]-L[0], P[1]-L[0]], L[1:], b) + f([P[0]+L[0], P[1]+L[0]], L[1:], b)