# Profitable Double-Spending Attacks
## Appendix C  
**Proof of Proposition 1. ** We use a generating function and generalized hypergeometric functions to compute the infinite summations in Equation (19). By substituting \(P_{DsA,i}\) in Equation (15) and \(f_{T_{i}}(t)\) in Equation (14) into Equation (19), we arrive at  
\[ \begin{array}{ll}f_{T_{DSA}}(t)-(1-\mathbb{P}_{DSA})\delta(t-\infty)&=\sum \limits_{j=N_{BC}}^{j=2N_{BC}}\Biggl{(}\begin{array}{c}j-1\\ N_{BC}-1\end{array}\Biggr{)}\int\limits_{i=2N_{BC}+1}^{\infty}C_{i2N_{BC}-j}P_{ A}\frac{i+1}{2}p_{H}\frac{(i+1)}{2}\frac{\lambda_{i}p_{i}+1-x_{i}+1}{(i-1)!}\\ &\qquad\qquad\qquad+\sum\limits_{i=2N_{BC}+1}^{\infty}\Biggl{(}\begin{array}[ ]{c}i-1\\ N_{BC}-1\end{array}\Biggr{)}p_{H}N_{BC}p_{A}i^{-N_{BC}}\frac{\lambda_{i}p_{i}+1-x _{i}+1}{(i-1)!}.\end{array}  \tag{28}\]  
By rearranging the indices of summations and the order of operands, we obtain  
\[ \begin{array}{ll}f_{T_{DSA}}(t)-(1-\mathbb{P}_{DSA})\delta(t-\infty)&=\sum \limits_{j=N_{BC}}^{j=2N_{BC}}\Biggl{(}\begin{array}{c}j-1\\ N_{BC}-1\end{array}\Biggr{)}\sum\limits_{i=0}^{\infty}\Bigl{(}C_{i2N_{BC}-j}p_{ A}N_{BC}+i+1}p_{H}N_{BC}+i..\frac{\lambda_{i}\pi^{2N_{BC}+2i+1}\pi^{2N_{BC}+2i} \Bigr{)}\\ &+\Bigl{(}\frac{p_{H}}{p_{A}}\Bigr{)}N_{BC}e^{-x_{i}}\Biggl{(}\sum\limits_{i=N_ {BC}}^{i-1}\Biggl{(}\begin{array}{c}i-1\\ N_{BC}-1\end{array}\Biggr{)}p_{A}i\frac{\lambda_{i}p_{i}+1}{(i-1)!}-\sum\limits _{i=N_{BC}}^{2N_{BC}}\Biggl{(}\begin{array}{c}i-1\\ N_{BC}-1\end{array}\Biggr{)}p_{A}i\frac{\lambda_{i}p_{i}+1}{(i-1)!}\Bigr{)}\end{array}  \tag{29}\]  
We can define two generating functions as  
\[B(x):=\sum\limits_{i=0}^{\infty}C_{i2N_{BC}-j}\frac{x^{i}}{(2N_{BC}+2i)!}=(2N_ {BC}-j+1)\sum\limits_{i=0}^{\infty}\frac{(2i+2N_{BC}-j)!}{i(i+2N_{BC}-j+1)!} \frac{x^{i}}{(2N_{BC}+2i)!}, \tag{30}\]  
and  
\[H(x):=\sum\limits_{i=N_{BC}}^{\infty}\Biggl{(} \begin{array}{c}i-1\\ N_{BC}-1\end{array} \Biggr{)}\frac{x^{i-1}}{(i-1)! }=\sum\limits_{i=N_{BC}-1}^{ \infty}\Biggl{(} \begin{array}{c}i\\ N_{BC}-1\end{array} \Biggr{)}\frac{x^{i}}{i!}. \tag{31}\]  
By substituting \(B(x)\) and \(H(x)\) into Equation (29), we obtain  
\[ \begin{array}{ll}f_{T_{DSA}}(t)-(1-\mathbb{P}_{DSA})\delta(t-\infty)&=\sum \limits_{j=N_{BC}}^{j=2N_{BC}}\Biggl{(}\begin{array}{c}j-1\\ N_{BC}-1\end{array}\Biggr{)}p_{A}\lambda_{i}\pi e^{-\lambda_{i}t}\Bigl{(}p_{A}p_ {H}(\lambda_{i}\pi t)^{2}\Bigr{)}^{N_{BC}}B\Bigl{(}p_{A}p_{H}(\lambda_{i}\pi t )^{2}\Bigr{)}\\ &+\Bigl{(}\frac{p_{H}}{p_{A}}\Bigr{)}N_{BC}^{\infty}e^{-x_{i}t}\biggl{(}p_{A} \lambda_{i}\pi H(p_{A}\lambda_{i}\pi t)-\sum\limits_{i=N_{BC}}^{2N_{BC}} \Biggl{(}\begin{array}{c}i-1\\ N_{BC}-1\end{array}\Biggr{)}p_{A}i\frac{\lambda_{i}\pi^{i-1}}{(i-1)!}\biggr{)}. \end{array}  \tag{32}\]  
We replace function \(B(x)\) in Equation (A30) with the generalized hypergeometric functions (See Appendix E for definition). For this purpose, we first denote the sequences in \(B(x)\) by  
\[\beta_{i}:=\frac{(2i+2N_{BC}-j)!}{i(i+2N_{BC}-j+1)!}\frac{1}{(2N_{BC}+2i)!}, \tag{33}\]  
and  
\[\beta_{0}:=\frac{1}{(2N_{BC}-j+1)(2N_{BC})!}. \tag{34}\]  
Next, the function \(B(x)\) can be rewritten as  
\[B(x)=(2N_{BC}-j+1)\sum\limits_{i=0}^{\infty}\beta_{i}x^{i}=(2N_{BC}-j+1)\beta _{0}\biggl{(}x^{0}+\frac{\beta_{1}}{\beta_{0}}x^{1}+\frac{\beta_{2}}{\beta_{1} }\frac{\beta_{1}}{\beta_{0}}x^{2}+\cdots\biggr{)}. \tag{35}\]  
The reformulated sequence in Equation (A35) is computed by  
\[\frac{\beta_{i+1}}{\beta_{i}}=\frac{(i+1+N_{BC}-j/2)(i+1/2+N_{BC}-j/2)}{(i+2+2N _{BC}-j)(i+1+N_{BC})(i+1/2+N_{BC})(i+1)}, \tag{36}\]  
which has 2 polynomials in \(i\) on the numerator and 3 polynomials in \(i\) except for \((i+1)\) on the denominator. \(B(x)\) can be expressed in terms of a generalized hypergeometric function \({}_{2}F_{3}\)[28] as follows,  
\[ \begin{array}{ll}B(x)&=(2N_{BC}-j+1)\beta_{0}\,{}_{2}F_{3}\Bigl{(}\mathbf{a} _{j};\mathbf{b}_{j};x\Bigr{)}\\ &\qquad=\frac{1}{(2N_{BC})!}\,{}_{2}F_{3}\Bigl{(}\mathbf{a}_{j};\mathbf{b}_{j} ;x\Bigr{)},\end{array}