|
|
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).
|
|
3
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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.
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.
|
|
LINKS
|
|
|
EXAMPLE
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
2, 1, 3, 2, 4, 3, 5, 4, 6, 5, ...
3, 3, 1, 4, 4, 2, 5, 5, 3, 6, ...
4, 2, 4, 1, 5, 3, 5, 2, 6, 4, ...
5, 4, 4, 5, 1, 6, 5, 5, 6, 2, ...
6, 3, 2, 3, 6, 1, 7, 4, 3, 4, ...
7, 5, 5, 5, 5, 7, 1, 8, 6, 6, ...
8, 4, 5, 2, 5, 4, 8, 1, 9, 5, ...
9, 6, 3, 6, 6, 3, 6, 9, 1, 10, ...
10, 5, 6, 4, 2, 4, 6, 5, 10, 1, ...
...
The successive bottom and right-hand borders are:
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, 3, 6,
7, 5, 5, 5, 5, 7, 1, 7, 5, 5, 5, 5, 7,
...
|
|
MAPLE
|
if k <= n then
else
end if;
end proc:
|
|
MATHEMATICA
|
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]];
|
|
PROG
|
tabl(nn) = {for (n=1, nn,
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, ", "); );
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, ", "); );
print(); ); }
tabl(12)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|