OFFSET
1,3
COMMENTS
This sequence contains the terms of the continued fraction expansion of all fractions involving integers between 0 and 1, excluding 0/n.
The number of distinct continued fractions in row n is equal to A000010(n).
LINKS
Matthew Campbell and Robert Israel, Table of n, a(n) for n = 1..22438 (rows 1 to 100, flattened; n = 1..1722 from Matthew Campbell)
EXAMPLE
Triangle begins ({} included for fraction separation):
{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, 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}, {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}
...
MAPLE
seq(seq(op(numtheory:-cfrac(k/n, 'quotients')), k=1..n), n=1..10); # Robert Israel, Sep 04 2015
MATHEMATICA
Table[ContinuedFraction[k/n], {n, 9}, {k, n}] // Flatten (* Michael De Vlieger, Sep 04 2015 *)
PROG
(PARI) row(n) = {v = []; for (k=1, n, v = concat(v, contfrac(k/n)); ); v; }
tabf(nn) = for (n=1, nn, print(row(n), ", ")) \\ Michel Marcus, Sep 04 2015
CROSSREFS
KEYWORD
nonn,cofr,tabf
AUTHOR
Matthew Campbell, Sep 03 2015
STATUS
approved