A262670 Consider the Farey sequence of order n, F_n, and that the average distance between any two adjacent pairs in F_n is 1/A002088(n). Then a(n) is the number of adjacent pairs whose difference is the average.
0, 1, 2, 0, 2, 2, 2, 0, 0, 2, 0, 2, 0, 0, 0, 2, 2, 0, 2, 2, 0, 2, 0, 0, 2, 2, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 2, 4, 2, 0, 2, 0, 0, 2, 2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 2, 0, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0
Keywords
Examples
a(5) = 2. F_5 = {0, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1} and the first forward difference is {1/5, 1/20, 1/12, 1/15, 1/10, 1/10, 1/15, 1/12, 1/20, 1/5}. The average distance is 1/10 since A002088(5) = 10 which is also the number of adjacent pairs, a/b & c/d.
References
- Albert H. Beiler, Recreations in the Theory of Numbers, The Queen of Mathematics Entertains, Chapter XVI, "Farey Tails", Dover Books, NY, 1966, pgs 168-172.
Links
- Cut the Knot, Farey Series.
- The University of Surrey, Math Dept., Fractions in the Farey Series and the Stern-Brocot Tree.
- Eric Weisstein's World of Mathematics, Farey Sequence.
- Wikipedia, Farey Sequence.
Programs
-
Mathematica
f[n_] := Block[{diff = Differences@ Union@ Flatten@ Table[a/b, {b, n}, {a, 0, b}], ave = 1/Sum[ EulerPhi[ m], {m, n}]}, {Length@ Select[diff, ave < # &], Length@ Select[diff, ave == # &], Length@ Select[diff, ave > # &]}]; Array[f, 65]
Comments