%I M0041 #64 Apr 18 2023 14:45:57
%S 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,
%T 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,
%U 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
%N Triangle read by rows: row n gives numerators of Farey series of order n.
%D A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964
%D J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 152.
%D 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.
%D Guthery, Scott B. A motif of mathematics. Docent Press, 2011.
%D G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 23.
%D W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 154.
%D A. O. Matveev, Farey Sequences, De Gruyter, 2017.
%D I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 141.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Alois P. Heinz, <a href="/A006842/b006842.txt">Table of n, a(n) for n = 1..10563</a>
%H Maxim Bruckheimer and Abraham Arcavi, <a href="https://www.maths.ed.ac.uk/~v1ranick/papers/bruck.pdf">Farey series and Pick’s area theorem</a>, The Mathematical Intelligencer, 17.4 (1995): 64-67.
%H Cristian Cobeli and Alexandru Zaharescu, <a href="https://eudml.org/doc/126412">The Haros-Farey sequence at two hundred years</a>, Acta Univ. Apulensis Math. Inform 5 (2003): 1-38.
%H Andrey O. Matveev, <a href="http://arxiv.org/abs/0801.1981">Neighboring Fractions in Farey Subsequences</a>, arXiv:0801.1981 [math.NT], 2008-2010.
%H Andrey O. Matveev, <a href="https://github.com/andreyomatveev/farey-sequences">Farey Sequences: Errata + Haskell code</a>
%H N. J. A. Sloane, <a href="/stern_brocot.html">Stern-Brocot or Farey Tree</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/FareySequence.html">Farey Sequence.</a>
%H <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a>
%e 0/1, 1/1;
%e 0/1, 1/2, 1/1;
%e 0/1, 1/3, 1/2, 2/3, 1/1;
%e 0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1;
%e 0/1, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1/1;
%e ... = A006842/A006843
%p 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
%t 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 *)
%t Table[FareySequence[n] // Numerator, {n, 1, 9}] // Flatten (* _Jean-François Alcover_, Sep 25 2018 *)
%o (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
%Y Row n has A005728(n) terms. - _Michel Marcus_, Jun 27 2014
%Y Cf. A006843 (denominators), A049455, A049456, A007305, A007306. Also A177405/A177407.
%K nonn,nice,frac,tabf
%O 1,9
%A _N. J. A. Sloane_
%E More terms from _Robert G. Wilson v_, Apr 08 2004