Fibonacci and the spreading of viruses

biologyexponential functionmathematical modelingsequences-and-series

I tried to understand better the spreading of a virus on a case-by-case basis, not by differential or difference equations as in SIR and SEIR models with possibly non-integer rates and time constants.

In the course of this, Fibonacci numbers showed up in a – for me – unexpected way. And a relation between Fibonacci numbers and powers of $2$ showed up that I'd like to understand better.

This was my approach. Let $\lambda$ be the pre-infectious (or latent) period, and let $\lambda = 1$ (e.g. $1$ day). Let $\delta$ be the duration of infectiousness, e.g. $\delta = 4$. After $\lambda + \delta$ days, an infected individual recovers. Finally let $\beta$ be the infection rate, i.e. the number of people an infectious individual infects per day. Let $\beta = 1$. This choice of $\beta$ and $\delta$ corresponds to a basic reproduction number $R_0 = \beta\cdot\delta = 4$.

In a deterministic and idealized setup the number of infected indiviudals $I$ evolves like this starting with a single patient 0, neglecting the effect of the decreasing number of susceptible individuals:

    1  1  1  1  1                        (patient 0)
       1  1  1  1  1                     (patient 1)
          2  2  2  2  2                  (patients 2 and 3)
             4  4  4  4   4              (patients 4 to  7)
                8  8  8   8   8          (patients 8 to 15)
                  15 15  15  15  15      ...
                     29  29  29  29  29  ...
                         56  56  56  56  ...
                            108 108 108  ...
                                208 208  ...
I = 1  2  4  8 16 30 58 112 216 416 ...
∆ =                2  6  16  40  96 ...
          

Obviously, $I(t) = 2^t$ when $t < \lambda + \delta$. For $t \ge \lambda + \delta$, $I(t)$ deviates from $2^t$, in this example by

∆ = 2, 6, 16, 40, 96, 222, 502, 1116, 2448, 5312, 11426, 24398, 51776, 109296, 229664, 480670

which is a sequence not to be found at OEIS, but I guess it's the number of binary strings of length $n$ having at least one run of length at least $5$ (see below).

For the sake of comparison here for $\delta = 2$

    1  1  1                   
       1  1  1                    
          2  2  2                 
             3  3  3              
                5  5  5          
                   8  8  8
                     13 13  13   
                        21  21  21   
                            34  34 34
                                55 55 ...
I = 1  2  4  6 10 16 26 42  68 110 ...
∆ =          2  6 16 38 86 188 402 ...

[I(n) is obviously twice the $n$-th Fibonacci number. The Fibonacci numbers come also as the numbers of newly infected individuals per day – but only in this very special case $\delta = 2$. According to OEIS, the sequence $\Delta$ gives the number of $n$-tosses having a run of $3$ or more heads or a run of $3$ or more tails for a fair coin resp. the difference between the number of branches of a complete binary tree of $n$ levels, and the number of recursive calls needed to compute the $(n+1)$-th Fibonacci number.]

And for $\delta = 3$:

    1  1  1  1                         
       1  1  1  1                    
          2  2  2  2                   
             4  4  4  4               
                7  7  7  7            
                  13 13 13  13        
                     24 24  24  24    
                        44  44  44  44 
                            81  81  81 ...
                               149 149 ...
I = 1  2  4  8 14 26 48 88 162 298 ...
∆ =             2  6 16 40  94 214 ...        

[According to OEIS, the sequence $\Delta$ gives the number of binary strings of length n having at least one run of length at least 4.]

I am looking for a general formula

$I_{\lambda\delta\beta}(t) = 2^t – \Delta_{\lambda\delta\beta}(t)$

relating in the special case of $\lambda = \beta = 1$ and $\delta =2$ the Fibonacci numbers with the powers of $2$.

A specific side question:

What has the number of recursive calls needed to compute the $n$-th
Fibonacci number to do with the number of binary strings of length $n$
having at least one run of length at least $3$?
(see above)


For $\lambda = \beta = 1$ and large $\delta$, e.g. $\delta =20$, the first non-zero terms of $\Delta_{\lambda\delta\beta}$ are

∆ = 2, 6, 16, 40, 96, 224, 512, 1152, 2560, 5632, 12288, 26624, 57344, 122880, 262144, 557056, 1179648, 2490368, 5242880, 11010048

which is the initial part of the sequence $a(n) = n\cdot 2^{n-2}$ (see OEIS).


Edit 1: The link, user @heropup provided, yields this insight:

enter image description here

Edit 2: There is a follow-up question to this one: Fibonacci and tossing coins.

Best Answer

In the case where $\lambda = \beta = 1$, and $\delta$ is the only free parameter, the leading diagonal in your table is given by the $\delta$-step recurrence relation $$a_t = \sum_{k=1}^\delta a_{t-k},$$ with initial conditions $$a_k = \begin{cases}0, & k < 0, \\ 1, & k = 0 . \end{cases}$$ This is a generalization of the familiar Fibonacci sequence. Then $$I_t = \sum_{k=0}^{\delta} a_{t-k} = a_{t+1} + a_{t-\delta}$$ and $$\Delta_t = 2^t - I_t = 2^t - (a_{t+1} + a_{t-\delta}).$$ Consequently, a closed form solution for $a_t$ would yield the desired sequences. This is given by the formula $$a_t = \left[\frac{r_\delta^{t-1} (r_\delta-1)}{(\delta+1)r_\delta-2\delta}\right],$$ where $[ \cdot ]$ denotes the nearest integer function (i.e., rounding), and $r_\delta$ is the real root of the polynomial $$z^{\delta+1} - 2z^\delta + 1 = 0$$ that is nearest in value to $2$. Therefore, the computation of $a_t$ for large values of $t$ relies on a high-precision computation of the value of this root. This is feasible via Newton's method with initial guess $z_0 = 2$: $$z_{k+1} = z_k - \frac{z_k^{\delta+1} - 2z_k^\delta + 1}{(\delta+1)z_k^\delta - 2\delta z_k^{\delta-1}} = \frac{z_k (2 + \delta(z_k-2) - z_k^{-\delta})}{z_k + \delta(z_k-2)}.$$ It is worth noting that since $r_\delta = 2 - \epsilon$ with $\epsilon > 0$ for sufficiently large $\delta$, that $$a_t \approx (2-\epsilon)^{t-1} \frac{1-\epsilon}{2-\epsilon(\delta+1)},$$ thus is approximately exponential with constant of proportionality $$C = \frac{1-\epsilon}{2-\epsilon(\delta+1)} \to \frac{1}{2}.$$ One might explore the asymptotic behavior of $C$ as a function of $\delta$ more precisely.

As even this single-parameter case is not particularly tractable, I have little hope that the general case for $\beta$ and $\lambda$ will be any better. This is why discrete-time difference equations are not as commonly used in models. The analogous differential equation is more tractable, and when discretized, makes for roughly equivalent behavior in most cases.