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.
%I A006843 M0081 #74 Jun 01 2025 22:19:13 %S A006843 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, %T A006843 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, %U A006843 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 %N A006843 Triangle read by rows: row n gives denominators of Farey series of order n. %D A006843 J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 152. %D A006843 Martin Gardner, The Last Recreations, Chapter 12: Strong Laws of Small Primes, Springer-Verlag, 1997, pp. 191-205, especially p. 199. %D A006843 G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 23. %D A006843 W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 154. %D A006843 A. O. Matveev, Farey Sequences, De Gruyter, 2017. %D A006843 I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 141. %D A006843 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006843 Alois P. Heinz, <a href="/A006843/b006843.txt">Table of n, a(n) for n = 1..10563</a> %H A006843 R. K. Guy, <a href="/A005165/a005165.pdf">The strong law of small numbers</a>, Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy] %H A006843 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 A006843 Andrey O. Matveev, <a href="https://github.com/andreyomatveev/farey-sequences">Farey Sequences: Errata + Haskell code</a> %H A006843 N. J. A. Sloane, <a href="/stern_brocot.html">Stern-Brocot or Farey Tree</a> %H A006843 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/FareySequence.html">Farey Sequence.</a> %H A006843 <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a> %e A006843 0/1, 1/1; %e A006843 0/1, 1/2, 1/1; %e A006843 0/1, 1/3, 1/2, 2/3, 1/1; %e A006843 0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1; %e A006843 0/1, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1/1; %e A006843 ... = A006842/A006843. %p A006843 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 %t A006843 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 *) %t A006843 Table[Denominator[FareySequence[n]],{n,10}]//Flatten (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Oct 04 2016 *) %o A006843 (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 %Y A006843 Row n has A005728(n) terms. - _Michel Marcus_, Jun 27 2014 %Y A006843 Row sums give A240877. %Y A006843 Cf. A006842 (numerators), A049455, A049456, A007305, A007306. %Y A006843 See also A177405/A177407. %K A006843 nonn,nice,frac,tabf %O A006843 1,4 %A A006843 _N. J. A. Sloane_ %E A006843 More terms from _Robert G. Wilson v_, Apr 08 2004 %E A006843 Changed offset (=order of first row) to 1 by _R. J. Mathar_, Apr 26 2009