Talk:Farey sequence

Mediants
The mediant link currently leads to a musical term.

Charles Matthews 11:58, 23 Feb 2004 (UTC)


 * Fixed. Dominus 14:21, 8 Feb 2005 (UTC)

Now added the mathematical sense. Please check it for correctness. -- Anon.

MEDIANTS:

Currently, the article reads that for the first p/q that is between a/b and c/d, p/q = (a+b)/(c+d). This is not true. The letters are somewhat confused. In actuality, the mediant p/q = (a+c)/(b+d). That is, the sum of the numerators over the sum of the denominators. This also makes it clearer why p/q will first appear in row b+d.

Ex.:

F(0) = 0/1  1/1 F(1) = 0/1 (0+1)/(1+1) = 1/2 1/1 F(2) = 0/1 1/3 1/2 2/3 1/1 etc.

The mediant method is the quickest way to construct the Farey sequence.

-- Barry Revzin --

link to the Riemann hypothesis
there is an interesting equivalent formulation of the Riemann hypothesis using Farey sequences which is mentioned in that article. Perhaps a cross-reference could be added here? Via strass 20:35, 8 August 2006 (UTC)


 * Sounds good to me; want to take a stab at it? --Piet Delport 20:22, 10 August 2006 (UTC)

Presumably the $$ \mathcal{O} (n^r)$$ is using Big-oh notation? And it's as n goes to infinity? The article could be clearer on this... Thanks, Kier07 (talk) 20:25, 24 November 2009 (UTC)

Applications
Could anybody please add a section on the real-life applications of the Farey Sequence (e.g. the Fibonacci Sequence article with a section on the sequence's appearances in music, art, and nature). A section of this sort would be greatly appreciated.

-Jasmerrin

Neighbors
Maybe I'm missing something, but the section on Farey neighbors seems pretty foolish to me. Consider that in F1, the two terms present are neighbors. In F2, the first and third are neighbors of the 2nd term. Continue on, and by extension ALL simplified fraction are 'Farey neighbors,' regardless of what they are. What's the significance of that? —Preceding unsigned comment added by 24.208.253.57 (talk) 01:59, 23 April 2009 (UTC)


 * I think you have misunderstood the definition of Farey neighbours. Two fractions can only be Farey neighbours if they appear next to each other in some generation of the Farey sequence. 1/3 and 2/3 are not Farey neighbours because 1/2 will always be between them. 1/3 and 3/7 are not Farey neighbours because 2/5 is always between them. On the other hand, 1/3 and 2/7 are Farey neighbours because the first time that 2/7 apperas, in F7, it is right next to 1/3. Gandalf61 (talk) 10:59, 23 April 2009 (UTC)

I'm Confused..
So since a Farey sequence is:

In mathematics, the Farey sequence of order n is the sequence of completely reduced fractions between 0 and 1 which, when in lowest terms, have denominators less than or equal to n, arranged in order of increasing size.

What is the name of the sequence where we don't care to limit the denominators to n? Ie. What is the name of this sequence:


 * F1 = {{{sup|0}}⁄1, 1⁄1}
 * F2 = {{{sup|0}}⁄1, 1⁄2, 1⁄1}
 * F3 = {{{sup|0}}⁄1, 1⁄3, 1⁄2, 2⁄3, 1⁄1}
 * F4 = {{{sup|0}}⁄1, 1⁄4, 1⁄3, 2⁄5, 1⁄2, 3⁄5, 2⁄3, 3⁄4, 1⁄1}
 * F5 = {{{sup|0}}⁄1, 1⁄5, 1⁄4, 2⁄7, 1⁄3, 3⁄8, 2⁄5, 3⁄7, 1⁄2, 4⁄7, 3⁄5, 5⁄8, 2⁄3, 5⁄7, 3⁄4, 4⁄5, 1⁄1}

Caimbul (talk) 20:12, 7 December 2009 (UTC)

Ah ha! I see. What this sequence does is the left hand side of a 'Stern-Brocot' tree, where each iteration adds a new row of a tree. http://www.cut-the-knot.org/blue/Stern.shtml is where I went to actually see this tree.. so Although Farey describes and will inevitably populate a Stern-Brocot tree, by ignoring the limit on Denominators, we actually get the SB tree values by row..

It would populate the right hand side as well.. Neat! Caimbul (talk) 20:39, 7 December 2009 (UTC)

In summary, the Stern-Brocot tree and the Farey sequences eventually include the same numbers: the (reduced) fractions between 0 and 1. They just include them at different times. Stern-Brocot is a sort of depth-first inclusion, whereas the Farey sequences are breadth first. Micro-Parallel (talk) 17:14, 5 June 2011 (UTC)

Next Term
There is a typo in the middle of the explanation which precedes the Python code: The right-hand side of the equation following "In other words" is missing a floor operation around the outside. I assume this could be added by imitating the coding of the next two equations, but if there is a way to do it which leaves the equation in the flowing text, that might be superior. In any case, I'll have to leave the changes to a more accomplished editor than I.. Micro-Parallel (talk) 17:01, 5 June 2011 (UTC)

Suggestion for Programmatic Representation
Could somebody add code for generating Farey sequnces in other programming languages&thinsp;–&thinsp;say, C++? BCG999 (talk) 15:51, 14 January 2013 (UTC)

You can download a C++ implementing Farey sequence generation at:



I extract the Farey class: — Preceding unsigned comment added by User:Rtomas (talk • contribs) 13:19, 5 February 2014

Historical accidents
It's "a historical accident" that they're called "Farey". Which makes me wonder, is there a section in half the pages on things named after Newton (for example), explaining it was merely "a historical accident" that they're named after him, as the Indians who discovered them centuries earlier were not known in the west? Something curious here. — Preceding unsigned comment added by 110.20.158.134 (talk) 09:10, 14 December 2015 (UTC)


 * Wikipedia is a work in progress. Hyacinth (talk) 13:18, 18 May 2017 (UTC)

constructing FS from mediants?
mediant of a/b and c/d is (a+c)/(b+d)

so sequence starts:

0/1 1/1

0/1 1/2 1/1

0/1 1/3 1/2 2/3 1/1

0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1

Darcourse (talk) 06:17, 16 February 2018 (UTC)

just noticed the sequence is possibly not well-defined, for example 2/3 + 3/12 = 5/15 = 1/3, whereas 2/3 + 1/4 = 3/7 != 1/3.

a mediant spectrum could be (a+kc)/(b+kd) for c/d in lowest terms.

Darcourse (talk) 07:11, 16 February 2018 (UTC)

The sequence is very well defined. You can only apply the mediant between neighboring fractions. 2/3 and 1/4 are not Farey neighbous as 2*4-3*1 = 5, not 1. Rtomas (talk) 20:40, 7 June 2020 (UTC)

series vs. sequence
One can read near the end of the article:

rationals can often take advantage of the Farey series

but near the begining, one can read that the word "sequence" should be use in this context. Could some one clarify whether this is consistent? — Preceding unsigned comment added by 2001:6B0:E:2B18:0:0:0:80 (talk) 06:52, 1 January 2021 (UTC)

"Equivalent area" details
In https://en.wikipedia.org/w/index.php?title=Farey_sequence&type=revision&diff=1105657955&oldid=1104796601 I moved the Austin2008 article information into its own subsection. In its original location it broke the flow of the section. The quality of the discussion there doesn't live up to the original article, either, which made matters worse. — Preceding unsigned comment added by 98.225.50.10 (talk) 05:40, 21 August 2022 (UTC)

Error in the F_25 picture?
The initial terms of the Farey sequence with denominators up to 25 are as follows: 0/1, 1/25, 1/24, 1/23, 1/22, 1/21, 1/20, 1/19, 1/18, 1/17, 1/16, 1/15, 1/14, 1/13, 2/25, ...

The diagram agrees with the sequence until the term 1/14, then indicates the next fraction has denominator 25, which is not the case. There could be other mistakes, but I did not check the rest. I do not have the ability to fix this diagram, sorry, because the most reasonable option would be generating it using some code. — Preceding unsigned comment added by 63.216.63.70 (talk • contribs) 22:27, 8 May 2023 (UTC)

greater than/by 1

 * Every fraction has two continued fraction expansions &mdash; in one the final term is 1; in the other the final term is greater by 1.

That word by is a recent change from than, and I disapprove. Greater by 1 than what? Than the term that otherwise preceded the final 1, but that is not mentioned in the context. That the new final term exceeds 1 is also true. —Tamfang (talk) 05:00, 10 September 2023 (UTC)

unhappy symbol
I feel that |F| for the length of F is unhappy; at least a word of explanation seems in order. 151.29.137.229 (talk) 23:52, 24 September 2023 (UTC)