cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A024840 a(n) = least m such that if r and s in {1/1, 1/2, 1/3, ..., 1/n} satisfy r < s, then r < k/m < (k+2)/m < s for some integer k.

Original entry on oeis.org

7, 17, 31, 49, 71, 97, 127, 169, 209, 262, 311, 375, 433, 508, 575, 661, 737, 834, 919, 1027, 1141, 1241, 1366, 1497, 1611, 1753, 1901, 2029, 2188, 2353, 2495, 2671, 2853, 3009, 3202, 3401, 3571, 3781, 3997, 4219, 4409, 4642, 4881, 5126, 5335, 5591, 5853, 6121, 6349, 6628
Offset: 2

Views

Author

Keywords

Comments

For a guide to related sequences, see A001000. - Clark Kimberling, Aug 08 2012

Examples

			Using the terminology introduced at A001000, the 3rd separator of the set {1/3, 1/2, 1} is a(3) = 17, since 1/3 < 6/17 < 8/17 < 1/2 < 8/17 < 10/17 < 1 and 17 is the least m for which 1/3, 1/2, 1 are thus separated using numbers k/m. - _Clark Kimberling_, Aug 08 2012
		

Crossrefs

Cf. A001000.

Programs

  • Mathematica
    leastSeparatorS[seq_, s_] := Module[{n = 1},
    Table[While[Or @@ (Ceiling[n #1[[1]]] <
    s + 1 + Floor[n #1[[2]]] &) /@ (Sort[#1, Greater] &) /@
    Partition[Take[seq, k], 2, 1], n++]; n, {k, 2, Length[seq]}]];
    t = Map[leastSeparatorS[1/Range[50], #] &, Range[5]];
    TableForm[t]
    t[[3]] (* Peter J. C. Moses, Aug 08 2012 *)