AA !LF1mmWigHQ ID: 2e0689 May 11, 2020, 6:55 p.m. No.10723   🗄️.is 🔗kun

For a[t]=an and a(n-1), (e,1,t)'s d minus (f,1,t)'s d is (e,n)'s a minus one. For a[t]=bn and b(n-1), (e,1,t)'s d minus (f,1,t)'s d is (e,n)'s b plus one. This means you don't have to use gcd(a[t], a[t]) to find a or b (O(1) vs O(log n)).

 

e.g. 13x43=559

(e,1) a=na = (30,1,6) = {30:1:75:10:65:87}

(f,1) a=a(n-1) = (-17,1,6) = {-17:1:63:11:52:76}

75-63=12, one less than a

(e,1) a=bn = (30,1,11) = {30:1:235:20:215:257}

(f,1) a=b(n-1) = (-17,1,10) = {-17:1:191:19:172:212}

235-191=44, one more than b

 

e.g. 7*29=203

(e,1) a=na = (7,1,4) = {7:1:35:7:28:44}

(f,1) a=a(n-1) = (-22,1,5) = {-22:1:29:8:21:39}

35-29=6, one less than a

(e,1) a=bn = (7,1,8) = {7:1:131:15:116:148}

(f,1) a=b(n-1) = (-22,1,8) = {-22:1:101:14:87:117}

131-101=30, one more than b