This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A267177 #34 Nov 25 2023 08:35:42 %S A267177 1,2,1,2,3,3,1,3,3,4,2,4,1,4,2,4,5,4,4,5,1,5,4,4,5,6,3,2,3,6,1,6,3,2, %T A267177 3,6,7,5,5,5,5,7,1,7,5,5,5,5,7,8,4,5,2,5,4,8,1,8,4,5,2,5,4,8,9,6,3,6, %U A267177 6,3,6,9,1,9,6,3,6,6,3,6,9,10,5,6,4,2,4,6,5,10,1,10,5,6,4,2,4,6,5 %N A267177 Irregular triangle read by rows: successive bottom and right-hand borders of the infinite square array in A072030 (which gives number of subtraction steps needed to compute GCD). %C A267177 Officially the borders are read starting at the bottom left, reading horizontally until the main diagonal is reached, and then reading vertically upwards until the top row is reached. %C A267177 However, in this case both borders are symmetric about their midpoints, and the bottom border is the same as the right-hand border, so the direction in which the borders are read is less critical. %H A267177 R. J. Mathar, <a href="/A267177/b267177.txt">Table of n, a(n) for n = 1..10000</a> %e A267177 The array in A072030 begins: %e A267177 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... %e A267177 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, ... %e A267177 3, 3, 1, 4, 4, 2, 5, 5, 3, 6, ... %e A267177 4, 2, 4, 1, 5, 3, 5, 2, 6, 4, ... %e A267177 5, 4, 4, 5, 1, 6, 5, 5, 6, 2, ... %e A267177 6, 3, 2, 3, 6, 1, 7, 4, 3, 4, ... %e A267177 7, 5, 5, 5, 5, 7, 1, 8, 6, 6, ... %e A267177 8, 4, 5, 2, 5, 4, 8, 1, 9, 5, ... %e A267177 9, 6, 3, 6, 6, 3, 6, 9, 1, 10, ... %e A267177 10, 5, 6, 4, 2, 4, 6, 5, 10, 1, ... %e A267177 ... %e A267177 The successive bottom and right-hand borders are: %e A267177 1, %e A267177 2, 1, 2, %e A267177 3, 3, 1, 3, 3, %e A267177 4, 2, 4, 1, 4, 2, 4, %e A267177 5, 4, 4, 5, 1, 5, 4, 4, 5, %e A267177 6, 3, 2, 3, 6, 1, 6, 3, 2, 3, 6, %e A267177 7, 5, 5, 5, 5, 7, 1, 7, 5, 5, 5, 5, 7, %e A267177 ... %p A267177 A267177 := proc(n,k) %p A267177 if k <= n then %p A267177 A072030(n,k) ; %p A267177 else %p A267177 A072030(2*n-k,n) ; %p A267177 end if; %p A267177 end proc: %p A267177 seq(seq(A267177(n,k),k=1..2*n-1),n=1..10) ; # _R. J. Mathar_, May 07 2016 %t A267177 A072030[n_, k_] := A072030[n, k] = Which[n < 1 || k < 1, 0, n == k, 1, n < k, A072030[k, n], True, 1+A072030[k, n-k]]; %t A267177 A267177[n_, k_] := If[k <= n, A072030[n, k], A072030[2n-k, n]]; %t A267177 Table[A267177[n, k], {n, 1, 10}, {k, 1, 2n-1}] // Flatten (* _Jean-François Alcover_, Apr 23 2023, after _R. J. Mathar_ *) %o A267177 (PARI) \\ Based on _Michel Marcus_'s program for A049834. %o A267177 tabl(nn) = {for (n=1, nn, %o A267177 for (k=1, n, a = n; b = k; r = 1; s = 0; while (r, q = a\b; r = a - b*q; s += q; a = b; b = r); print1(s, ", "); ); %o A267177 for (k=1, n-1, a = n; b = n-k; r = 1; s = 0; while (r, q = a\b; r = a - b*q; s += q; a = b; b = r); print1(s, ", "); ); %o A267177 print(); ); } %o A267177 tabl(12) %Y A267177 Cf. A072030, A049834, A267178 (parity). %K A267177 nonn,tabf,easy %O A267177 1,2 %A A267177 _N. J. A. Sloane_, Jan 14 2016