A191607 Table of the difference of numerator and denominator of Farey sequences, read by rows.
1, 0, 1, 1, 0, 1, 2, 1, 1, 0, 1, 3, 2, 1, 1, 1, 0, 1, 4, 3, 2, 3, 1, 2, 1, 1, 1, 0, 1, 5, 4, 3, 2, 3, 1, 2, 1, 1, 1, 1, 0, 1, 6, 5, 4, 3, 5, 2, 3, 4, 1, 3, 2, 1, 2, 1, 1, 1, 1, 0, 1, 7, 6, 5, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 1, 1, 1, 0, 1, 8, 7, 6, 5, 4, 7, 3, 5, 2, 5, 3, 4, 5, 1, 4, 3, 2, 3, 1, 2, 1, 2, 1, 1, 1, 1, 1, 0
Offset: 1
Crossrefs
Cf. A133404.
Programs
-
Mathematica
Farey[n_] := Union[ Flatten[ Join[{0}, Table[a/b, {b, n}, {a, b}]]]]; Table[ -Numerator@ Farey@ n + Denominator@ Farey@ n, {n, 9}] // Flatten
Comments