%I #35 Jun 12 2022 08:16:41
%S 1,0,2,1,0,3,0,1,2,1,0,4,0,2,0,1,3,1,0,5,0,2,2,0,1,1,2,0,1,4,1,0,6,0,
%T 3,0,2,0,1,2,0,1,5,1,0,7,0,3,2,0,2,3,0,1,1,3,0,1,2,2,0,1,6,1,0,8,0,4,
%U 0,2,1,2,0,2,0,1,1,1,2,0,1,3,0,1,7,1,0,9,0,4,2,0,3,0,2,4,0,1,1,4,0,1,2,0,1,3,2,0,1,8,1
%N Irregular triangle read by rows: continued fraction expansion of k/n, 1 <= k <= n.
%C This sequence contains the terms of the continued fraction expansion of all fractions involving integers between 0 and 1, excluding 0/n.
%C The number of distinct continued fractions in row n is equal to A000010(n).
%H Matthew Campbell and Robert Israel, <a href="/A260616/b260616.txt">Table of n, a(n) for n = 1..22438</a> (rows 1 to 100, flattened; n = 1..1722 from Matthew Campbell)
%e Triangle begins ({} included for fraction separation):
%e {1}
%e {0, 2}, {1}
%e {0, 3}, {0, 1, 2}, {1}
%e {0, 4}, {0, 2}, {0, 1, 3}, {1}
%e {0, 5}, {0, 2, 2}, {0, 1, 1, 2}, {0, 1, 4}, {1}
%e {0, 6}, {0, 3}, {0, 2}, {0, 1, 2}, {0, 1, 5}, {1}
%e {0, 7}, {0, 3, 2}, {0, 2, 3}, {0, 1, 1, 3}, {0, 1, 2, 2}, {0, 1, 6}, {1}
%e {0, 8}, {0, 4}, {0, 2, 1, 2}, {0, 2}, {0, 1, 1, 1, 2}, {0, 1, 3}, {0, 1, 7}, {1}
%e {0, 9}, {0, 4, 2}, {0, 3}, {0, 2, 4}, {0, 1, 1, 4}, {0, 1, 2}, {0, 1, 3, 2}, {0, 1, 8}, {1}
%e ...
%p seq(seq(op(numtheory:-cfrac(k/n,'quotients')),k=1..n),n=1..10); # _Robert Israel_, Sep 04 2015
%t Table[ContinuedFraction[k/n], {n, 9}, {k, n}] // Flatten (* _Michael De Vlieger_, Sep 04 2015 *)
%o (PARI) row(n) = {v = []; for (k=1, n, v = concat(v, contfrac(k/n));); v;}
%o tabf(nn) = for (n=1, nn, print(row(n), ", ")) \\ _Michel Marcus_, Sep 04 2015
%Y Denominator: A002024; Numerator: A002260.
%Y Cf. A000010, A072193 (0<k<n).
%K nonn,cofr,tabf
%O 1,3
%A _Matthew Campbell_, Sep 03 2015
|