OFFSET
1,4
REFERENCES
J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 152
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).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10563
R. K. Guy, The strong law of small numbers, Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy]
Andrey O. Matveev, Neighboring Fractions in Farey Subsequences, arXiv:0801.1981 [math.NT], 2008-2010.
Andrey O. Matveev, Farey Sequences: Errata + Haskell code
N. J. A. Sloane, Stern-Brocot or Farey Tree
Eric Weisstein's World of Mathematics, Farey Sequence.
EXAMPLE
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 *)
PROG
(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
CROSSREFS
Row n has A005728(n) terms. - Michel Marcus, Jun 27 2014
Row sums give A240877.
KEYWORD
nonn,nice,frac,tabf
AUTHOR
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
STATUS
approved