cp's OEIS Frontend

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.

A294442 Kepler's tree of fractions, read across rows (the fraction i/j is represented as the pair i,j).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 4, 2, 5, 3, 5, 1, 5, 4, 5, 3, 7, 4, 7, 2, 7, 5, 7, 3, 8, 5, 8, 1, 6, 5, 6, 4, 9, 5, 9, 3, 10, 7, 10, 4, 11, 7, 11, 2, 9, 7, 9, 5, 12, 7, 12, 3, 11, 8, 11, 5, 13, 8, 13, 1, 7, 6, 7, 5, 11, 6, 11, 4, 13, 9, 13, 5, 14, 9, 14, 3, 13, 10, 13, 7, 17, 10, 17, 4, 15, 11, 15, 7, 18, 11
Offset: 0

Views

Author

N. J. A. Sloane, Nov 20 2017

Keywords

Comments

The first row contains the single fraction 1/1,
the second row contains the single fraction 1/2,
and thereafter below each fraction i/j we write two fractions i/(i+j), j/(i+j).
If we just look at the numerators we recover the same sequence, and if we just look at the denominators we get A086593 with the terms (after the first) repeated.
Sequence A020651 is almost the same as this, except that it lacks one of the initial 1's, and the definition focuses on single numbers rather than pairs of numbers or fractions. For that reason it seems to be best to have a separate entry (this sequence) for the actual tree.

Examples

			The tree begins as follows:
..............1/1
...............|
..............1/2
.........../.......\
......1/3.............2/3
...../....\........../...\
..1/4.....3/4.....2/5.....3/5
../..\..../..\..../..\..../..\
1/5.4/5.3/7.4/7.2/7.5/7.3/8.5/8
		

Crossrefs

A different version of the Kepler tree is described in A093873.
See A294446 for the tree of Farey fractions.

Programs

  • Maple
    # S[n] is the list of fractions, written as pairs [i,j], in row n of Kepler's triangle
    S[0]:=[[1,1]]; S[1]:=[[1,2]];
    for n from 2 to 10 do
    S[n]:=[];
    for k from 1 to nops(S[n-1]) do
    t1:=S[n-1][k];
    a:=[t1[1],t1[1]+t1[2]];
    b:=[t1[2],t1[1]+t1[2]];
    S[n]:=[op(S[n]),a,b];
    od:
    lprint(S[n]);
    od:
  • Mathematica
    Map[{Numerator@ #, Denominator@ #} &, #] &@ Flatten@ Nest[Append[#, Flatten@ Map[{#1/(#1 + #2), #2/(#1 + #2)} & @@ {Numerator@ #, Denominator@ #} &, Last@ #]] &, {{1/1}, {1/2}}, 5] // Flatten (* Michael De Vlieger, Apr 18 2018 *)