Generalizing Zeckendorf's Theorem: The Kentucky Sequence

Abstract: By Zeckendorf's theorem, an equivalent definition of the Fibonacci sequence (appropriately normalized) is that it is the unique sequence of increasing integers such that every positive number can be written uniquely as a sum of non-adjacent elements; this is called a legal decomposition. Previous work examined the distribution of the number of summands and the spacings between them, in legal decompositions arising from the Fibonacci numbers and other linear recurrence relations with non-negative integral coefficients. Many of these results were restricted to the case where the first term in the defining recurrence was positive. We study a generalization of the Fibonacci numbers with a simple notion of legality which leads to a recurrence where the first term vanishes. We again have unique legal decompositions, Gaussian behavior in the number of summands, and geometric decay in the distribution of gaps.

\section{Introduction}

One of the standard definitions of the Fibonacci numbers $\{F_n\}$ is that it is     the unique sequence satisfying the recurrence $F_{n+1} = F_n + F_{n-1}$ with initial conditions $F_1 = 1$, $F_2 = 2$. An interesting and equivalent definition is that it is the unique increasing sequence of positive integers such that every positive number can be written uniquely as a sum of non-adjacent elements of the sequence.\footnote{If we started the Fibonacci numbers with a zero, or with two ones, we would lose uniqueness.} This equivalence is known as Zeckendorf's theorem \cite{Ze}, and frequently one says every number has a unique legal decomposition as a sum of non-adjacent Fibonacci numbers.

In recent years there has been a lot of research exploring other notions of a legal decomposition,  seeing which sequences result, and studying  the properties of the resulting sequences and decompositions (see for example \cite{Al,Day,DDKMMV,DDKMV,DG,FGNPT,GT,GTNP,Ke,Len,MW2,Ste1,Ste2} among others).
Most of the previous work has been on sequences $\{G_n\}$ where the recurrence relation coefficients are non-negative integers, with the additional restriction being that the first and last terms are positive\footnote{Thus $G_{n+1} = c_1 G_n + \cdots + c_L G_{n-(L-1)}$ with $c_1 c_L > 0$ and $c_i \ge 0$.} (see for instance \cite{MW1}, who call these \textbf{Positive Linear Recurrence Sequences}).

Much is known about the properties of the summands in decompositions. The first result is Lekkerkerker's theorem \cite{Lek}, which says the number of summands needed in the decomposition of $m \in [F_n, F_{n+1})$ grows linearly with $n$. Later authors extended this to other recurrences and found that the distribution of the number of summands converges to a Gaussian. Recently the distribution of gaps between summands in decompositions was studied; the distribution of the longest gap between summands converges to the same distribution one sees when looking at the longest run of heads in tosses of a biased coin, while the probability of observing a gap of length $g$ converges to a geometric random variable for $g > L$ (and is computable for smaller $g$, with the result depending on the recurrence); good sources on these recent gap results are \cite{BBGILMT,B-AM,BILMT}.

Our goal is to extend these results to recurrences that could not be handled by existing techniques. To that end, we study a sequence arising from a notion of a legal decomposition whose recurrence has first term equal to zero.\footnote{Thus in $G_{n+1} = c_1 G_n + \cdots + C_L G_{n-(L-1)}$ we have $c_1 = 0$.} While this sequence does fit into the new framework of an $f$-decomposition introduced in \cite{DDKMMV}, their arguments only suffice to show that our decomposition rule leads to unique decompositions, and is sadly silent on the distribution of the number of summands and the gaps between them; we remedy this below by completely resolving these issues in Theorems \ref{thm:gaussian} and \ref{thm:gapstheorem}.

We now describe our object of study. We can view the decomposition rule of the Fibonacci numbers as saying our sequence is divided into bins of length 1, and (i) we can use at most one element from a bin at most one time, and (ii) we cannot choose elements from two adjacent bins. This suggests a natural extension where the bins now contain $b$ elements and any two summands of a decomposition cannot be members of the same bin or any of the $s$ bins immediately before or any of the $s$ bins immediately after. We call this the \textbf{$(s,b)$-Generacci sequence}, and thus the Fibonacci numbers are the $(1,1)$-Generacci sequence. In this paper we consider the next simplest case: $s=1, b=2$. While the ideas needed to analyze this case carry over to the more general case, it is useful to specialize so that the technical details do not needlessly clutter arguments. For ease of exposition, we decided to give this special sequence a name, and are calling it the \textbf{Kentucky-2} sequence after the homestate of one of our authors.\footnote{The Kentucky-1 sequence is equivalent to the Fibonacci sequence.}

The elements of the Kentucky-2 sequence are partitioned into bins of size 2, and thus the $k$\textsuperscript{th} bin is \be b_k \ := \ \{a_{2k-1}, a_{2k}\}.\ee For a positive integer $m$, a Kentucky-2 legal decomposition is \be m \ = \ a_{\ell_1} + a_{\ell_2}  + \cdots + a_{\ell_k}, \ \ \ \ell_1\ <\ \ell_2 \ < \ \cdots\ <\ \ell_k\ee and $\{a_{\ell_j}, a_{\ell_{j+1}}\} \not\subset b_i \cup b_{i-1}$ for any $i,j$ (i.e., we cannot decompose a number using more than one summand from the same bin or two summands from adjacent bins). The first few terms of the Kentucky-2 sequence are
\begin{equation} \underbracket{\ 1,\ 2\ }_{b_1}\ ,\ \underbracket{\    3,\  4 \ }_{b_2}\ ,\ \underbracket{\      5,\ 8 \ }_{b_3}\ ,\ \underbracket{\     11,\  16 \ }_{b_4}\ ,\ \underbracket{\     21,\  32 \ }_{b_5}\ ,\ \underbracket{\     43,\  64 \ }_{b_6}\ , \ \underbracket{\      85,\ 128 \ }_{b_7}\ ,\ \underbracket{\     171,\  256 \ }_{b_8}\ ,\ \ldots\end{equation}

We have a nice closed form expression for the elements of this sequence.

\begin{theorem}\label{thm:recurrencevalues} If $\{a_n\}$ is the Kentucky-2 sequence, then \begin{equation}
a_{n+1} \ = \  a_{n-1} + 2a_{n-3}, \ a_1 \ = \  1, \ a_2 \ = \  2, \ a_3 \ = \  3, \ a_4 \ = \ 4,
\end{equation} which implies
\begin{equation} a_{2n}\ = \ 2^n\ \ \ \ {\rm and} \ \ \ \ a_{2n-1}\ =\ \frac{1}{3}\left(2^{n+1}+(-1)^n\right).\end{equation}
\end{theorem}

This is not a Positive Linear Recurrence Sequence as the leading coefficient (that of $a_n$) is zero, and this sequence falls outside the scope of many of the previous techniques. We prove the following theorems concerning the Kentucky-2 Sequence.

\begin{theorem}[Uniqueness of Decompositions]\label{K2unique} Every positive integer can be written uniquely as a sum of distinct terms from the Kentucky-2 sequence where no two summands are in the same bin and no two summands belong to consecutive bins in the sequence. \end{theorem}

While the above follows immediately from the work of Demontigny, Do, Kulkarni, Miller, Moon and Varma \cite{DDKMMV} on $f$-decompositions (take $f(n) = 3$ if $n$ is even and $f(n) = 2$ otherwise), for completeness we give an elementary proof in Appendix \ref{sec:proofofK2unique}. We next generalize the results on Gaussian behavior for the summands to this case.

\begin{theorem}[Gaussian Behavior of Summands]\label{thm:gaussian}
Let the random variable $Y_n$ denote the number of summands in the (unique) Kentucky-2 decomposition of an integer picked at random from $[0, a_{2n+1})$ with uniform probability.\footnote{Using the methods of \cite{BDEMMTTW}, these results can be extended to hold almost surely for sufficiently large sub-interval of $[0, a_{2n+1})$.} Normalize $Y_n$ to $Y_n' = (Y_n - \mu_n)/\sigma_n$, where $\mu_n$ and $\sigma_n$ are the mean and variance of $Y_n$ respectively, which satisfy \bea \mu_n & \ = \ &  \frac{n}{3}+\frac{2}{9} + O\left(\frac{n}{2^n}\right) \nonumber\\
\sigma_n^2 & \ = \ &  \frac{2n}{27}+\frac{8}{81}+O\left(\frac{n^2}{2^n}\right). \eea Then $Y_n'$ converges in distribution to the standard normal distribution as $n \rightarrow \infty$.
\end{theorem}

Our final results concern the behavior of gaps between summands. For the legal decomposition \be m\ = \ a_{\ell_1} + a_{\ell_2}  + \cdots + a_{\ell_k} \ \ \ {\rm with} \ \ \ \ell_1\ <\ \ell_2 \ < \  \cdots \ < \  \ell_k \ee and $m \in [0,a_{2n+1})$, we define the  set of gaps as follows:
\begin{equation}\text{Gaps}_n(m) \ := \  \{\ell_2-\ell_1, \ell_3 - \ell_2, \dots, \ell_k - \ell_{k-1}\};\end{equation} notice we do not include the wait to the first summand (we could if we wish; one additional gap will not affect the limiting behavior). We can do the analysis two different ways, either averaging over all $m \in [0, a_{2n+1})$ or for each $m$. It is easier to average over all such $m$, and in fact this analysis is the first step towards understanding the behavior of the individual gap measure. In this paper we concentrate on just the average gap measure, though with additional work the techniques from \cite{BILMT} should be applicable and should yield similar results for the individual gaps and the distribution of the longest gap measure. We plan to return to these questions in a later paper where we consider the general $(s,b)$-Generacci sequence.

Thus in the theorem below we consider all the gaps between summands in Kentucky-2  legal decompositions of all $m \in [0, a_{2n+1})$. We let $P_n(g)$ be the fraction of all these gaps that are of length $g$; thus $m = a_1 + a_{11} + a_{15} + a_{22} + a_{26}$ contributes two gaps of length 4, one gap of length 7 and one gap of length 10.

\begin{theorem}[Average Gap Measure]\label{thm:gapstheorem}
For $P_n(g)$ as defined above (the probability of a gap of length $g$ among Kentucky-2 legal decompositions of $m\in[0,a_{2n+1})$), the limit $P(g) := \lim_{n\to\infty}P_n(g)$ exists, and
\be P(0)  \ = \ P(1) \ = \ P(2) \ = \ 0, \ \ \ P(3) \ = \ 1/8,\ee and for $g\geq 4$ we have
\begin{equation} \twocase{P(g)\ = \ }{2^{-j}}{if $g=2j$}{\frac{3}{4} \ 2^{-j}}{if $g=2j+1$.}\end{equation}
\end{theorem}

In \S\ref{sec:recurrencerelations} we derive the recurrence relation and explicit closed form expressions for the terms of the Kentucky-2 sequence, as well as a useful generating function for the number of summands in decompositions. We then prove Theorem \ref{thm:gaussian} on Gaussian behavior in \S\ref{sec:gaussianbehavior}, and Theorem \ref{thm:gapstheorem} on the distribution of the gaps in \S\ref{sec:averagegap}. We end with some concluding remarks and directions for future research in \S\ref{sec:conclusionandfuturework}.

\section{Recurrence Relations and Generating functions}\label{sec:recurrencerelations}

In the analysis  below we constantly use the fact that every positive integer has a unique Kentucky-2 legal decomposition; see \cite{DDKMMV} or Appendix \ref{sec:proofofK2unique} for proofs.

\subsection{Recurrence Relations}

\begin{proposition} For the Kentucky-2 sequence, $a_n = n$ for $1 \le n \le 5$ and
for any $n \geq 5$ we have $a_n = a_{n-2} + 2a_{n-4}$.  Further  for $n \geq 1$ we have \be\label{eq:expterm} a_{2n}\ =\ 2^n \ \ \ {\rm and} \ \ \ a_{2n-1}\ =\ \frac{1}{3}\left(2^{n+1}+(-1)^n\right).\ee  \end{proposition}

\begin{proof}
Any $a_{2n+1}$ and $a_{2n}$ in the Kentucky-2 sequence is listed because it is the smallest integer that cannot be legally decomposed using the members of $\{a_1, a_2, \dots, a_{2n}\}$  or  $\{a_1, a_2, \dots, a_{2n-1}\}$ respectively: \begin{equation} \underbracket{\ 1,\ 2\ }_{b_1}\ ,\ \underbracket{\    3,\  4 \ }_{b_2}\ ,\ \underbracket{\      5,\ 8 \ }_{b_3}\ ,\ \underbracket{\     11,\  16 \ }_{b_4}\ ,\ \underbracket{\     21,\  32 \ }_{b_5}\ ,\ \underbracket{\     43,\  64 \ }_{b_6}\ ,\ \cdots, \  \underbracket{\     a_{2n-3},\  a_{2n-2}\ }_{b_{n-1}} \ , \ \underbracket{\ a_{2n-1},\ a_{2n}\ }_{b_n}.\end{equation}

As $a_{2n}$ is the largest entry in the bin $b_n$, it is one more than the largest number we can legally write, and thus \begin{equation}a_{2n} \ = \  a_{2n-1} + a_{2(n-2)} + a_{2(n-4)} + \cdots + a_j+1\end{equation} where $a_j = a_2$ if $n$ is odd and $a_j = a_4$ if $n$ is even.  By construction of the sequence we have $a_{2(n-2)} + a_{2(n-4)} + \cdots + a_j+1 = a_{2(n-2)+1} = a_{2n-3}$.  Thus
\begin{equation}\label{evenRR}
a_{2n} \ = \  a_{2n-1} + a_{2n-3}.
\end{equation}

Similarly $a_{2n+1}$ is the smallest entry in bin $b_{n+1}$, so \begin{equation}a_{2n+1} \ = \  a_{2n} + a_{2(n-2)} + a_{2(n-4)} + \cdots + a_j + 1\end{equation} where $a_j = a_2$ if $n$ is odd and $a_j = a_4$ if $n$ is even.  Thus
\begin{equation}\label{oddRR}
a_{2n+1} \ = \   a_{2n} + a_{2n-3}.
\end{equation}
Substituting Equation \eqref{evenRR} into \eqref{oddRR} yields
\begin{equation}\label{finaloddRR}
a_{2n+1} \ = \  a_{2n-1} + 2 a_{2n-3},
\end{equation} and thus for $m \geq 5$ odd we have $a_m = a_{m-2} + 2\cdot a_{m-4}$.

Now  using Equation \eqref{finaloddRR} in \eqref{evenRR}, we have \begin{align}
a_{2n} \ = \  a_{2n-1} + a_{2n-3} \ = \  a_{2n-3}+2\cdot a_{2n-5} + a_{2n-3}\ = \  2(a_{2n-3} + a_{2n-5}).
\end{align}
Shifting the index in Equation \eqref{evenRR} gives\begin{equation}\label{even_double}
a_{2n}\ = \  2 \cdot a_{2n-2}.
\end{equation}
Since $a_2 = 2$ and $a_4 = 4$, together with Equation \eqref{even_double} we now have $a_{2n} = 2^n$ for all $n \geq 1$.  A few algebraic steps then confirm $a_m = a_{m-2} + 2\cdot a_{m-4}$ for $m \geq 6$ even.

Finally, we prove that $a_{2n-1} = \frac{1}{3}(2^{n+1}+(-1)^n)$  for $n \geq 1$ by induction.  The basis case is immediate as $a_1 = 1$ and $\frac{1}{3}(2^{1+1}+(-1)^1) = \frac{1}{3}(4-1) = 1$. Assume for some $N \geq 1$, $a_{2N-1} = \frac{1}{3}(2^{N+1}+(-1)^N)$.  By Equation \eqref{finaloddRR}, we have \begin{align}
a_{2(N+1)-1} &\ = \  a_{2N+1}\nonumber\\
&\ = \  a_{2N-1}+2\cdot a_{2N-3}\nonumber\\
&\ = \  \frac{1}{3}(2^{N+1}+(-1)^N) + 2\cdot \frac{1}{3}(2^{N-1+1}+(-1)^{N-1})\nonumber\\
&\ = \  \frac{1}{3}(2^{N+1} + (-1)^N + 2^{N+1} + (-1)^{N-1} + (-1)^{N-1})\nonumber\\
&\ = \  \frac{1}{3}(2^{N+2}+(-1)^{N+1}),
\end{align} and thus for all $n \geq 1$ we have $a_{2n-1} = \frac{1}{3}(2^{n+1}+(-1)^n)$.
\end{proof}

\subsection{Counting Integers With Exactly $k$ Summands}

In \cite{KKMW}, Kolo$\breve{{\rm g}}$lu, Kopp, Miller and Wang introduced a very useful combinatorial perspective to attack Zeckendorf decomposition problems. While many previous authors attacked related problems through continued fractions or Markov chains, they instead partitioned the $m \in [F_n, F_{n+1})$ into sets based on the number of summands in their Zeckendorf decomposition. We employ a similar technique here, which when combined with identities about Fibonacci polynomials allows us to easily obtain Gaussian behavior.

Let $p_{n,k}$ denote the number of $m\in[0,a_{2n+1})$ whose legal decomposition contains exactly $k$ summands where $k \geq 0$. We have  $p_{n,0} = 1$ for $n \ge 0$, $p_{0,k} = 0$ for $k > 0$, $p_{1,1}=2$, and $p_{n,k} = 0$ if $k > \lfloor{\frac{n+1}{2}}\rfloor$.  Also, by definition, \begin{equation}\displaystyle\sum_{k=0}^{\lfloor\frac{n+1}{2}\rfloor}p_{n,k} \ = \  a_{2n+1},\end{equation} and we have the following recurrence.

\begin{proposition}\label{recur}
For $p_{n,k}$ as above, we have
\begin{equation}p_{n,k}\ = \ 2p_{n-2,k-1}+p_{n-1,k}\end{equation} for $n \geq 2$ and   $k \leq  \lfloor{\frac{n+1}{2}}\rfloor$.
\end{proposition}

\begin{proof}
We partition the Kentucky-2 legal decompositions of all $m \in [0,a_{2n+1})$ into two sets, those that have a summand from bin $b_n$ and those that do not.

If we have a legal decomposition $m = a_{\ell_1}+ a_{\ell_2} + \cdots + a_{\ell_k}$ with $a_{\ell_k} \in b_n$, then $a_{\ell_{k-1}} \leq a_{2(n-2)}$ and there are two choices for $a_{\ell_k}$.  The number of legal decompositions of the form $a_{\ell_1}+ a_{\ell_2} + \cdots + a_{\ell_{k-1}}$ with $a_{\ell_{k-1}} \leq a_{2(n-2)}$ is $p_{n-2,k-1}$ (note the answer is independent of which value $a_{\ell_k} \in b_n$ we have).  Thus the number of legal decompositions of $m$ containing exactly $k$ summands with largest summand in bin $b_n$ is $2\cdot p_{n-2,k-1}$.

If $m \in [0, a_{2n+1})$ does not have a summand from bin $b_n$ in its decomposition, then $m \in [0, a_{2n-1})$, and by definition the number of such $m$ with exactly $k$ summands in a legal decomposition is $p_{n-1,k}$.

Combining these two cases yields
\begin{equation}p_{n,k}\ = \ 2p_{n-2,k-1}+p_{n-1,k},\end{equation} completing the proof.\end{proof}

This recurrence relation allows us to compute a closed-form expression for $F(x,y)$, the generating function of the $p_{n,k}$'s.

\begin{proposition}
Let  \be F(x,y)\ :=\ \sum_{n,k\geq0}p_{n,k} x^ny^k\ee be the generating function of the $p_{n,k}$'s arising from Kentucky-2 legal decompositions. Then
\be\label{cform}
F(x,y) \ = \  \frac{1+2xy}{1-x-2x^2y}.  \ee
\end{proposition}

\begin{proof}
Noting that $p_{n,k} = 0$ if either $n<0$ or $k<0$, using  explicit values of $p_{n,k}$ and the recurrence relation from Proposition \ref{recur}, after some straightforward algebra we obtain
\begin{equation} F(x,y) \ = \  2x^2yF(x,y)+xF(x,y) +2xy+1. \end{equation}
From this, Equation \eqref{cform} follows.
\end{proof}

While the combinatorial vantage of \cite{KKMW} has been fruitfully applied to a variety of recurrences (see \cite{MW1,MW2}), their simple proof of Gaussianity does not generalize. The reason is that for the Fibonacci numbers (which are also the $(1,1)$-Generacci numbers) we have an explicit, closed form expression for the corresponding $p_{n,k}$'s, which greatly facilitate the analysis. Fortunately for us a similar closed form expression exists for Kentucky-2 decompositions.

\begin{proposition}\label{Kentucky-Pnk-explicit} Let $p_{n,k}$ be the number of integers in $[0,a_{2n+1})$ that have exactly $k$ summands in their Kentucky-2 legal decomposition. For all $k \geq 1$ and $n \geq 1 +2(k-1)$, we have \begin{equation}p_{n,k} \ = \  2^k {{n-(k-1)}\choose{k}}.\end{equation}
\end{proposition}

\begin{proof}
We are counting decompositions of the form $a^\prime_{\ell_1} + \cdots + a^\prime_{\ell_k}$ where $a^\prime_{\ell_i} \in b_{\ell_i} = \{a_{2\ell_i - 1}, a_{2\ell_i}\}$ and $\ell_i \leq n$. Define $x_1 := \ell_1-1$ and $x_{k+1} := n-\ell_{k}$.  For $2 \leq i \leq k$, define $x_i :=\ell_i - \ell_{i-1}-1$.  We have
\begin{equation}x_1 + 1 + x_2 + 1 + x_3 + 1 +\cdots + x_k + 1 + x_{k+1} \ = \  n.\end{equation}

We change variables to rewrite the above. Essentially what we are doing is replacing the $x$'s with new variables to reduce our Diophantine equation to a standard form that has been well-studied. As we have a legal decomposition, our bins must be separated by at least one and thus $x_i \ge 1$ for $2 \le i \le k-1$ and $x_1, x_k \ge 0$. We remove these known gaps in our new variables by setting $y_1:= x_1$, $y_{k+1}:=x_{k+1}$ and $y_i:=x_i-1$ for $2 \leq i \leq k$, which gives
\begin{align}\label{eq:yversioncookieproblem}
y_1 + y_2 + \cdots + y_{k} + y_{k+1} &\ = \  x_1 + (x_2-1) + \cdots + (x_k-1) + x_{k+1}\nonumber\\
&\ = \  n-k-(k-1).
\end{align} Finding the number of non-negative integral solutions to this Diophantine equation has many names (the Stars and Bars Problem, Waring's Problem, the Cookie Problem). As the number of solutions to $z_1 + \cdots + z_P = C$ is $\ncr{C+P-1}{P-1}$ (see for example \cite{MT-B,Na}, or \cite{MBD} for a proof and an application of this identity in Bayesian analysis), the number of solutions to Equation \eqref{eq:yversioncookieproblem} is given by the binomial coefficient \begin{equation}\ncr{n-k-(k-1)+k}{k} \ = \ \ncr{n-(k-1)}{k}. \end{equation}
As there are two choices for each $a^\prime_{\ell_i}$, we have $2^k$ legal decompositions whose summands are from the bins $\{b_{\ell_1}, b_{\ell_2}, \dots, b_{\ell_k}\}$ and thus \begin{equation}p_{n,k} \ = \  2^k \ncr{n-(k-1)}{k}.\end{equation}
\end{proof}

\section{Gaussian Behavior}\label{sec:gaussianbehavior}

Before launching into our proof of Theorem \ref{thm:gaussian}, we provide some numerical support in Figure \ref{fig:kentuckyplot}. We randomly chose 200,000 integers from $[0,10^{600})$. We observed a mean number of summands  of 666.899, which fits beautifully with the predicted value of 666.889; the standard deviation of our sample was 12.154, which is in excellent agreement with the prediction of 12.176.

\begin{center}
\begin{figure}
\includegraphics[scale=1]{KentuckyPlot200000from2000curve.eps}
\caption{\label{fig:kentuckyplot} The distribution of the number of summands in Kentucky-2  legal decompositions for 200,000 integers from $[0, 10^{600})$. }
\end{figure}
\end{center}

We split Theorem \ref{thm:gaussian} into three parts: a proof of our formula for the mean, a proof of our formula for the variance, and a proof of Gaussian behavior. We isolate the first two as separate propositions; we will prove these after first deriving some useful properties of the generating function of the $p_{n,k}$'s.

\begin{prop}
\label{prop:mean}
The mean number of summands in the Kentucky-2 legal decompositions for integers in $[0, a_{2n+1})$ is
\begin{equation}
  \mu_n\ = \ \frac{n}{3}+\frac{2}{9} + O\left(\frac{n}{2^n}\right).
   \end{equation}
\end{prop}

\begin{prop}
\label{prop:var}
The variance $\sigma_n^2$ of $Y_n$ (from Theorem \ref{thm:gaussian}) is
\begin{equation}
\sigma_n^2 \ = \   \frac{2n}{27}+\frac{8}{81}+O\left(\frac{n^2}{2^n}\right).
\end{equation}
\end{prop}

\subsection{Mean and Variance}\label{sec:mv}

Recall $Y_n$ is the random variable denoting the number of summands in the unique Kentucky-2 decomposition of an integer chosen uniformly from $[0, a_{2n+1})$, and $p_{n,k}$ denotes the number of integers in  $[0,a_{2n+1})$ whose legal decomposition contains exactly $k$ summands. The following lemma yields expressions for the mean and variance of $Y_n$ using a generating function for the $p_{n,k}$'s; in fact, it is this connection of derivatives of the generating function to moments that make the generating function approach so appealing. The proof is standard (see for example \cite{DDKMMV}).

\begin{lem}  \label{lem:mu}  \cite[Propositions 4.7, 4.8]{DDKMMV}  Let $F(x,y): =  \sum_{n, k \geq 0} p_{n,k} x^n y^k$ be the generating function of   $p_{n,k}$, and let  $g_n(y): =  \sum_{k=0}^n p_{n,k} y^k$ be the coefficient of $x^n$ in $F(x,y)$. Then the mean of $Y_n$ is
\begin{equation}
\mu_n \ = \  \frac{g_n'(1)}{g_n(1)},
\end{equation}
and the  variance of $Y_n$  is
\begin{equation}
\sigma_n^2 \ = \   \frac{\frac{d}{dy}(yg_n'(y))|_{y=1}}{g_n(1)} - \mu_n^2.
\end{equation}
\end{lem}

In our analysis  our closed form expression of $p_{n,k}$ as a binomial coefficient is crucial in obtaining simple closed form expressions for the needed quantities. We are able to express these needed quantities in terms of the \textbf{Fibonacci polynomials}, which are defined recursively as follows:
\begin{equation}
F_0(x) \ = \  0, \ F_1(x) \ = \  1, \ F_2(x) \ = \  x,
\end{equation}
and for $n \geq 3$
\begin{equation}
F_n(x) \ = \  xF_{n-1}(x) + F_{n-2}(x).
\end{equation}
For $n \geq 3$, the Fibonacci polynomial\footnote{Note that $F_n(1)$ gives the standard Fibonacci sequence.} $F_n(x)$  is given by
\begin{equation}
\label{eq:fibsum}
F_n(x) \ = \   \sum_{j=0}^{\lr{\frac{n-1}{2}}}  {n-j-1 \choose j} x^{n-2j-1},
\end{equation}
and also has the explicit formula
\begin{equation}
\label{eq:fibexp}
F_n(x) \ = \  \frac{(x+\sqrt{x^2+4})^n - (x-\sqrt{x^2+4})^n}{2^n \sqrt{x^2+4}}.
\end{equation}
The derivative of $F_n(x)$ is given by
\be
\label{eq:fibDeriv}
F_n'(x) \ = \ \frac{2nF_{n-1}(x) + (n-1)xF_n(x)}{x^2+4}.
\ee
For a reference on Fibonacci polynomials and the formulas given above (which follow immediately from the definitions and straightforward algebra), see \cite{Kos}.

\begin{prop}
For $n \geq 3$
\be
\label{eq:gnFib}
g_n(y)  \ = \  (\sqrt{2y})^{n+1} F_{n+2}\left(\frac{1}{\sqrt{2y}}\right).
\ee
\end{prop}

\begin{proof}
By Proposition \ref{Kentucky-Pnk-explicit}, we have
\begin{equation}
\ba{lcl}
F(x,y)  & \ = \  &  \displaystyle  \sum_{n=0}^\infty \sum_{k=0}^\infty p_{n,k} x^n y^k \ = \  \sum_{n=0}^\infty \sum_{k=0}^n 2^k {n-k+1 \choose k} x^n y^k.
\ea
\end{equation}
Thus, using Equation \eqref{eq:fibsum} we find
 \begin{align}
F(x,y) & \ = \   \displaystyle   \frac{1}{x^2\sqrt{2y}} \sum_{n=0}^\infty \sum_{k=0}^{n+2}   {(n+2)-k-1 \choose k} \left(\frac{1}{\sqrt{2y}}\right)^{(n+2)-2k-1}( x\sqrt{2y})^{n+2} \nonumber\\
&  \ = \     \displaystyle \frac{1}{x^2\sqrt{2y}} \sum_{n=0}^\infty F_{n+2}\left(\frac{1}{\sqrt{2y}}\right) ( x\sqrt{2y})^{n+2}  \ = \  \displaystyle  \sum_{n=0}^\infty F_{n+2}\left(\frac{1}{\sqrt{2y}}\right) (\sqrt{2y})^{n+1} x^n,
\end{align} completing the proof.
\end{proof}

In Appendix \ref{app:gfproof} we provide alternate proofs of Proposition \ref{prop:mean}, Proposition \ref{prop:var} and Theorem \ref{thm:gaussian} that follow directly from the recurrence for $p_{n,k}$ and properties of generating functions, as these arguments generalize better to other recurrences (this is similar to the difference in proofs in \cite{KKMW} and \cite{MW1}, where the first exploits the closed form expressions while the second argues more generally). In doing so, we find another formula for $g_n(y)$. This formula gives an independent derivation of the explicit formula for the Fibonacci polynomials, Equation \eqref{eq:fibexp}.

\begin{proof}[Proof of Proposition \ref{prop:mean}]
By Lemma \ref{lem:mu}, the mean of $Y_n$ is $g_n'(1)/g_n(1)$. Calculations of derivatives using Equations \eqref{eq:fibDeriv} and \eqref{eq:gnFib} give
\begin{align}
\displaystyle \frac{g_n'(1)}{g_n(1)}  & \ = \    \displaystyle \frac{(n+1)(\sqrt{2})^{n-1}F_{n+2}(\frac{1}{\sqrt{2}})}{F_{n+2}(\frac{1}{\sqrt{2}})(\sqrt{2})^{n+1}} - \frac{(\sqrt{2})^{n-2}F_{n+2}'(\frac{1}{\sqrt{2}})}{F_{n+2}(\frac{1}{\sqrt{2}})(\sqrt{2})^{n+1}} \nonumber\\
&\ = \  \frac{n+1}{2} - \frac{1}{(\sqrt{2})^3} \frac{F_{n+2}'\left(\frac{1}{\sqrt{2}}\right)}{F_{n+2}\left(\frac{1}{\sqrt{2}}\right)}. \nonumber\\
& \ = \   \displaystyle \frac{n+1}{2} - \frac{2(n+2)F_{n+1}\left(\frac{1}{\sqrt{2}}\right) + \frac{n+1}{\sqrt{2}}F_{n+2}\left(\frac{1}{\sqrt{2}}\right)}{9\sqrt{2}F_{n+2}\left(\frac{1}{\sqrt{2}}\right)}\nonumber\\ & \ = \  \frac{4}{9}(n+1)  - \frac{\sqrt{2}}{9} (n+2)  \frac{F_{n+1}\left(\frac{1}{\sqrt{2}}\right)}{F_{n+2}\left(\frac{1}{\sqrt{2}}\right)} \nonumber\\
& \ = \    \displaystyle  \frac{4}{9}(n+1)  - \frac{\sqrt{2}}{9} (n+2)  \left(\frac{1}{\sqrt{2}} + O(2^{-n}) \right)  \ = \  \frac{n}{3} + \frac{2}{9} + O(n2^{-n}),
\end{align}
where in the next to last step we use Equation \eqref{eq:fibexp} to approximate $F_{n+1}(1/\sqrt{2})/F_{n+2}(1/\sqrt{2})$.
\end{proof}

\begin{proof}[Proof of Proposition \ref{prop:var}]
By Lemma \ref{lem:mu},
\begin{equation}
\sigma_n^2 \ = \  \displaystyle \frac{g_n''(1)}{g_n(1)} + \frac{g_n'(1)}{g_n(1)} - \mu_n^2 \ = \  \frac{g_n''(1)}{g_n(1)}  + \mu_n(1 - \mu_n).
\end{equation}
Now,
\begin{equation}
\displaystyle \frac{g_n''(1)}{g_n(1)}  \ = \  \displaystyle \frac{(-2n+1)}{4\sqrt{2}} \frac{F_{n+2}'(\frac{1}{\sqrt{2}})}{F_{n+2}(\frac{1}{\sqrt{2}})} + \frac{(n^2-1)}{4} + \frac{1}{8} \frac{F_{n+2}''(\frac{1}{\sqrt{2}})}{F_{n+2}(\frac{1}{\sqrt{2}})}.
\end{equation}
Applying the derivative formula in Equation \eqref{eq:fibDeriv} and using \eqref{eq:fibexp}, we find
\begin{align}
\displaystyle \frac{F_{n+2}'(\frac{1}{\sqrt{2}})}{F_{n+2}(\frac{1}{\sqrt{2}})}   & \ = \   \displaystyle  \frac{4(n+2)}{9} \frac{F_{n+1}(\frac{1}{\sqrt{2}})}{F_{n+2}(\frac{1}{\sqrt{2}})}  + \frac{\sqrt{2}(n+1)}{9}\nonumber\\
& \ = \    \displaystyle  \frac{4(n+2)}{9} \left[\frac{1}{\sqrt{2}} + O(2^{-n})\right] + \frac{\sqrt{2}(n+1)}{9}
\end{align}

and
\begin{equation}
\begin{array}{lcl}
\displaystyle \frac{F_{n+2}''(\frac{1}{\sqrt{2}})}{F_{n+2}(\frac{1}{\sqrt{2}})}   & \ = \  &  \displaystyle  \frac{16(n^2+3n+2)}{81} \frac{F_{n}(\frac{1}{\sqrt{2}})}{F_{n+2}(\frac{1}{\sqrt{2}})}  + \frac{4\sqrt{2}(2n^2+3n-2)}{81} \frac{F_{n+1}(\frac{1}{\sqrt{2}})}{F_{n+2}(\frac{1}{\sqrt{2}})} +  \frac{2(n^2+9n+8)}{81} \\
 & \ = \  &  \displaystyle  \frac{16(n^2+3n+2)}{81} \left[\frac{1}{2} + O(2^{-n})\right] + \frac{4\sqrt{2}(2n^2+3n-2)}{81} \left[\frac{1}{\sqrt{2}} + O(2^{-n})\right] \\
 & & \displaystyle\ +\  \frac{2(n^2+9n+8)}{81}.
\end{array}
\end{equation}
Thus
\begin{equation}
\begin{array}{lcl}
\sigma_n^2  & \ = \  &  \displaystyle \frac{(-2n+1)}{4\sqrt{2}} \left[\frac{\sqrt{2}}{9}(3n+5)+ O(n2^{-n})\right]  +  \frac{(n^2-1)}{4} + \frac{1}{8} \left[\frac{2n^2}{9} + \frac{2n}{3} + \frac{8}{27} +  O(n^22^{-n})\right] \\
&  & \displaystyle + \left[ \frac{n}{3}+\frac{2}{9} + O\left(\frac{n}{2^n}\right)\right] \left[ 1 -  \frac{n}{3} - \frac{2}{9} + O\left(\frac{n}{2^n}\right)\right]  \ = \  \displaystyle \frac{2n}{27} + \frac{8}{81} + O\left(\frac{n^2}{2^n}\right),
\end{array}
\end{equation} completing the proof.
\end{proof}

\subsection{Gaussian Behavior}

\begin{proof}[Proof of Theorem \ref{thm:gaussian}]
 We prove that  $Y_n'$ converges in distribution to the standard normal distribution as $n \rightarrow \infty$ by  showing  that the moment generating function of $Y_n'$ converges to that of the standard normal (which is $e^{t^2/2}$).  Following the same argument as in \cite[Lemma 4.9]{DDKMMV}, the moment generating function $M_{Y_n'}(t)$ of $Y_n'$ is
\begin{equation}
M_{Y_n'}(t) \ = \  \displaystyle \frac{g_n(e^{t/\sigma_n})e^{-t\mu_n/\sigma_n}}{g_n(1)}.
\end{equation}
Thus we have
\begin{equation}
M_{Y_n'}(t) \ = \  \displaystyle \frac{F_{n+2} \left(\frac{1}{\sqrt{2e^{t/\sigma_n}}} \right) e^{(\frac{n+1}{2}- \mu_n)t/\sigma_n}}{F_{n+2}\left(\frac{1}{\sqrt{2}}\right)},
\end{equation}
and
\begin{equation}
\log(M_{Y_n'}(t)) \ = \  \log F_{n+2} \left(\frac{1}{\sqrt{2e^{t/\sigma_n}}} \right)  + \frac{t}{\sigma_n} \left(\frac{n+1}{2}- \mu_n \right) -  \log F_{n+2}\left(\frac{1}{\sqrt{2}}\right).
\end{equation}
From Equation \eqref{eq:fibexp},
\begin{equation}
\begin{array}{lcl}
F_{n+2}(x)  & \ = \  &   \displaystyle \frac{(x+\sqrt{x^2+4})^{n+2}}{2^{n+2} \sqrt{x^2+4}} \left[ 1 - \left(\frac{x-\sqrt{x^2+4}}{x+\sqrt{x^2+4}}\right)^{n+2}\right].\\
 \end{array}
\end{equation}
Thus
\begin{align}
\log F_{n+2}(x)  \ = & \  (n+2) \log(x+\sqrt{x^2+4}) - (n+2)\log 2 \nonumber\\
&\ \ \ \ - \frac{1}{2}\log(x^2+4)  +  \log  (1 - r(x)^{n+2})\nonumber\\
  = &  \ (n+2) \log x + (n+2) \log\left(1 + \sqrt{1 + \frac{4}{x^2}}\right) - (n+2)\log2  \nonumber\\
 & \ \ \ \   - \frac{1}{2}\log(x^2+4)  \ +  \  O(r(x)^{n}),\
\end{align}
where for all $x$
\begin{equation}
r(x) \ = \   \left(\frac{x-\sqrt{x^2+4}}{x+\sqrt{x^2+4}}\right) \ \in \  (0,1].
\end{equation}
Thus
\begin{equation}
\begin{array}{lcl}
\log F_{n+2}(\frac{1}{\sqrt{2}})  & \ = \  &   \frac{1}{2}(n+3)\log 2 - \log 3 + O(2^{-n}) \\
\end{array}
\end{equation}
and
\begin{align}
\log F_{n+2}\left(\frac{1}{\sqrt{2e^{t/ \sigma_n}}}\right)   \ = \  & \displaystyle -\frac{(n+2)}{2}\log 2 - \frac{(n+2)}{2\sigma_n}t  - (n+2)\log 2 \nonumber\\ & \ \ +\  (n+2)\alpha_n(t) - \frac{1}{2}\beta_n(t) +  O(r^n),
\end{align}
where
\begin{equation}
\alpha_n(t) \ = \ \log(1 + \sqrt{1+8e^{t/\sigma_n}}), \ \
\beta_n(t) \ = \  \log\left (\frac{1}{2}e^{-t/\sigma_n} + 4 \right),
\end{equation}
and
\begin{equation}
r \ = \  r\left(\frac{1}{\sqrt{2e^{t/ \sigma_n}}}\right)\ <\ 1.
\end{equation}
The Taylor series expansions for $\alpha_n(t)$ and $\beta_n(t)$ about $t=0$  are given by
\begin{equation}
\alpha_n(t) \ = \  \log 4 + \frac{1}{3\sigma_n}t + \frac{1}{27\sigma_n^2}t^2 + O(n^{-3/2})
\end{equation}
and
 \begin{equation}
\beta_n(t) \ = \  \log\left(\frac{9}{2}\right)  - \frac{1}{9\sigma_n}t + \frac{4}{81\sigma_n^2}t^2 + O(n^{-3/2}).
\end{equation}
Going back to $\log(M_{Y_n'}(t))$ we now have
 \begin{equation}
 \begin{array}{lcl}
 \log(M_{Y_n'}(t)) &  \ = \  &  \displaystyle  -\frac{3}{2}(n+2)\log 2 - \frac{(n+2)}{2\sigma_n}t  +  (n+2)\left[2\log 2 + \frac{1}{3\sigma_n}t + \frac{1}{27\sigma_n^2}t^2 + O(n^{-3/2})\right] \\
& & \displaystyle  - \frac{1}{2} \left[2\log 3  - \log 2 + O(n^{-1/2})\right]  +  \frac{(n+1 - 2 \mu_n)}{2\sigma_n} t -  \frac{1}{2}(n+3)\log 2  + \log 3 \\
& & + O(2^{-n}) + O(r^{n})  \\
 & \ = \  &  \displaystyle  -\frac{(2\mu_n+1)}{2\sigma_n}t + \frac{(n+2)}{3\sigma_n}t  + \frac{(n+2)}{27\sigma_n^2}t^2 + O(n^{-1/2})    + O(2^{-n}) + O(r^{n}). \\
 \end{array}
 \end{equation}
Since $\mu_n \sim \frac{n}{3}$ and $\sigma_n^2 \sim \frac{2n}{27}$,  it follows that  $\log(M_{Y_n'}(t)) \rightarrow \frac{1}{2}t^2$ as $n \rightarrow \infty$. As this is the moment generating function of the standard normal, our proof is completed.
\end{proof}

\section{Average Gap Distribution}\label{sec:averagegap}

In this section we prove our results about the behavior of gaps between summands in Kentucky-2 decompositions. The advantage of studying the average gap distribution is that, following the methods  of  \cite{BBGILMT,BILMT},  we reduce the problem to a combinatorial one involving how many $m \in [0, a_{2n+1})$ have a gap of length $g$ starting at a given index $i$. We then write the gap probability as a double sum over integers $m$ and starting indices $i$, interchange the order of summation, and invoke our combinatorial results.

While the calculations are straightforward once we adopt this perspective, they are long. Additionally, it helps to break the analysis into different cases depending on the parity of $i$ and $g$, which we do first below and then use those results to determine the probabilities.

\begin{proof}[Proof of Theorem \ref{thm:gapstheorem}]
Let $I_{n}:=[0,a_{2n+1})$ and let $m\in I_{n}$ with the legal decomposition \begin{equation}m\ = \ a_{\ell_1} + a_{\ell_2}  + \cdots + a_{\ell_k}, \end{equation} with $\ell_1 < \ell_2 < \cdots < \ell_k$. For $1\leq i, g\leq n$ we define $X_{i,g}(m)$ as an indicator function which denotes whether the decomposition of $m$ has a gap of length $g$ beginning at $i$. Formally,
\begin{equation}X_{i,g}(m)\ = \ \begin{cases}1&\mbox{if $\exists \ j, \  1 \leq j \leq k$ with $i = \ell_j$ and $i+g = \ell_{j+1}$}\\0&\mbox{otherwise}.\end{cases}\end{equation}
Notice when $X_{i,g}(m)=1$, this implies that there exists a gap between $a_i$ and $a_{i+g}$. Namely $m$ does not contain $a_{i+1},\ldots,a_{i+g-1}$ as summands in its legal decomposition.

As the definition of the Kentucky-2 sequence implies $P(g)=0$ for  $0\leq g\leq 2$, we assume below that $g \ge 3$. Hence if $a_j$ is a summand in the legal decomposition of $m$ and  $a_j<a_i$, then the admissible $j$ are at most $i-4$ if and only if $i$ is even, whereas the admissible $j$ are at most $i-3$ if and only if $i$ is odd. We are interested in computing the fraction of gaps (arising from the decompositions of all $m\in I_n$) of length $g$. This probability is given by
\begin{equation}P_n(g)\ = \ c_n \displaystyle\sum_{m=0}^{a_{2n+1}-1}\displaystyle\sum_{i=1}^{2n-g}X_{i,g}(m),\end{equation}
where \be\label{eq:whatiscn} c_n\ =\ \frac{1}{(\mu_n-1)a_{2n+1}}.\ee

To compute the above mentioned probability we argue based on the parity of $i$. We find the contribution of gaps of length $g$ from even $i$ and odd $i$ separately and then add these two. The case when $g=3$ is a little simpler, as only even $i$ contribute (if $i$ were odd and $g=3$ we would violate the notion of Kentucky-2  legal). \\ \

\noindent\textbf{Part 1 of the Proof: Gap Preliminaries:} \\ \

\noindent \textbf{Case 1: $i$ is even:} Suppose that $i$ is even.  This means that $a_i$ is the largest entry in its bin. Thus the largest possible summand less than $a_i$ would be $a_{i-4}$. First we need to know the number of legal decompositions that only contain summands from $\{a_1,\ldots,a_{i-4}\}$, but this equals the number of integers that lie in $[0,a_{2\left(\frac{i-4}{2}\right)+1}) \ = [0,a_{i-3})$. By Equation \eqref{eq:expterm}, this is given by
\begin{equation} \ a_{2\left(\frac{i-4}{2}\right)+1}{\ = a_{i-3}} \ = \  \frac{1}{3}(2^{\frac{i}{2}}+(-1)^{\frac{i-2}{2}}).\end{equation}

Next we must consider the possible summands between $a_{i+g}$ and $a_{2n+1}$. There are two cases to consider depending on the parity of $i+g$. \\ \

\textbf{Subcase (i): $g$ is even:} Notice that if $i+g$ is even (that is when $g$ is even) and $a_j$ is a summand in the legal decomposition of $m$ with $a_{i+g} < a_j$, then $j \geq {i+g+3}$. In this case the number of  legal decompositions only containing summands from the set $\{a_{i+g+3}, a_{i+g+4}, \dots, a_{2n}\}$ is the same as the number of integers that lie in $[0, a_{(2n-(i+g+2)) + 1})$, which equals \be a_{(2n-(i+g+2)) + 1}\  = \ a_{2\left(\frac{2n-(i+g+2)}{2}+1\right) - 1}\ =\ \frac{1}{3}\left(2^{\frac{2n-(i+g)}{2}+1}+(-1)^{\frac{2n-(i+g)}{2}}\right).\ee
So for a fixed even $i,g$, the number of $m\in I_n$ that have a gap of length $g$ beginning at $i$ is
\be\frac{1}{9}(2^{\frac{i}{2}}+(-1)^{\frac{i-2}{2}})(2^{\frac{2n-(i+g)}{2}+1}+(-1)^{\frac{2n-(i+g)}{2}}).
\ee
Hence in this case  we have that
\begin{align}
\sum_{m=0}^{a_{2n+1}-1} \sum_{i =1 \atop i, g\ {\rm even}}^{2n-g}X_{i,g}(m)&\ = \

\frac{1}{9} \sum_{i =1 \atop i, g\ {\rm even}}^{2n-g}(2^{\frac{i}{2}}+(-1)^{\frac{i-2}{2}})(2^{\frac{2n-(i+g)}{2}+1}+(-1)^{\frac{2n-(i+g)}{2}}).
\end{align}
\ \\

\textbf{Subcase (ii): $g$ is odd:}  In the case when $i$ is even and $g$ is odd, {any legal decomposition of an integer $m\in I_n$ with a gap from $i$ to $i+g$ that contains summands $  a_j>a_{i+g}$} must have $j \geq i+g+4$. The number of  legal decompositions achievable only with summands in the set $\{a_{i+g+4}, a_{i+g+5}, \dots, a_{2n}\}$ is the same as the number of integers in the interval $[0, a_{2n-(i+g+2)})$, which is given by \be a_{2n-(i+g+2)} \ = \ a_{2\left(\frac{2n-(i+g+1)}{2}\right)-1}\ = \ \frac{1}{3}\left(2^{\frac{2n-(i+g+1)}{2}+1}+(-1)^{\frac{2n-(i+g+1)}{2}}\right).\ee Hence when $i$ is even and $g$ is odd we have that
\begin{align}
\sum_{m=0}^{a_{2n+1}-1} \sum_{i =1 \atop i\ {\rm even}, g\ {\rm odd}}^{2n-g} X_{i,g}(m)

&\ = \ \frac{1}{9} \sum_{i =1\atop i\ {\rm even}, g\ {\rm odd}}^{2n-g} (2^{\frac{i}{2}}+(-1)^{\frac{i-2}{2}}) \left(2^{\frac{2n-(i+g+1)}{2}+1}+(-1)^{\frac{2n-(i+g+1)}{2}}\right).

  \end{align}

\ \\

\textbf{Subcase (iii): $g = 3$:} As remarked above, there are no gaps of length 3 when $i$ is odd, and thus the contribution from $i$ even is the entire answer and we can immediately find that
\begin{align}
P_n(3)&\ =\ \frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{m=0}^{a_{2n+1}-1}\displaystyle\sum_{i=1\atop i\ {\rm even}}^{2n-3}X_{i,3}(m)\nonumber\\
&\ =\ \frac{1}{9}\frac{1}{9(\mu_n-1)a_{2n+1}} \sum_{i =1\atop i\ {\rm even}}^{2n-3} (2^{\frac{i}{2}}+(-1)^{\frac{i-2}{2}}) \left(2^{\frac{2n-(i+4)}{2}+1}+(-1)^{\frac{2n-(i+4)}{2}}\right)\nonumber\\
&\ =\ \frac{1}{9}\frac{1}{9(\mu_n-1)a_{2n+1}} \sum_{i =1\atop i\ {\rm even}}^{2n-3} 2^{n-1}+2^{\frac{i}{2}}(-1)^{\frac{2n-(i+4)}{2}}+2^{\frac{2n-(i+4)}{2}+1}(-1)^{\frac{i-2}{2}}+(-1)^{n-3}.
\end{align}
As the largest term in the above sum is $2^{n-1}$, we have
\be P_n(3) = \frac{c_n}{9}\left[(n-1)2^{n-1}+O(2^{n})\right].
\ee
Since $\mu_n \sim \frac{n}{3}$ and $a_{2n+1} \sim \frac{1}{3}(4\cdot2^n)$, using \eqref{eq:whatiscn} we find that up to lower order terms which vanish as $n\to\infty$ we have
\begin{align}\label{eq:whatiscmequalto}
\frac{1}{9(\mu_n-1)a_{2n+1}} \ \sim\ \frac{9}{n2^{n+2}}.
\end{align}
Therefore
\begin{align}&P_n(3)\ \sim\  \frac{1}{n2^{n+2}}\cdot \left[(n-1)2^{n-1}+O(2^{n})\right]\ = \ \frac{1}{8}\cdot\frac{n-1}{n}+O\left(\frac{1}{n}\right).
\end{align}
Now as $n$ goes to infinity we see that $P(3)=1/8$.

\ \\

\noindent\textbf{Case 2: $i$ is odd:} Suppose now that $i$ is odd. The largest possible summand less than $a_i$ in a legal decomposition is $a_{i-3}$. As before we now need to know the number of integers that lie in $[0,a_{2\left(\frac{i-3}{2}\right)+1})$, but this equals \be a_{2\left(\frac{i-3}{2}\right)+1}\ =\ a_{2\left(\frac{i-1}{2}\right)-1}\ = \ \frac{1}{3}\left(2^{\frac{i-1}{2}+1}+(-1)^{\frac{i-1}{2}}\right).\ee

We now need to consider the parity of $i+g$.

\ \\

\textbf{Subcase (i): $g$ is odd:} When $i$ and $g$ are odd, we know $i+g$ is even and therefore the first possible summand greater than $a_{i+g}$ is $a_{i+g+3}$.  Like before, the number of  legal decompositions using summands from the set $\{a_{i+g+3},a_{i+g+4}, \dots, a_{2n}\}$ is the same as the number of $m$ with legal decompositions using summands from the set $\{a_1, a_2, \dots, a_{2n-(i+g+2)}\}$, which is $\frac{1}{3}\left(2^{\frac{2n-(i+g)}{2}+1}+(-1)^{\frac{2n-(i+g)}{2}}\right)$.  This leads to
\begin{align}
{\displaystyle\sum_{m=0}^{a_{2n+1}-1}}\displaystyle\sum_{i =1\atop i\ {\rm odd}, g\ {\rm odd}}^{2n-g}X_{i,g}(m

 &\ = \ \frac{1}{9}\displaystyle\sum_{i =1\atop i\ {\rm odd}, g\ {\rm odd}}^{2n-g}(2^{\frac{i-1}{2}+1}+(-1)^{\frac{i-1}{2}})(2^{\frac{2n-(i+g)}{2}+1}+(-1)^{\frac{2n-(i+g)}{2}}).

  \end{align}

\ \\

\textbf{Subcase (ii): $g$ is even:} Following the same line of argument we see that if $i$ is odd and $g$ is even, then
\begin{align}
{\displaystyle\sum_{m=0}^{a_{2n+1}-1}}\displaystyle\sum_{i =1\atop i\ {\rm odd}, g\ {\rm even}}^{2n-g}X_{i,g}(m)

 &\ = \ \frac{1}{9}\displaystyle\sum_{i =1\atop i\ {\rm odd}, g\ {\rm even}}^{2n-g}(2^{\frac{i-1}{2}+1}+(-1)^{\frac{i-1}{2}})(2^{\frac{2n-(i+g+1)}{2}+1}+(-1)^{\frac{2n-(i+g+1)}{2}}).

  \end{align}

\ \\

Using these results, we can combine the various cases to determine the gap probabilities for different $g$. \\ \

\noindent\textbf{Part 2 of the Proof: Gap Probabilities:} \\ \

\noindent \textbf{Case 1: $g$ is  even:} As $g$ is even, we have $g=2j$ for some positive integer $j$. Therefore
\begin{align}
P_n(2j)&\ =\ \frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{m=0}^{a_{2n+1}-1}\displaystyle\sum_{i=1}^{2n-2j}X_{i,2j}(m)\\
&\ =\ \frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{m=0}^{a_{2n+1}-1}\displaystyle\sum_{i=1\atop i\ {\rm even}}^{2n-2j}X_{i,2j}(m)+\  \frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{m=0}^{a_{2n+1}-1}\displaystyle\sum_{i=1\atop i\ {\rm odd}}^{2n-2j}X_{i,2j}(m)\\
&\ = \frac{1}{9(\mu_n-1)a_{2n+1}}\left[\frac{1}{9} \sum_{i =1 \atop i\ {\rm even}}^{2n-2j}(2^{\frac{i}{2}}+(-1)^{\frac{i-2}{2}})(2^{\frac{2n-(i+2j)}{2}+1}+(-1)^{\frac{2n-(i+2j)}{2}})\right]\\\nonumber &\;\;\;\;\;\;+\  \frac{1}{9(\mu_n-1)a_{2n+1}}\left[ \frac{1}{9}\displaystyle\sum_{i =1\atop i\ {\rm odd}}^{2n-2j}(2^{\frac{i-1}{2}+1}+(-1)^{\frac{i-1}{2}})(2^{\frac{2n-(i+2j+1)}{2}+1}+(-1)^{\frac{2n-(i+2j+1)}{2}})\right]\\
&\ = \ \frac{1}{9}\frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{ i =1\atop i\ {\rm even}}^{2n-2j}(2^{n-j+1}+2^{\frac{i}{2}}(-1)^{\frac{2n-(i+2j)}{2}} + 2^{\frac{2n-(i+2j)}{2}+1}(-1)^{\frac{i-2}{2}}+(-1)^{n- j-1})\\\nonumber
 &\;\;\;\;\;\;\;\;+\frac{1}{9}\frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{i =1\atop i\ {\rm odd}}^{2n-2j}(2^{n-j+1}+2^{\frac{i-1}{2}+1}(-1)^{\frac{2n-(i+2j+1)}{2}}+ 2^{\frac{2n-(i+2j+1)}{2}+1}(-1)^{\frac{i-1}{2}}+(-1)^{n-j-1}).
  \end{align}

Notice that the largest terms in the above sums/expressions are given by $2^{n-j+1}$ and $ 2^{n-j+1}$, the sum of which gives $4(n-j)2^{n-j}$.
The rest of the terms are of lower order and are dominated as $n\to\infty$. Using \eqref{eq:whatiscmequalto} for $\frac{1}{9(\mu_n-1)a_{2n+1}}$ we find
\begin{align}&P_n(2j)\ \sim\ \frac{\frac{1}{9(\mu_n-1)a_{2n+1}}}{9} 4(n-j)2^{n-j}\ \sim\ \frac{1}{n2^{n+2}}\cdot 4(n-j)2^{n-j}\ = \ \frac{n-j}{n2^j},
\end{align}
and thus as $n$ goes to infinity we see that $P(2j)=1/2^j$.

\ \\

\noindent\textbf{Case 2: $g$ is odd:} As $g$ is odd we may write $g=2j+1$. Thus
\begin{align}
P_n(2j+1)&\ =\ \frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{m=0}^{a_{2n+1}-1}\displaystyle\sum_{i=1}^{2n-2j-1}X_{i,2j+1}(m)\\
&\ =\ \frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{m=0}^{a_{2n+1}-1}\displaystyle\sum_{i=1\atop i\ {\rm even}}^{2n-2j-1}X_{i,2j+1}(m)+\  \frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{m=0}^{a_{2n+1}-1}\displaystyle\sum_{i=1\atop i\ {\rm odd}}^{2n-2j-1}X_{i,2j+1}(m)\\
&\ = \frac{1}{9(\mu_n-1)a_{2n+1}}\left[\frac{1}{9} \sum_{i =1\atop i\ {\rm even}}^{2n-2j-1} (2^{\frac{i}{2}}+(-1)^{\frac{i-2}{2}}) \left(2^{\frac{2n-(i+2j+2)}{2}+1}+(-1)^{\frac{2n-(i+2j+2)}{2}}\right)\right]\\\nonumber
&\;\;\;\;\;\;+\  \frac{1}{9(\mu_n-1)a_{2n+1}}\left[\frac{1}{9}\displaystyle\sum_{i =1\atop i\ {\rm odd}}^{2n-2j-1}(2^{\frac{i-1}{2}+1}+(-1)^{\frac{i-1}{2}})(2^{\frac{2n-(i+2j+1)}{2}+1}+(-1)^{\frac{2n-(i+2j+1)}{2}}) \right]\\
&\ =\frac{1}{9}\frac{1}{9(\mu_n-1)a_{2n+1}} \sum_{i =1\atop i\ {\rm even}}^{2n-2j-1} 2^{n-j}+2^{\frac{i}{2}}(-1)^{\frac{2n-(i+2j+2)}{2}}+2^{\frac{2n-(i+2j+2)}{2}+1}(-1)^{\frac{i-2}{2}}+(-1)^{n-j-2}\\\nonumber
&\;\;\;\;\;\;+\ \frac{1}{9}\frac{1}{9(\mu_n-1)a_{2n+1}}\displaystyle\sum_{i =1\atop i\ {\rm odd}}^{2n-2j-1}2^{n-j+1}+2^{\frac{i-1}{2}+1}(-1)^{\frac{2n-(i+2j+1)}{2}}+2^{\frac{2n-(i+2j+1)}{2}+1}(-1)^{\frac{i-1}{2}}+(-1)^{n-j-1}.
  \end{align}
Notice that the largest terms in the above sums/expressions are given by $ 2^{n-j}$ and $2^{n-j+1}$, the sum of which gives $3(n-j)2^{n-j}$.
The rest of the terms are of lower order and are dominated as $n\to\infty$. Using \eqref{eq:whatiscmequalto} for $\frac{1}{9(\mu_n-1)a_{2n+1}}$ we find
\begin{align}&P_n(2j+1)\ \sim\ \frac{\frac{1}{9(\mu_n-1)a_{2n+1}}}{9} 3(n-j)2^{n-j}\ \sim\ \frac{1}{n2^{n+2}}\cdot3(n-j)2^{n-j}\ = \ \frac{3}{4}\cdot\frac{n-j}{n2^j},
\end{align} and thus as $n$ goes to infinity we see that $P(2j+1)=\frac{3}{4}\left(1/2^j\right)$.
\end{proof}

\begin{comment}
Notice that the largest terms in the above sums/expressions are given by $
\sqrt{2}\cdot2^{n-j}$ and $
(\sqrt{2})^3\cdot2^{n-j}$, the sum of which gives $\sqrt{2}(3)\cdot(n-j)2^{n-j}$.
The rest of the terms are of lower order and hence as $n$ increases the largest term is the one that plays the most important role.
Now considering that $\mu_n \sim \frac{n}{3}$ and $a_{2n+1} \sim \frac{1}{3}(4\cdot2^n)$, we see that
\begin{align}&\frac{1}{9(\mu_n-1)a_{2n+1}} \sqrt{2}(3)\cdot(n-j)2^{n-j} \sim 2^{-j}.\end{align}
Therefore when $g=2j$, we have shown that $P(g)=\frac{1}{2^j}$.

The case where $g=2j+1$ is similar and requires an analysis of the parity as done in the previous case. The important thing to note is that when $g=2j+1$ we have $P(g)= \frac{3}{2^{j+2}}$.
\end{comment}

\section{Conclusion and Future Work}\label{sec:conclusionandfuturework}

Our results generalize Zeckendorf's theorem to an interesting new class of recurrence relations, specifically to a case where the first coefficient is zero. While we still have uniqueness of decomposition here, that is not always the case. In a future work \cite{CFHMN1} we study another example with first coefficient zero, the recurrence $a_{n+1} = a_{n-1} + a_{n-2}$. This leads to what we call the Fibonacci quilt, and there uniqueness of decomposition fails.

Additionally, the Kentucky-2  sequence is but one of infinitely many $(s,b)$-Generacci recurrences; in \cite{CFHMN2} we extend the results of this paper to arbitrary $(s,b)$.


Follow-the-Leader models can be viewed as a numerical approximation to the Lighthill-Whitham-Richards model for traffic flow

Abstract: We show how to view the standard Follow-the-Leader (FtL) model as a numerical method to compute numerically the solution of the Lighthill--Whitham--Richards (LWR) model for traffic flow. As a result we offer a simple proof that FtL models converge to the LWR model for traffic flow when traffic becomes dense. The proof is based on techniques used in the analysis of numerical schemes for conservation laws, and the equivalence of weak entropy solutions of conservation laws in the Lagrangian and Eulerian formulation.

\section{Introduction} \label{sec:intro}
There are two paradigms in the mathematical modeling of traffic flow. One is based on an individual modeling of each vehicle with the dynamics governed by the distance between adjacent vehicles. The other is based on the assumption of dense traffic where the vehicles are represented by a density function, and individual vehicles cannot be identified. The dynamics is governed by a local velocity function depending solely on the density. The first model is denoted the Follow-the-Leader (FtL) model, and the second is called the Lighthill--Whitham--Richards (LWR) model  \cite{LW_II, richards} for traffic flow. Further refinements and extensions of these models are available. Intuitively, it is clear that the the FtL model should approach or approximate the LWR model in the case of heavy traffic, and that is what is proved here. This problem has been extensively studied, see \cite{Argall_etal,AwKlarMaterneRascle,ColomboRossi,CristianiSahu, 1605.05883,active,FrancescoRosini,GoatinRossi,1211.4619,HoldenRisebro_LWR,Rossi}.  Using numerical methods for scalar conservation laws we show that FtL models appear naturally as a numerical approximation of the LWR model. Thus we offer a short and direct proof that the FtL model converges to the LWR model, and our analysis is based on a careful study of the relationship between weak solutions in Lagrangian and Eulerian variables.

In the LWR model vehicles are described by a density $\rho=\rho(t,x)$ where $x$ is the position along the road, and $t$ as usual denotes time. Locally, one assumes that the velocity is given by a function $v$ that depends on the density only, that is, $v=v(\rho)$. If we consider unidirectional traffic on a homogenous road without exits or entries, conservation of vehicles requires that the  dynamics is governed by the scalar conservation law
   \begin{equation*}
  \rho_t+\big(\rho v(\rho)\big)_x=0,
  \end{equation*}
  which constitutes the LWR model. It is often denoted as ``traffic hydrodynamics'' due to its resemblance with fluid dynamics.

The FtL model can be described as follows. Consider $N$ vehicles with length $\ell$ and position
$z_1(t)<\dots<z_N(t)$ on the real axis with dynamics given by
\begin{align*}
  \dot z_i&=v\Bigl(\frac{\ell}{z_{i+1}-z_i}\Bigr) \ \text{ for $i=1,\dots, N-1$,} \\
  \dot{z}_N&=v_{\max}
\end{align*}
Here $v$ denotes a given velocity function with maximum $v_{\max}$, perhaps the speed
limit. Our proofs are considerably simpler when we have a
uniform bound on $z_{i+1}(t)-z_i(t)$. Having empty road ahead of the
first car would mean that ``$z_{N+1}-z_N=\infty$''. This is the same
as imposing $\dot{z}_N=v_{\max}$, and in this case $z_{i+1}(t)-z_i(t)$
would not be bounded by a constant independent of time. Therefore we
will in this paper assume that we model one of two alternatives: \\
{\bf Periodic case:}  We are in the periodic case in which $z_i\in [a,b]$ for some
  interval $[a,b]$, and
  \begin{equation*}
    \dot{z}_N(t) = v\left(\frac{\ell}{b-z_N(t)-a+z_1(t)}\right).
  \end{equation*}
{\bf Non-periodic case:} We imagine that there are infinitely many
  vehicles to the right of $z_N$, the distance between each of these vehicles
  is $M\ell$, for a finite, but arbitrary, constant $M>1$. In this case
  \begin{equation*}
    \dot{z}_N(t) = v\left(\frac{1}{M}\right).
  \end{equation*}

Introduce $y_i=(z_{i+1}-z_i)/\ell$ for $i=1,\dots, N-1$, to obtain
\begin{equation*}
  \dot y_i(t)=\frac1\ell\bigl(v(1/y_{i+1}(t))-v(1/y_i(t))\bigr).
\end{equation*}
In this paper we analyze the limit of this system of ordinary differential equations when $N\to\infty$. There are two ways to proceed.

We may analyze this system directly, in what we call the semi-discrete
case, see Section \ref{subsec:semidisc}.
By using methods from the theory of numerical methods for scalar
conservation laws we show that  the sequence
$\seq{y_i(t)}_{i=1}^{N-1}$ converges, as $\ell\to 0$ and $N\to\infty$, to a function $y(t,x)$
that satisfies the equation
\begin{equation}\label{eq:Lagrangey}
\begin{cases}
    y_t-V(y)_x=0 & t>0,\ x\in [0,1],\\
    y(0,x)=y_0(x) & x\in [0,1],\\
  \end{cases}
\end{equation}
where $V(y)=v(1/y)$, and
with boundary condition
\begin{equation*}
  \begin{cases}
    y(t,1)=y(t,0) \ &\text{ in the periodic case,}\\
    y(t,1)=M &\text{else.}
  \end{cases}
\end{equation*}
Note that $x$ is the Lagrangian mass coordinate, so that the integer part
of $x/\ell$ measures how many cars there are to the left of $x$.

Equation \eqref{eq:Lagrangey} is an example of a hyperbolic conservation law. It is well-known that solutions develop singularities, denoted shocks, in finite time independent of the smoothness of the initial data. Thus one needs to study weak solutions, and design so-called entropy conditions to identify the unique weak physical solution.  For a scalar conservation law $u_t+f(u)_x=0$ with initial data
$u|_{t=0}=u_0$, the unique weak entropy solution $u=u(t,x)$, which is an integrable function of bounded variation, satisfies the Kru\v{z}kov entropy condition
\begin{equation}
\int\int_0^\infty \big( \abs{u-k}\phi_t+\sgn{(u-k)}(f(u)-f(k))\phi_x\big) \, dtdx+\int \abs{u_0-k}\phi|_{t=0}\, dx \ge 0
\end{equation}
for all real constants $k\in\mathbb R$, and all non-negative test functions $\phi\in C^\infty_0(\mathbb R\times [0,\infty))$.  See \cite{HoldenRisebro}.

As an alternative approach, see Section \ref{subsec:eulerscheme}, we may discretize the time derivative by a small
positive ${\Delta t}$ and write $z^n_j \approx z_j(n\Delta t)$,
$y_j^{n}\approx y_j(n\Delta t)$, we have that
\begin{equation*}
  z^{n+1}_j = z^n_j + {\Delta t} V^n_j,\ \text{ and }\
  y_j^{n+1}=y_j^{n}+\frac{{\Delta t}}{\ell}\Bigl(
  V^n_{j+1}-V^n_j\Bigr),
\end{equation*}
where $V^n_j=V(y^n_j)$.
The key observation is that this is an approximation of the hyperbolic conservation law $y_t-V(y)_x=0$ by a monotone scheme, and from the classical result of Crandall--Majda \cite{CranMaj:Monoton}, see also \cite[Thm. 3.9]{HoldenRisebro}, we know that this scheme converges, as $\ell\to0$, $N\to \infty$, and ${\Delta t}\to 0$, to the entropy solution of equation \eqref{eq:Lagrangey}, namely $y_t-V(y)_x=0$.
Thus in both cases we obtain convergence to the same hyperbolic conservation law in Lagrangian coordinates.

Next we have to transform the result of the two approaches, both in
Lagrangian coordinates, to Eulerian coordinates. For smooth solutions
this is nothing but a simple exercise in calculus, but for weak
entropy solutions this is a deep result due to Wagner
\cite{Wagner}. To be specific, we introduce the Eulerian space
coordinate $z=z(t,x)$, with $z_x=y$ and $z_t=V(y)$.
A straightforward (but formal) calculation reveals that the Eulerian functions satisfy
\begin{equation*} \label{eq:E_L1}
  y_t=-\frac1{\rho^2}\bigl(
  \rho_t+\rho_z v\bigr), \quad V(y)_x=\frac1{\rho} v'(\rho)\rho_z,
\end{equation*}
and hence
\begin{equation*
  \rho_t+\bigl(\rho v(\rho) \bigr)_z=0,
\end{equation*}
which is nothing but the LWR model.
These formal transformations are not valid in general for weak entropy solutions. However, thanks to the fundamental result of Wagner \cite{Wagner}, weak entropy solutions in Lagrangian coordinates transform into weak entropy solutions in Eulerian variables.
The approach here bears some resemblance to the approach in \cite{HoldenRisebro_LWR}, where the proof is obtained in a grid-less manner,
and it does not depend on the use of  Crandall--Majda and Wagner.

\section{The model}\label{sec:model}
Let us first introduce the FtL model.  Consider $N$ vehicles moving on
a one-dimensional road. Their position is given as a function of time
$t$ as $z_1(t), \dots, z_N(t)$. For the moment (we shall actually show
that this is so below) we assume that $z_1(t)<z_2(t)<\cdots <
z_N(t)$. We introduce the ``local inverse density'' by
\begin{equation*}
  y_i = \frac{1}{\ell}\big(z_{i+1}-z_i\big), \ \ i=1,\ldots,N-1,
\end{equation*}
where $\ell$ is the length of each vehicle. The velocity of the vehicle at
$z_i$ is
assumed to be a function of the distance to the vehicle in front, at
$z_{i+1}$. This means that
\begin{equation} \label{eq:FLT}
  \dot z_i(t)=v\Bigl(\frac{\ell}{z_{i+1}(t)-z_i(t)}\Bigr), \quad i=1,\dots, N-1.
\end{equation}
Regarding the first vehicle, located at $z_N$, we either assume that
there are infinitely many equally spaced vehicles in front of it, i.e., $y_N=M$, or that we are in the
periodic setting in an interval $[a,b]$, so that the distance from the
vehicle at $z_N$ to the vehicle at $z_1$ is $b-z_N + z_1 -a$, i.e.,
$y_N=(b-z_N+z_1-a)/\ell$. We have
\begin{equation}\label{eq:FLT_N}
  \dot{z}_N(t)=v\Bigl(\frac{1}{y_N(t)}\Bigr).
\end{equation}
Regarding the velocity function $v$, we assume it to be a
decreasing Lipschitz continuous function such that
\begin{equation}
\text{$v(0)=v_{\max}$ and
$v(\rho)=0$ for $\rho\ge 1$.}\label{eq:Vass}
\end{equation}
The prototypical example is $v(\rho)=v_{\max}\max\seq{0,1-\rho}$. We
define the velocity in Lagrangian variables by $V(y)=v(1/y)$.
Observe that $V$ is  globally bounded, Lipschitz continuous
and increasing for $y\ge 1$, with a bounded Lipschitz constant $L_v$.

Rewriting \eqref{eq:FLT} in terms of $\seq{y_i}$ we get
\begin{equation}
  \label{eq:FLTy}
  \dot{y}_i = \frac{1}{\ell}
  \left(V({y_{i+1}})-V(y_{i})\right),
  \qquad i=1,\ldots,N-1,
\end{equation}
and
\begin{equation}
  \label{eq:FLTyN}
  y_N=
  \begin{cases}
    M, & \text{non-periodic case,}\\
    \frac{1}{\ell}(b-z_N + z_1 - a), & \text{periodic case.}
  \end{cases}
\end{equation}
Let us also define the \emph{Lagrangian grid} $\seq{x_{i-1/2}}_{i=1}^N$ by
$x_{i-1/2}=(i-1)\ell$. We shall also assume throughout that there is a
constant $1\le K < \infty$, $K$ independent of $N$ and $\ell$, such that
\begin{equation}
  \label{eq:initialass}
  1\le y_j(0)\le K,\qquad \sum_{j=1}^{N-1}\abs{y_{j+1}(0)-y_j(0)}\le K.
\end{equation}

\subsection{The semi-discrete case}\label{subsec:semidisc}
In this section we show that the solution of the system \eqref{eq:FLTy}  of ordinary differential equations
converges to an entropy solution of \eqref{eq:CLy} as
$\ell\to 0$, and that ``$1/y$'' converges to an entropy solution of
\eqref{eq:LWRz}.

Concretely, we define the piecewise constant function
\begin{equation}\label{eq:helerommet}
y_\ell(t,x)=y_j(t), \quad x\in (x_{j-1/2},x_{j+1/2}].
\end{equation}
We shall also
use the notation
\begin{equation*}
  D_+ h_j = \frac{1}{\ell}\big(h_{j+1}-h_j\big)
\end{equation*}
for the forward difference. Let
\begin{equation*}
  y^+ = \max\seq{y,0}\ \text{ and }\ y^-
  = - \min\seq{y,0},
\end{equation*}
and let $H$ denote the Heaviside function
\begin{equation*}
  H(y)=
  \begin{cases}
    0 &y\le 0,\\ 1 &y>0.
  \end{cases}
\end{equation*}
\begin{lemma}
  Let $y_j(t)$ solve the system \eqref{eq:FLTy}. Then
  \begin{subequations}
    \begin{align}
      \label{eq:pluss}
      \frac{d}{dt} \left(y_j-k\right)^+ &\le
      D_+\left[H(y_j-k)\left(V(y_j)-V(k)\right)\right], \\
      \frac{d}{dt} \left(y_j-k\right)^- &\le
      D_+\left[-H(k-y_j)\left(V(y_j)-V(k)\right)\right], \label{eq:minus}
    \end{align}
  \end{subequations}
  for any constant $k$.
\end{lemma}
\begin{proof}
 Throughout we use the notation $V_j=V(y_j)$.
  We have that
  \begin{align*}
    \frac{d}{dt} \left(y_j-k\right)^+ &=
    \frac{1}{\ell} H(y_j - k)\left(V_{j+1}-V_j\right)\\
    &=\frac{1}{\ell} \left[H(y_{j+1}-k)(V_{j+1}-V(k)) -
      H(y_j-k)(V_j-V(k))\right] \\
    &\quad - \frac{1}{\ell}\left(H(y_{j+1}-k)-H(y_j-k)\right)
    \left(V_{j+1}-V(k)\right)\\
    &=D_+\left[H(y_j-k)(V_j-V(k))\right]\\
    &\quad - \frac{1}{\ell}\left(H(y_{j+1}-k)-H(y_j-k)\right)
    \left(V_{j+1}-V(k)\right).
  \end{align*}
  Now
  \begin{align*}
    (H(y_{j+1}-k)&-H(y_j-k))
    \left(V_{j+1}-V(k)\right)\\
    & =
    \begin{cases}
      0 & \text{$y_j$, $y_{j+1}\ge k$ or $y_j$, $y_{j+1}\le k$,}\\
      V_{j+1}-V(k)  & y_j<k<y_{j+1},\\
      V(k)-V_{j+1} & y_{j+1}<k<y_j,
    \end{cases}\\
    &\ge 0,
  \end{align*}
  since $y\mapsto V(y)$ is increasing. This proves \eqref{eq:pluss}; estimate
  \eqref{eq:minus} is proved similarly.
\end{proof}
Now define $y_j(t)=y_1(t)$ for $j<1$ and $y_j(t)=y_{N-1}(t)$ for
$j>N-1$ in the non-periodic case. In the periodic case we define
$y_j(t)$ by periodic extension. To save space, we also use the
convention that in the non-periodic case, sums over $j$ range over all
$j\in \mathbb Z$, while in the periodic case, sums range over
$j=1,\ldots,N-1$.
\begin{lemma}
  \label{lem:bnd}
  If $1\le y_j(0)\le K$, then $1\le y_j(t)\le K$ for $t>0$.
\end{lemma}
\begin{proof}
  From \eqref{eq:pluss} and \eqref{eq:minus} we have
  \begin{equation*}
    \frac{d}{dt}\sum_j \left(y_j(t)-k\right)^{\pm} \le 0.
  \end{equation*}
  Thus if $y_j(0)\le K$ for all $j$, then $y_j(t)<k$ for any constant
  $k>K$. Similarly $y_j(t)>k$ for any constant $k<1$ if $y_j(0)\ge 1$
  for all $j$.
\end{proof}
\begin{lemma}\label{lem:l1cont}
  If $\seq{\tilde{y}_j(t)}_{j=1}^{N-1}$ is another solution of
  \eqref{eq:FLTy} and  \eqref{eq:FLTyN} with initial data $\tilde{y}_j(0)$, then
  \begin{equation}
    \label{eq:l1cont}
    \sum_j \abs{y_j(T)-\tilde{y}_j(T)}\le \sum_j \abs{y_j(0)-\tilde{y}_j(0)},
  \end{equation}
  for $T>0$.
\end{lemma}
\begin{proof}
  Adding \eqref{eq:pluss} and \eqref{eq:minus}, and observing that
  \begin{equation*}
    (y-k)^++(y-k)^-=\abs{y-k}\ \text{ and }\
    H(y-k)-H(k-y) = \sign{y-k},
  \end{equation*}
  we find that
  \begin{equation}\label{eq:discentropy}
    \frac{d}{dt}\abs{y_j-k} \le D_+\left[\sign{y_j-k}\left(V(y_j)-V(k)\right)\right].
  \end{equation}
  Set
  $q(y,k)=\sign{y-k}(V(y)-V(k))$. Choosing $k=\tilde{y}_j(\tau)$ in
  the inequality for $y_j(t)$ and $k=y_j(t)$ in the inequality for
  $\tilde{y}_j(\tau)$, and adding the two inequalities, give
  \begin{equation*}
    \left(\frac{d}{dt}+\frac{d}{d\tau}\right)
    \abs{y_j(t)-\tilde{y}_j(\tau)} \le \left(D_{+,1}+D_{+,2}\right)
    q\left(y_j(t),\tilde{y}_j(\tau)\right),
  \end{equation*}
  where $D_{+,1(2)}$ denotes the difference with respect to the first
  (second) argument. Summing over $j$, multiplying with a non-negative
  test
  function $\varphi(t,\tau)$, where $\varphi\in C^\infty_0((0,\infty)^2)$,
  and integrating by parts yield
  \begin{equation*}
    \int_0^\infty\int_0^\infty \left(\varphi_t+\varphi_\tau\right) \sum_j
    \abs{y_j(t)-\tilde{y}_j(\tau)}\,d\tau dt \ge 0,
  \end{equation*}
  since taking the sum makes the right-hand side ``telescope''. Now we
  can use Kru\v{z}kov's trick, see \cite[Sec.~2.4]{HoldenRisebro}, and choose
  \begin{equation*}
    \varphi(t,\tau)=\psi\left(\frac{t+\tau}{2}\right)\omega_\varepsilon(t-\tau),
  \end{equation*}
  where $\psi\in C^\infty_0((0,\infty))$, $\psi\ge 0$ and
  $\omega_\varepsilon$ is a standard mollifier, to obtain, as $\varepsilon\to0$, that
  \begin{equation*}
    \int_0^\infty \psi'(t)\sum_j \abs{y_j(t)-\tilde{y}_j(t)}\,dt \ge 0.
  \end{equation*}
  Choose $\psi$ to be a smooth approximation to the
  characteristic function of the interval $(t_1,t_2)\subset (0,T)$,
  to get
  \begin{equation*}
    \sum_j \abs{y_j(t_2)-\tilde{y}_j(t_2)}\le \sum_j \abs{y_j(t_1)-\tilde{y}_j(t_1)}.
  \end{equation*}
  The lemma follows by letting $t_1\downarrow 0$ and $t_2\uparrow T$. For details, see \cite[Sec.~2.4]{HoldenRisebro}.
\end{proof}
\begin{lemma}
  \label{lem:compact}
  Assume that $1\le y_j(0)\le K$ and that
  $\sum_j\abs{y_{j+1}(0)-y_j(0)}\le K$ for some constant $K$
  independent of $\ell$. Then there is a sequence $\seq{\ell_i}$,
  where $\ell_i \to 0$ as $i\to \infty$, and there exists a function $y\in C([0,T];L^1([0,1])$ such that $y_{\ell_i}$ converges to $y$
  in $C([0,T];L^1([0,1])$.
\end{lemma}
\begin{proof}
  Lemma~\ref{lem:bnd} shows that $\seq{y_\ell}_\ell$ is bounded
  independently of $\ell$;  choosing $\tilde{y}_j=y_{j+1}$ and using
  Lemma~\ref{lem:l1cont} yields the $BV$ bound on
  $\seq{y_\ell(t)}_\ell$ uniformly in $\ell$ and $t$. Choosing
  $\tilde{y}_j(t)=y_j(t-\sigma)$ in Lemma~\ref{lem:l1cont} for some $0<\sigma<t$ gives
  \begin{align*}
    \norm{y_\ell(t,\, \cdot\,)-y_\ell(t-\sigma,\, \cdot\,)}_{L^1}&=
    \ell\sum_j \abs{y_j(t)-y_j(t-\sigma)} \\
    &\le \ell \sum_j \abs{y_j(\sigma)-y_j(0)}\\
    &\le \sum_j \int_0^\sigma \abs{V(y_{j+1}(\xi))-V(y_j(\xi))}\,d\xi
    \\
    &\le \norm{V}_{\mathrm{Lip}} \sum_j \int_0^\sigma
    \abs{y_{j+1}(\xi)-y_{j}(\xi)}\,d\xi\\
    & \le \norm{V}_{\mathrm{Lip}} \sigma \sum_j \abs{y_{j+1}(0)-y_j(0)}\\
    &\le \norm{V}_{\mathrm{Lip}} \sigma K.
  \end{align*}
  Hence the map $t\mapsto y_\ell(t,\, \cdot\,)$ is $L^1$ Lipschitz
  continuous, with a Lipschitz constant independent of $\ell$. Thus by
  \cite[Thm.~A.11]{HoldenRisebro}, the family
  $\seq{y_\ell}_{\ell>0}$ is compact in $C([0,\infty);L^1([0,1]))$.
\end{proof}
Furthermore we assume that as $N$ increases, the initial position of
the vehicles are such that there is a function $y_0(x)$ such that
\begin{equation}
  \lim_{\ell\to 0} y_\ell(0,\, \cdot\,)=y_0(\, \cdot\,), \label{eq:limitass}
\end{equation}
and that this convergence is in $L^1([0,1])$. We also assume that $\norm{y_0}_{L^\infty([0,1])}\le K$,
without loss of generality we can then also assume that
$\norm{y_\ell(0,\, \cdot\,)}_{L^\infty([0,1])}\le K$.

It is now straightforward, starting from the discrete entropy
inequality \eqref{eq:discentropy}, to show that any limit of
$\seq{y_\ell}_{\ell>0}$ is the unique entropy solution to
\eqref{eq:CLy} by following a standard Lax--Wendroff argument, see \cite[Thm.~3.4]{HoldenRisebro}.
Thus the whole sequence $\seq{y_\ell}$ converges, and
the unique entropy solution to \eqref{eq:Lagrangey} is the limit
\begin{equation*}
  y=\lim_{\ell\to 0} y_\ell.
\end{equation*}
Introduce the Eulerian spatial coordinate $z$, given by the equations
\begin{equation*}
  \frac{\partial z}{\partial x}=y,\qquad \frac{\partial z}{\partial t}=V(y),
\end{equation*}
and the variable $\rho=1/y$.
We can now proceed following the argument of Wagner~\cite{Wagner} to
obtain that $\rho$ is the unique weak entropy solution to the LWR model
\begin{equation}\label{eq:LWRz}
  \begin{cases}
    \rho_t+\bigl(\rho v(\rho) \bigr)_z=0, &t>0,\\
    \rho(0,z)=\rho_0(z).
  \end{cases}
\end{equation}

We can also study the convergence in Eulerian coordinates directly by defining a discrete version of the
transformation from Lagrangian to Eulerian coordinates.
To define the discrete version of $\rho$, we need the approximate
Eulerian coordinate; $z_\ell(t,x)$.  Define
\begin{equation*}
  z_\ell(t,x)=\frac{1}{\ell} \big(x_{j+1/2}-x\big)z_j(t)+
\frac{1}{\ell} \big(x-x_{j-1/2}\big)  z_{j+1}(t), \ \text{for $x\in [x_{j-1/2},x_{j+1/2}]$,}
\end{equation*}
where $\seq{z_j(t)}$ solves \eqref{eq:FLT}. Then
\begin{align*}
  \frac{\partial z_\ell}{\partial t}&=\frac{1}{\ell}\big(x_{j+1/2}-x\big) V_j+\frac{1}{\ell}\big(x-x_{j-1/2}\big)
  V_{j+1},\\
  \frac{\partial z_\ell}{\partial x}&= y_j,
\end{align*}
for $x\in (x_{j-1/2},x_{j+1/2})$. The sequence $\seq{z_\ell}_{\ell>0}$
is  uniformly Lipschitz continuous. Hence
by the Arzel{\`a}--Ascoli theorem, it converges uniformly to a Lipschitz continuous limit
$z(t,x)$ satisfying $z_t=V(y)$ and $z_x=y$ almost
everywhere. Furthermore the map $x\mapsto z_\ell(t,x)$ is invertible,
with inverse $x_\ell(t,z)$. In the periodic case we set
\begin{subequations}
  \label{eq:zlrdef}
  \begin{equation}
    z_{l,\ell}(t)=a,\ \
    z_r(t)=b, \label{eq:zlrdefper}
\end{equation}
otherwise we define
\begin{equation}
  z_{l,\ell}(t)=z_\ell(t,0),\ \
  z_r(t)=b+tV(M)=z(t,1)=z_\ell(t,1).\label{eq:zlrdefnonper}
\end{equation}

Observe that $z_{l,\ell}(t)=z_\ell(t,0)\to z(t,0)=z_l(t)$ as $\ell\to
0$.
\end{subequations}
Define
\begin{equation}
  \label{eq:rhosemi}
  \rho_\ell(t,z)=\frac{1}{y_\ell(t,x_\ell(t,z))} \ \text{ for $z\in[z_{l,\ell}(t),z_r(t)]$.}
\end{equation}
In the periodic case, we define $\rho_\ell$ by periodic continuation,
while in the non-periodic case we define
\begin{equation*}
  \rho_\ell(t,z)=
  \begin{cases}
    0 &z<z_{l,\ell},\\
    1/M &z>z_r.
  \end{cases}
\end{equation*}
Next we claim that
\begin{equation}\label{eq:rhoelllim}
  \rho_\ell(t,z)\to \rho(t,z)=\tilde\rho(t,x(t,z))
\end{equation}
in $L^1([z_l,z_r])$ as $\ell\to 0$. To see this, define
$\tilde\rho_\ell(t,x)=1/y_\ell(t,x)$, and compute
\begin{align*}
  \norm{\rho(t,\, \cdot\,)-\rho_\ell(t,\, \cdot\,)}_{L^1} &=
  \norm{\tilde\rho(t,x(t,\, \cdot\,))-\tilde\rho_\ell(t,x_\ell(t,\, \cdot\,))}_{L^1}\\
  &\le
  \underbrace{\norm{\tilde\rho(t,x(t,\, \cdot\,))-\tilde\rho(t,x_\ell(t,\, \cdot\,))}_{L^1}}_{A}\\
 &\quad +\underbrace{\norm{
      \tilde\rho(t,x_\ell(t,\, \cdot\,))-\tilde\rho_\ell(t,x_\ell(t,\, \cdot\,))}_{L^1}}_{B}.
\end{align*}
We have that
\begin{align*}
  A&=\int_{z_l}^{z_r}
  \abs{\tilde\rho(t,x(t,z))-\tilde\rho(t,x_\ell(t,z))}\,dz\\
  &\le \Bigl(\int_{\min\seq{z_l,z_{l,\ell}}}^{\max\seq{z_l,z_{l,\ell}}} +
  \int_{\max\seq{z_l,z_{l,\ell}}}^{z_r}\Bigr)
  \abs{\tilde\rho(t,x(t,z))-\tilde\rho(t,x_\ell(t,z))}\,dz.
\end{align*}
Since $\tilde\rho_\ell$ and $\tilde\rho$ are both bounded by $1$, and
$z_{l,\ell}\to z_l$ as $\ell\to 0$, the first of these integrals tend
to zero.
Since $x_\ell\to x$ uniformly, the integrand tends to zero almost
everywhere, and is bounded by $2$. Hence by the dominated convergence
theorem, the last integral tends to zero. The same argument applies to
$B$. Thus the claim \eqref{eq:rhoelllim} is justified.

Summing up, we have shown the following result.
\begin{theorem}
  \label{thm:semidiscrete}
   Assume that the function $v$ satisfies \eqref{eq:Vass}.
  Let $\seq{y_j}_{j=1}^{N-1}$ satisfy \eqref{eq:FLTy}, with either
  periodic boundary conditions; $y_N(t)=y_1(t)$, or $y_N(t)=M$ for
  some fixed constant $M>1$.  Assume that the initial positions
  of the vehicles $\seq{z_i(0)}_{i=1}^{N}$ are such the we can define a
  bounded function $y_0$ by \eqref{eq:limitass}, and that
   \eqref{eq:initialass} holds, namely that the initial data are bounded
  with finite total variation.  \\
 (i) The piecewise constant (in space) function $y_\ell(t,x)$ defined by \eqref{eq:helerommet} converges
 in $C([0,T];L^1([0,1])$ as $\ell\to0$  to the unique weak entropy solution $y$ of \eqref{eq:Lagrangey}.
 The function $\rho=1/y$ satisfies the LWR model \eqref{eq:LWRz} in Eulerian variables. \\
 (ii) The function
  $\rho_\ell$ defined by \eqref{eq:rhosemi} converges in $C([0,T];L^1([0,1])$ as $\ell\to0$  to the unique
 weak entropy solution $\rho$ of \eqref{eq:LWRz}.
\end{theorem}

\subsection{Analysis of the Euler scheme for \eqref{eq:FLT}}
\label{subsec:eulerscheme}
The simplest numerical method to approximate solutions of
\eqref{eq:FLT} is the forward Euler scheme, viz.,
\begin{equation}
  \label{eq:FLT_euler}
  z_i((n+1){\Delta t})=z_i(n{\Delta t}) + {\Delta t}
  v\Bigl(\frac{\ell}{z_{i+1}(n{\Delta t})-z_i(n{\Delta t})}\Bigr),
\end{equation}
where ${\Delta t}$ is a (small) positive number.

If we write the Euler scheme \eqref{eq:FLT_euler} in the $y$ variable,
we get
\begin{equation}
  \label{eq:FLTy_euler}
  y^{n+1}_i = y^n_i + \lambda
  \left(V^{n}_{i+1}-V^n_i\right),\qquad i=1,\ldots,N-1,
\end{equation}
where $y^n_i=y_i(t^n)$, $t^n=n{\Delta t}$, $\lambda={\Delta t}/\ell$  and $V^n_i=V(y^n_i)$. As a (right)
boundary condition we use
\begin{equation}\label{eq:boundarycl}
  V^n_N =
  \begin{cases}
    V(M) & \text{non-periodic,}\\
    V^n_1   & \text{periodic.}
  \end{cases}
\end{equation}
For $t\ge 0$ and $x\in [0,(N-1)\ell]$ define the function
\begin{equation*}
  y_\ell(t,x)=y^n_i \quad (t,x)\in [t^n,t^{n+1})\times (x_{i-1/2},x_{i+1/2}].
\end{equation*}
Observe that we can rewrite \eqref{eq:FLTy_euler} as
\begin{equation*}
  y^{n+1}_i = \left(1-\lambda\theta^n_{i+1/2}\right) y^n_i + \lambda\theta^n_{i+1/2} y^n_{i+1},
\end{equation*}
where
\begin{equation*}
  \theta^n_{i+1/2}=-\frac{V^n_{i+1}-V^n_i}{y^n_{i+1}-y^n_i} \ge 0,
\end{equation*}
and since $V$ is Lipschitz continuous, $\theta^n_{i+1/2}\le L_v$. Hence if the CFL-condition
\begin{equation}
  \label{eq:CFL}
  \lambda L_v \le 1,
\end{equation}
holds, then $y^{n+1}_i$ is a convex combination of $y^n_i$ and $y^n_{i+1}$. Thus
the scheme \eqref{eq:FLTy_euler} is monotone. In passing, we note that
a consequence is that if $1\le y^0_i\le K$ for all $i$, then $1\le y^n_i\le K$
for all $i$.  Regarding the position of vehicles, this means that if
$z_{i}(0)\le z_{i+1}(0)-\ell$, then $z_{i}(t^n)\le z_{i+1}(t^n)-\ell$.
So from a road safety perspective, the model is rather optimistic.

We are now interested in taking the limit as $\ell\to 0$. We do this
by increasing the number of vehicles such that $(N-1)\ell=1$; furthermore
we assume that \eqref{eq:limitass} holds.  Now
the conditions are such that fundamental results  of Crandall and
Majda \cite{CranMaj:Monoton}, see also \cite[Thm. 3.9]{HoldenRisebro},
can be applied. Thus we know that there is a function $y\colon\mathbb R_0^+\times
[0,1] \to \mathbb R$, with $y\in C(\mathbb R^+;L^1([0,1]))$, such that
\begin{equation*}
  y_\ell(t,x) \to y(t,x),
\end{equation*}
with the limit being in $C(\mathbb R^+;L^1([0,1]))$,
and that $y$ is the unique entropy solution to the Cauchy problem
\begin{equation}
  \label{eq:CLy}
  \begin{cases}
    y_t - V(y)_x = 0, \qquad &t>0, x\in [0,1],\\
    y(0,x)=y_0(x).
  \end{cases}
\end{equation}
If we do not have periodic conditions, this is supplemented with the
boundary condition
\begin{equation*}
  y(t,1) = M, \quad t>0.
\end{equation*}
We remark that since the characteristic speeds of \eqref{eq:CLy} are strictly
negative, this boundary condition can be enforced strictly.

Note that the convergence of $y_\ell$ and the bounds $1\le y_\ell \le
M$, imply the convergence of $\tilde\rho_\ell = 1/y_\ell$ to some function
$\tilde\rho$. We now proceed to show how $\tilde\rho$ is related to
the solution of the LWR model.

We also define the discrete ``Lagrange to Euler'' map $\tilde{z}_\ell$ as
follows. Let
\begin{equation*}
  \tilde{z}^n_{i+1/2}=\tilde{z}^n_{i-1/2} + \ell y^n_i, \quad
  \text{i.e.,}\ \tilde{z}^n_{i+1/2}=z^n_{i+1}.
\end{equation*}
Since $z^n_i$ solves \eqref{eq:FLT_euler}, we also have that
\begin{equation*}
  \tilde{z}^{n+1}_{i+1/2}=\tilde{z}^n_{i+1/2} + {\Delta t} v^n_{i+1}.
\end{equation*}
Define $\tilde{z}_\ell(t^n,x_{i+1/2})=\tilde{z}^n_{i+1/2}$, and by bilinear
interpolation between these points. For later use we employ the
notation for the value of $\tilde{z}_\ell$ at the edges of the
``\emph{Lagrangian grid}'',
\begin{align*}
  \tilde{z}_{i+1/2}(t)&=\frac{1}{{\Delta t}}\left((t^{n+1}-t)\tilde{z}^n_{i+1/2} +
    (t-t^n)\tilde{z}^{n+1}_{i+1/2}\right),\ \text{for $t\in [t^n,t^{n+1}]$},\\
  \tilde{z}^{n}(x)&=\frac{1}{\ell}\left((x_{i+1/2}-x) \tilde{z}^{n}_{i-1/2}
  + (x-x_{i-1/2})\tilde{z}^n_{i+1/2}\right), \ \text{for $x\in [x_{i-1/2},x_{i+1/2}]$.}
\end{align*}
Observe that $\tilde{z}_{i-1/2}(t)$ coincides with the approximate trajectory
of the vehicle starting at $z_i(0)$ calculated by the Euler method \eqref{eq:FLT_euler}.
Since $y_\ell$ is bounded, we can
invoke the Arzel{\`a}--Ascoli theorem to establish the convergence
\begin{equation*}
  \lim_{\ell\to 0} \tilde{z}_\ell(t,x)=z(t,x),
\end{equation*}
with the limit being in $C([0,T]\times[0,1])$ and $z\in\ C([0,T]\times[0,1])$,
and that
\begin{equation*}
  \frac{\partial z}{\partial x}=y, \qquad \frac{\partial z}{\partial t}=V(y),
\end{equation*}
weakly. We have that the map $x \mapsto \tilde{z}_\ell(t,x)$ is invertible for each $t$, we
denote the inverse map by $x_\ell$, so that
$x_\ell(t,z_\ell(t,x))=x$.
Define $z_{l,\ell}$ and $z_r$ as in \eqref{eq:zlrdef} and $\rho_\ell$
as in \eqref{eq:rhosemi}.

Note that if $z\in
(z_{i-1/2}(t),z_{i+1/2}(t)]$ and $t\in [t^n,t^{n+1})$, then
\begin{equation*}
  x_\ell(t,z)\in (x_{i-1/2},x_{i+1/2}], \quad
  \rho_\ell(t,z)=\tilde\rho^n_i:=\frac{1}{y^n_i}.
\end{equation*}
As before we have that
\begin{equation*}
  \rho_\ell(t,z)\to \rho(t,z)=\tilde\rho(t,x(t,z))
\end{equation*}
in $L^1([z_l,z_r])$ as $\ell\to 0$.

By Wagner's result \cite{Wagner}, we have proved the following theorem.
\begin{theorem}
  \label{thm:fullydiscrete}
  Assume that the function $v$ satisfies \eqref{eq:Vass}.
  Let $\ell>0$ and $N\in\mathbb N$, let $\seq{z_j}_{j=1}^N$ satisfy
  \eqref{eq:FLT_euler}, and assume that either we are in the periodic case
  $z_j\in [0,1]$, or that $z_N$ satisfies the boundary condition
  \eqref{eq:FLT_N}, with $y_N=M$. Assume that the initial positions
  of the vehicles $\seq{z_i(0)}_{i=1}^{N}$ are such the we can define a
  bounded function $y_0$ by \eqref{eq:limitass}, and that
  \eqref{eq:initialass} holds.

  Define the function $\rho_\ell(t,z)$ by \eqref{eq:rhosemi}.

  Let $N$ and $\ell$ satisfy $(N-1)\ell=1$ and assume that the
  CFL-condition \eqref{eq:CFL} holds.

  As $\ell\to 0$, $\rho_\ell$
  converges in $C([0,\infty);L^1)$ to the
  unique entropy solution $\rho$ of the conservation law \eqref{eq:LWRz}.

\end{theorem}
To illustrate the ideas in this paper we show how the method works in
a concrete example. We have a periodic road in the interval $z\in
[-1,1]$, and choose to position $N$ vehicles in this interval so that
\begin{equation*}
  \rho_\ell(0,z)\approx \frac12\left(\cos(\pi z)+1\right).
\end{equation*}
In Figure~\ref{fig:1} we show the Lagrangian grid and the
corresponding mapping to Eulerian coordinates for $N=20$, and $t\in
[0,2]$.
\begin{figure}[h!]
  \centering
  \begin{tabular}{rl}
    \includegraphics[width=0.45\linewidth]{Lagrange}
    &    \includegraphics[width=0.45\linewidth]{Eulerian}
  \end{tabular}
  \caption{Left: the Lagrangian grid $\seq{(t^n,x_{i-1/2})}_{i=1}^N$.  Right: the Eulerian grid $\seq{(t^n,z^n_{i-1/2})}_{i=1}^N$. In both cases $n=0,\ldots, 40$.}
  \label{fig:1}
\end{figure}
The vertical lines in the Eulerian coordinates are also the paths
followed by the vehicles, and the grid in Eulerian coordinates is the
result of applying the map $z_\ell$ to the rectangular grid depicted
in Lagrangian coordinates on the left. In Figure~\ref{fig:2}, we show
the approximate density $\rho_\ell$ at $t=0$ and $t=2$ in Eulerian
coordinates.
\begin{figure}[h!]
  \centering
  \includegraphics[width=0.5\linewidth]{density}.
  \caption{The approximate density $\rho_\ell$ for $t=0$ and $t=2$ in Eulerian coordinates.}
  \label{fig:2}
\end{figure}
We see that the solution at $t=2$ approximates the ubiquitous ``$N$-wave''.