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.

Showing 1-5 of 5 results.

A177903 Consider the weighted Farey tree A177405/A177407; a(n) = row at which the denominator 2n+1 first appears (assumes first row is labeled row 0).

Original entry on oeis.org

0, 1, 2, 2, 2, 3, 3, 4, 3, 3, 4, 4, 4, 3, 4, 4, 5, 5, 5, 5, 4, 4, 5, 4, 5, 6, 4, 4, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 6, 7, 6, 6, 6, 6, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6, 7, 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 7, 7, 6, 6, 7, 7, 6, 7, 6, 6, 6, 5, 5, 7, 6, 6, 6, 7, 7, 7, 6, 6, 6, 7, 7, 6, 7, 7, 7, 6, 7, 7
Offset: 0

Views

Author

N. J. A. Sloane, Dec 15 2010

Keywords

Comments

Latest occurrences of odd denominators 1,3,5,7,...,29: 0,1,3,3,4,5,6,7,8,9,10,11,12,13,14,15 (The glitch in the third term reflects the fact that 2/5 and 3/5 don't show up until the 3rd iteration; whereas for n>2, it appears that the last fraction with denominator 2n+1 to show up is 1/(2n+1), and that this fraction shows up after exactly n iterations.) - James Propp

References

  • Based on postings by Richard C. Schroeppel and James Propp to the Math Fun Mailing List, Dec 15 2010.

Crossrefs

Cf. A177405, A177407. See A178042 for another version. Cf. also A178031.

Programs

  • Mathematica
    Denom[L_, k_] :=
    Module[{M, i}, M = {};
      For[i = 1, i <= Length[L], i++,
       If[Denominator[L[[i]]] == k, M = Append[M, L[[i]]]]]; Return[M]]
    Earliest[k_] :=
    Module[{i}, For[i = 1, Length[Denom[WF[i], k]] == 0, i++]; Return[i]]
    Latest[k_] :=
    Module[{i}, For[i = 1, Length[Denom[WF[i], k]] < EulerPhi[k], i++];
      Return[i]]
    Table[Earliest[2 n + 1], {n, 1, 100}]
    (* James Propp *)

A178042 Consider the weighted Farey tree A177405/A177407; a(n) = row at which the denominator 2n+1 first appears (assumes first row is labeled row 1).

Original entry on oeis.org

1, 2, 3, 3, 3, 4, 4, 5, 4, 4, 5, 5, 5, 4, 5, 5, 6, 6, 6, 6, 5, 5, 6, 5, 6, 7, 5, 5, 7, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 7, 8, 7, 7, 7, 7, 7, 6, 7, 6, 7, 7, 7, 7, 6, 7, 8, 7, 7, 7, 7, 7, 7, 7, 6, 7, 6, 8, 8, 7, 7, 8, 8, 7, 8, 7, 7, 7, 6, 6, 8, 7, 7, 7, 8, 8, 8, 7, 7, 7, 8, 8, 7, 8, 8, 8, 7, 8, 8
Offset: 0

Views

Author

N. J. A. Sloane, Dec 16 2010

Keywords

Comments

Equals A177903 + 1. See that entry for further information.

A006843 Triangle read by rows: row n gives denominators of Farey series of order n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 3, 1, 1, 4, 3, 2, 3, 4, 1, 1, 5, 4, 3, 5, 2, 5, 3, 4, 5, 1, 1, 6, 5, 4, 3, 5, 2, 5, 3, 4, 5, 6, 1, 1, 7, 6, 5, 4, 7, 3, 5, 7, 2, 7, 5, 3, 7, 4, 5, 6, 7, 1, 1, 8, 7, 6, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 6, 7, 8, 1, 1, 9, 8, 7, 6, 5, 9, 4, 7, 3, 8, 5, 7, 9, 2, 9, 7, 5, 8, 3, 7, 4, 9, 5, 6, 7, 8, 9, 1
Offset: 1

Views

Author

Keywords

Examples

			0/1, 1/1;
0/1, 1/2, 1/1;
0/1, 1/3, 1/2, 2/3, 1/1;
0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1;
0/1, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1/1;
... = A006842/A006843.
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 152.
  • Martin Gardner, The Last Recreations, Chapter 12: Strong Laws of Small Primes, Springer-Verlag, 1997, pp. 191-205, especially p. 199.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 23.
  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 154.
  • A. O. Matveev, Farey Sequences, De Gruyter, 2017.
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 141.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row n has A005728(n) terms. - Michel Marcus, Jun 27 2014
Row sums give A240877.
Cf. A006842 (numerators), A049455, A049456, A007305, A007306.
See also A177405/A177407.

Programs

  • Maple
    Farey := proc(n) sort(convert(`union`({0},{seq(seq(m/k,m=1..k),k=1..n)}),list)) end: seq(denom(Farey(i)),i=1..5); # Peter Luschny, Apr 28 2009
  • Mathematica
    Farey[n_] := Union[ Flatten[ Join[{0}, Table[a/b, {b, n}, {a, b}]]]]; Flatten[ Table[ Denominator[ Farey[n]], {n, 9}]] (* Robert G. Wilson v, Apr 08 2004 *)
    Table[Denominator[FareySequence[n]],{n,10}]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 04 2016 *)
  • PARI
    row(n) = {vf = [0]; for (k=1, n, for (m=1, k, vf = concat(vf, m/k););); vf = vecsort(Set(vf)); for (i=1, #vf, print1(denominator(vf[i]), ", "));} \\ Michel Marcus, Jun 27 2014

Extensions

More terms from Robert G. Wilson v, Apr 08 2004
Changed offset (=order of first row) to 1 by R. J. Mathar, Apr 26 2009

A006842 Triangle read by rows: row n gives numerators of Farey series of order n.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 1, 2, 3, 1, 0, 1, 1, 1, 2, 1, 3, 2, 3, 4, 1, 0, 1, 1, 1, 1, 2, 1, 3, 2, 3, 4, 5, 1, 0, 1, 1, 1, 1, 2, 1, 2, 3, 1, 4, 3, 2, 5, 3, 4, 5, 6, 1, 0, 1, 1, 1, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 5, 6, 7, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 2, 3, 4, 1, 5, 4, 3, 5, 2, 5, 3, 7, 4, 5, 6, 7, 8, 1
Offset: 1

Views

Author

Keywords

Examples

			0/1, 1/1;
0/1, 1/2, 1/1;
0/1, 1/3, 1/2, 2/3, 1/1;
0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1;
0/1, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1/1;
... = A006842/A006843
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964
  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 152.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923. See Vol. 1.
  • Guthery, Scott B. A motif of mathematics. Docent Press, 2011.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 23.
  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 154.
  • A. O. Matveev, Farey Sequences, De Gruyter, 2017.
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 141.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row n has A005728(n) terms. - Michel Marcus, Jun 27 2014
Cf. A006843 (denominators), A049455, A049456, A007305, A007306. Also A177405/A177407.

Programs

  • Maple
    Farey := proc(n) sort(convert(`union`({0},{seq(seq(m/k,m=1..k),k=1..n)}),list)) end: seq(numer(Farey(i)),i=1..5); # Peter Luschny, Apr 28 2009
  • Mathematica
    Farey[n_] := Union[ Flatten[ Join[{0}, Table[a/b, {b, n}, {a, b}]]]]; Flatten[ Table[ Numerator[ Farey[n]], {n, 0, 9}]] (* Robert G. Wilson v, Apr 08 2004 *)
    Table[FareySequence[n] // Numerator, {n, 1, 9}] // Flatten (* Jean-François Alcover, Sep 25 2018 *)
  • PARI
    row(n) = {vf = [0]; for (k=1, n, for (m=1, k, vf = concat(vf, m/k););); vf = vecsort(Set(vf)); for (i=1, #vf, print1(numerator(vf[i]), ", "));} \\ Michel Marcus, Jun 27 2014

Extensions

More terms from Robert G. Wilson v, Apr 08 2004

A177407 Form triangle of weighted Farey fractions; read denominators by rows.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 1, 5, 7, 3, 9, 9, 3, 7, 5, 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, 1, 9, 15, 7, 25, 29, 11, 27, 21, 5, 9, 13, 17, 53, 55, 19, 15, 11, 7, 31, 41, 17, 47, 43, 13, 29, 19, 3, 11, 13, 5, 17, 19, 7, 23, 25, 9
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.

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
		

References

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

Crossrefs

Extensions

a(44)-a(80) and some corrected terms from Nathaniel Johnston, Apr 12 2011
Showing 1-5 of 5 results.