You can generate Pythagorean triples where $B-A=\pm1$ in sequence with a seed Triple: $T_0=(0,0,1)$ using the following formula:
$$A_{n+1}=3A_n+2C_n+1\qquad B_{n+1}=3A_n+2C_n+2\qquad C_{n+1}=4A_n+3C_n+2$$
For example, it generates the following
$$T_1=(3,4,5)\qquad T_2=(20,21,29)\qquad T_3=(119,120,169)\qquad T_4=(697,696,985)$$
Another way to generate them directly is using Pell numbers that will feed Euclid's formula
$$P_n=\frac{(1+\sqrt2)^n-(1-\sqrt2)^2}{2\sqrt2}$$
This [Pell] function generates the series $1, 2, 5, 12, 29, 70, 169 ...$ and is a shoe-in for the $(m,n)$ pairs that generate $T_1, T_2, T_3 ...$ shown above. You find them using $\quad m_x=P_{x+1}\quad n_x=P_x\quad $ to obtain the following pairs (excuse using the letter P to describe pairs instead of individual Pell numbers):
$$P_1=(2,1)\quad P_2=(5,2)\quad P_3=(12,5)\quad P_4=(29,12)\quad P_5=(70,29)\quad P_6=(169,70)\quad ...$$
Once you have these, you plug them into Euclid's formula:
$$A=m^2-n^2\qquad B=2mn\qquad C=m^2+n^2$$
The first $19$, generated in a spreadsheet with a $15$-digit limit are:
$$f(2,1)=(3,4,5)$$
$$f(5,2)=(21,20,29)$$
$$f(12,5)=(119,120,169)$$
$$f(29,12)=(697,696,985)$$
$$f(70,29)=(4059,4060,5741)$$
$$f(169,70)=(23661,23660,33461)$$
$$f(408,169)=(137903,137904,195025)$$
$$f(985,408)=(803761,803760,1136689)$$
$$f(2378,985)=(4684659,4684660,6625109)$$
$$f(5741,2378)=(27304197,27304196,38613965)$$
$$f(13860,5741)=(159140519,159140520,225058681)$$
$$f(33461,13860)=(927538921,927538920,1311738121)$$
$$f(80782,33461)=(5406093003,5406093004,7645370045)$$
$$f(195025,80782)=(31509019101,31509019100,44560482149)$$
$$f(470832,195025)=(183648021599,183648021600,259717522849)$$
$$f(1136689,470832)=(1070379110497,1070379110496,1513744654945)$$
$$f(2744210,1136689)=(6238626641379,6238626641380,8822750406821)$$
$$f(6625109,2744210)=(36361380737781,36361380737780,51422757785981)$$
$$f(15994428,6625109)=(211929657785303,211929657785304,299713796309065)$$