(*This Program is designed to generate the Haros-Farey Sequence (widely known as the Farey Sequence) along with the complete Set.  It is the Sequence A005728:  2, 3, 5, 7, 11, 13, 19, 23, 29, 33, 43, 47, 59, 65, 73, 81, 97, 103, 121, 129, 141, 151, 173, 181, 201, 213, 231, 243, 271, 279, 309, 325, 345, 361, 385, 397, 433, 451, 475, 491, 531, 543, 585, 605, 629, 651, 697, 713, 755, 775, 807, 831, 883, ....  Start the Program by entering the value of n. Example: m = 5, Farey(5) = 11.    Author: Sameen Ahmed KHAN, rohelakhan@yahoo.com, http://SameenAhmedKhan.webs.com/ and http://sites.google.com/site/rohelakhan/ E-Print archive: http://arxiv.org/abs/1004.3346/ (21 April 2010) Date: Wednesday the 21 April 2010*)

m = 5;
FareySet = Union[Flatten[Table[a/b, {b, m}, {a, 0, b}]]];
Print[StringForm["m = ``, FareySet = ``", m, FareySet ]] (*This line displays the Farey Set*)
Print[StringForm["m = ``, Order of Farey Set = ``, CPU time in seconds =  ``", m, Dimensions[FareySet], TimeUsed[%] ]]