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.

A177405 Form triangle of weighted Farey fractions; read numerators by rows.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 10 2010

Keywords

Comments

Start with the list of fractions 0/1, 1/1 and repeatedly insert the weighted mediants (2a+c)/(2b+d) and (a+2c)/(b+2d) between every pair of adjacent elements a/b and c/d of the list. The fractions are to be reduced before the insertion step.
James Propp asks: Does every fraction between 0 and 1 with odd denominator appear in the triangle?

Examples

			Triangle begins:
0 1
- -
1 1
0 1 2 1
- - - -
1 3 3 1
0 1 2 1 4 5 2 5 4 1
- - - - - - - - - -
1 5 7 3 9 9 3 7 5 1
0 1 .2 1 .4 .5 2 .5 .4 1 2 3 4 13 14 5 4 3 2 .9 12 5 14 13 4 .9 6 1
- - -- - -- -- - -- -- - - - - -- -- - - - - -- -- - -- -- - -- - -
1 7 11 5 17 19 7 17 13 3 5 7 9 27 27 9 7 5 3 13 17 7 19 17 5 11 7 1
		

References

  • James Propp, Posting to the Math Fun Mailing List, Dec 10 2010.

Crossrefs

Programs

  • Mathematica
    Mma code from James Propp:
            Lengthen[L_] :=
             Module[{i, M}, M = Table[0, {3 Length[L]}];
              M[[1]] = Numerator[L[[1]]]/(2 + Denominator[L[[1]]]);
              M[[2]] = 2*Numerator[L[[1]]]/(1 + 2 Denominator[L[[1]]]);
              For[i = 1, i < Length[L], i++, M[[3 i]] = L[[i]];
               M[[3 i + 1]] = (2 Numerator[L[[i]]] +
                   Numerator[L[[i + 1]]])/(2 Denominator[L[[i]]] +
                   Denominator[L[[i + 1]]]);
               M[[3 i + 2]] = (Numerator[L[[i]]] +
                   2 Numerator[L[[i + 1]]])/(Denominator[L[[i]]] +
                   2 Denominator[L[[i + 1]]])]; M[[3 Length[L]]] = L[[Length[L]]];
               Return[M]]
            WF[n_] := WF[n] = If[n == 0, {1}, Lengthen[WF[n - 1]]]

Extensions

a(45)-a(80) and some corrected terms from Nathaniel Johnston, Apr 12 2011