A133404 Table of sum of numerator and denominator of Farey sequences, read by rows.
1, 2, 1, 3, 2, 1, 4, 3, 5, 2, 1, 5, 4, 3, 5, 7, 2, 1, 6, 5, 4, 7, 3, 8, 5, 7, 9, 2, 1, 7, 6, 5, 4, 7, 3, 8, 5, 7, 9, 11, 2, 1, 8, 7, 6, 5, 9, 4, 7, 10, 3, 11, 8, 5, 12, 7, 9, 11, 13, 2, 1, 9, 8, 7, 6, 5, 9, 4, 11, 7, 10, 3, 11, 8, 13, 5, 12, 7, 9, 11, 13, 15, 2
Offset: 1
Examples
F(1) = (0/1, 1/1) -> (0+1=1, 1+1=2). F(2) = (0/1, 1/2, 1/1) -> (0+1=1, 1+2=3, 1+1=2). F(3) = (0/1, 1/3, 1/2, 2/3, 1/1) -> (0+1=1, 1+3=4, 1+2=3, 2+3=5, 1+1=2). F(4) = (0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1) -> (0+1=1, 1+4=5, 1+3=4, 1+2=3, 2+3=5, 3+4=7, 1+1=2). The 5th row is formed from the 5th row of the table of Farey fractions: F(5) = (0/1, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1/1) whose sum of numerators and denominators is (1, 6, 5, 4, 7, 3, 8, 5, 7, 9, 2). F(6) = (0/1, 1/6, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 1/1) whose sums are (1, 7, 6, 5, 4, 7, 3, 8, 5, 7, 9, 11, 2). F(7) = (0/1, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 2/5, 3/7, 1/2, 4/7, 3/5, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 1/1) whose sums are (1, 8, 7, 6, 5, 9, 4, 7, 10, 3, 11, 8, 5, 12, 7, 9, 11, 13, 2). F(8) = (0/1, 1/8, 1/7, 1/6, 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, 5/6, 6/7, 7/8, 1/1) whose sums are (1, 9, 8, 7, 6, 5, 9, 4, 11, 7, 10, 3, 11, 8, 13, 5, 12, 7, 9, 11, 13, 15, 2).
Links
- Nathaniel Johnston, Table of n, a(n) for n = 1..10000
Programs
-
Maple
Farey := proc(n) option remember: local j,s: if(n=1)then return {0,1}: else s:=procname(n-1): for j from 1 to n-1 do s := s union {j/n}: od: fi: end: for n from 1 to 8 do F:=sort(convert(Farey(n),list)): nF:=nops(F): for m from 1 to nF do printf("%d, ",numer(F[m])+denom(F[m])): od: printf("\n"): od: # Nathaniel Johnston, Apr 27 2011
-
Mathematica
Farey[n_] := Union[ Flatten[ Join[{0}, Table[a/b, {b, n}, {a, b}]]]]; Table[ Numerator[Farey[n]] + Denominator[Farey[n]], {n, 8}] // Flatten (* Robert G. Wilson v, Jun 10 2011 *)
Extensions
a(17) inserted by Nathaniel Johnston, Apr 27 2011
Comments