Skip to main content
deleted 45 characters in body
Source Link
user76568
  • 401
  • 1
  • 4
  • 13

There is of course the silly implementation:

FareySequence[n_] := Union[Flatten[Table[j/i, {i, 1, n}, {j, 0, i}]]]

However, there is this propertyare numerous properties and confinements of Farey sequences:

$$F_0=0, \ F_n=1, \\ F_k=F_{k-1} + 1/(D_kD_{k-1})$$

where $F$ is the Farey sequence and $D$ is the denominator sequence of(that can be used, $F$potentially, in reduced forman indirect manner).

This calls for a very simple, and, very efficient recurring/functional implementation, exhibiting Superiority. But I'm new to Mathematica and can't find the right combination of built-in functions, and pure functions..

Ideas?

There is of course the silly implementation:

FareySequence[n_] := Union[Flatten[Table[j/i, {i, 1, n}, {j, 0, i}]]]

However, there is this property of Farey sequences:

$$F_0=0, \ F_n=1, \\ F_k=F_{k-1} + 1/(D_kD_{k-1})$$

where $F$ is the Farey sequence and $D$ is the denominator sequence of $F$ in reduced form.

This calls for a very simple recurring/functional implementation. But I'm new to Mathematica and can't find the right combination of built-in functions, and pure functions..

Ideas?

There is of course the silly implementation:

FareySequence[n_] := Union[Flatten[Table[j/i, {i, 1, n}, {j, 0, i}]]]

However, there are numerous properties and confinements of Farey sequences (that can be used, potentially, in an indirect manner).

This calls for a very simple, and, very efficient recurring/functional implementation, exhibiting Superiority. But I'm new to Mathematica and can't find the right combination of built-in functions, and pure functions..

Ideas?

Tweeted twitter.com/#!/StackMma/status/331272590721159168
deleted 2 characters in body
Source Link

There is of course the the silly implementation:

FareySequence[n_] := Union[Flatten[Table[j/i, {i, 1, n}, {j, 0, i}]]]

However, Therethere is this property of Farey sequences:

$$F_0=0, \ F_n=1, \\ F_k=F_{k-1} + 1/(D_kD_{k-1})$$

where $F$ is the Farey sequence and $D$ is the denominator sequence of $F$ in reduced form.

This calls for a very simple recurring/functional implementation. But I'm new to MathematicaMathematica and can't find the right combination of built in-in functions, and pure functions..

Ideas?

There is of course the the silly implementation:

FareySequence[n_] := Union[Flatten[Table[j/i, {i, 1, n}, {j, 0, i}]]]

However, There is this property of Farey sequences:

$$F_0=0, \ F_n=1, \\ F_k=F_{k-1} + 1/(D_kD_{k-1})$$

where $F$ is the Farey sequence and $D$ is the denominator sequence of $F$ in reduced form.

This calls for a very simple recurring/functional implementation. But I'm new to Mathematica and can't find the right combination of built in functions, and pure functions..

Ideas?

There is of course the silly implementation:

FareySequence[n_] := Union[Flatten[Table[j/i, {i, 1, n}, {j, 0, i}]]]

However, there is this property of Farey sequences:

$$F_0=0, \ F_n=1, \\ F_k=F_{k-1} + 1/(D_kD_{k-1})$$

where $F$ is the Farey sequence and $D$ is the denominator sequence of $F$ in reduced form.

This calls for a very simple recurring/functional implementation. But I'm new to Mathematica and can't find the right combination of built-in functions, and pure functions..

Ideas?

edited tags
Link
added 6 characters in body
Source Link
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k
Loading
Source Link
user76568
  • 401
  • 1
  • 4
  • 13
Loading