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.

Showing 1-3 of 3 results.

A001000 a(n) = least m such that if a/b < c/d where a,b,c,d are integers in [0,n], then a/b < k/m < c/d for some integer k.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 26, 31, 43, 57, 65, 82, 101, 111, 133, 157, 183, 197, 226, 257, 290, 307, 343, 381, 421, 463, 485, 530, 577, 626, 677, 703, 757, 813, 871, 931, 993, 1025, 1090, 1157, 1226, 1297, 1370, 1407, 1483, 1561, 1641, 1723, 1807, 1893, 1937, 2026, 2117
Offset: 1

Views

Author

Keywords

Comments

It suffices for (a/b, c/d) to range through the consecutive pairs of Farey fractions of order n.
This is the same sequence (apart from the initial term) as A071111. The identity of these two sequences was first proved by Rustem Aidagulov and a detailed version of the proof can be found in the Alekseyev link below.
For sets of real numbers S and T, let S be a divider of T if some element of S lies strictly between any two distinct elements of T. Let Fence(n) = {a/n : a in Z}, Recip(n) = {1/b : 1 <= b <= n} Farey(n) = {a/b : a in Z, 1 <= b <= n}. Then a(n) is the smallest k such that Fence(k) is a divider of Recip(n) and also the smallest k such that Fence(k) is a divider of Farey(n), as shown by S. Rustem Aidagulov. - David W. Wilson, Aug 30 2007
Suppose that S is a set of 2 or more real numbers. The least m such that for every r and s in S there is an integer k such that r < k/m < s is the first separator of S. The least m such that for every r and s in S there exists an integer k such that r < k/m < (k+1)/m < s is the second separator of S, and so on.
...
For example, A001000 gives first separators for the sets S(n) = {0,1/2,1/3,...,1/n}. In the following guide, the set S(n) consists of numbers given by the shown formula for h = 1, 2, ..., n; F = A000045 (Fibonacci numbers), and r = (1+sqrt(5))/2 (golden ratio).
...
S(n) ................... 1st separators
Farey fractions ........ A001000
1/h .................... A071111
1/(2*h-1) .............. A024819
1/(2*h) ................ A024820
1/sqrt(h) .............. A024821
1/(3*h-2) .............. A024822
1/(3*h-1) .............. A024823
1/(3*h) ................ A024824
1/(4*h) ................ A024825
1/C(n+1,2) ............. A024826
1/h^2 .................. A024827
h/(1+h^2) .............. A024828
F(2*h-1)/F(2*h)......... A024829
F(2*h)/F(2*h+1) ........ A024830
F(2*h+1)/F(2*h+2)....... A024831
pi/2 - arctan(h) ....... A024832
|F(h+1)-r*F(h)| ........ A024849
fr. parts, h*sqrt(2) ... A214921
fr. parts, h*r ......... A214964
fr. parts, h*e ......... A214965
...
S(n) ............. 2nd separators
1/h .............. A024833
1/(2*h-1) ........ A024834
1/(2*h) .......... A024835
1/(3*h-2) ........ A024836
1/(3*h-1) ........ A024837
1/(3*h) .......... A024838
1/(4*h) .......... A024839
...
S(n) ............. 3rd separators
1/h .............. A024840
1/(2*h-1) ........ A024841
1/(2*h) .......... A024842
...
S(n) ............. 4th separators
1/h .............. A024843
1/(2*h-1) ........ A024844
1/(2*h) .......... A024845
...
S(n) ............. 5th separators
1/h .............. A024846
1/(2*h-1) ........ A024847
- Clark Kimberling, Aug 07 2012

Examples

			The Farey fractions of order 4, 0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1, are separated by the fractions k/7: 0/1 < 1/7 <1/4 < 2/7 < 1/3 < 3/7 < 1/2 < 4/7 < 2/3 <5/7 < 3/4 <6/7 < 1 and 7 is the least m for which at least one k/m lies strictly between each pair of Farey fractions.
		

Crossrefs

Cf. A071111.

Programs

  • Mathematica
    (* The following program generates a northwest corner of an array in which row k shows the least k-th separator of the set {1/h : h = 1,2,...,n}. *)
    leastSeparatorS[seq_, s_] := Module[{n = 1},
    Table[While[Or @@ (n #[[1]] <=
    s + Floor[n #1[[2]]] &) /@ (Sort[#1, Greater] &) /@
    Partition[Take[seq, k], 2, 1], n++]; n, {k, 2, Length[seq]}]];
    TableForm[Map[leastSeparatorS[1/Range[15], #] &, Range[10]]]
    (* Peter J. C. Moses, Aug 07 2012 *)

Formula

For n >= 2, a(n) = (n-[r])(n-[r+1/2])+1, where r = sqrt(4n-7), [x] = greatest integer <= x. - David W. Wilson, Aug 30 2007

Extensions

Incompleteness of old definition pointed out by Christopher Carl Heckman, and revised definition supplied by Clark Kimberling, Feb 18 2004
Definition of separator, guide to related sequences, and Mathematica program added by Clark Kimberling, Aug 07 2012

A213205 T(n,k) = ((k+n)^2-4*k+3+(-1)^k-2*(-1)^n-(k+n)*(-1)^(k+n))/2; n , k > 0, read by antidiagonals.

Original entry on oeis.org

1, 5, 4, 2, 3, 6, 10, 9, 14, 13, 7, 8, 11, 12, 15, 19, 18, 23, 22, 27, 26, 16, 17, 20, 21, 24, 25, 28, 32, 31, 36, 35, 40, 39, 44, 43, 29, 30, 33, 34, 37, 38, 41, 42, 45, 49, 48, 53, 52, 57, 56, 61, 60, 65, 64, 46, 47, 50, 51, 54, 55, 58, 59, 62, 63, 66, 70
Offset: 1

Views

Author

Boris Putievskiy, Feb 15 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). The order of the list:
T(1,1)=1;
T(1,3), T(2,2), T(2,1), T(1,2), T(3,1);
. . .
T(1,2*n+1), T(2,2*n), T(2,2*n-1), T(1,2*n), ...T(2*n-1,3), T(2*n,2), T(2*n,1), T(2*n-1,2), T(2*n+1,1);
. . .
Movement along two adjacent antidiagonals - step to the southwest, step to the west, step to the northeast, 2 steps to the south, step to the west and so on. The length of each step is 1.
Table contains:
row 1 accommodates elements A130883 in odd places,
row 2 is alternation of elements A100037 and A033816;
column 1 is alternation of elements A000384 and A091823,
column 2 is alternation of elements A014106 and A071355,
column 3 accommodates elements A130861 in even places;
main diagonal is alternation of elements A188135 and A033567,
diagonal 1, located above the main diagonal accommodates elements A033566 in even places,
diagonal 2, located above the main diagonal is alternation of elements A139271 and A024847,
diagonal 3, located above the main diagonal accommodates of elements A033585.

Examples

			The start of the sequence as table:
1....5...2..10...7..19..16...
4....3...9...8..18..17..31...
6...14..11..23..20..36..33...
13..12..22..21..35..34..52...
15..27..24..40..37..57..54...
26..25..39..38..56..55..77...
28..44..41..61..58..82..79...
. . .
The start of the sequence as triangle array read by rows:
1;
5,4;
2,3,6;
10,9,14,13;
7,8,11,12,15;
19,18,23,22,27,26;
16,17,20,21,24,25,28;
. . .
The start of the sequence as array read by rows, the length of row r is 4*r-3.
First 2*r-2 numbers are from the row number 2*r-2 of  triangle array, located above.
Last  2*r-1 numbers are from the row number 2*r-1 of  triangle array, located above.
1;
5,4,2,3,6;
10,9,14,13,7,8,11,12,15;
19,18,23,22,27,26,16,17,20,21,24,25,28;
. . .
Row number r contains permutation 4*r-3 numbers from 2*r*r-5*r+4 to 2*r*r-r:
2*r*r-5*r+7, 2*r*r-5*r+6,...2*r*r-r-4, 2*r*r-r-3, 2*r*r-r.
		

Crossrefs

Programs

  • Maple
    T:=(n,k)->((k+n)^2-4*k+3+(-1)^k-2*(-1)^n-(k+n)*(-1)^(k+n))/2: seq(seq(T(k,n-k),k=1..n-1),n=1..13); # Muniru A Asiru, Dec 06 2018
  • Mathematica
    T[n_, k_] := ((n+k)^2 - 4k + 3 + (-1)^k - 2(-1)^n - (n+k)(-1)^(n+k))/2;
    Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 06 2018 *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=((t+2)**2-4*j+3+(-1)**j-2*(-1)**i-(t+2)*(-1)**t)/2

Formula

As table
T(n,k) = ((k+n)^2-4*k+3+(-1)^k-2*(-1)^n-(k+n)*(-1)^(k+n))/2.
As linear sequence
a(n) = (A003057(n)^2-4*A004736(n)+3+(-1)^A004736(n)-2*(-1)^A002260(n)-A003057(n)*(-1)^A003056(n))/2;
a(n) = ((t+2)^2-4*j+3+(-1)^j-2*(-1)^i-(t+2)*(-1)^t)/2, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

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

Original entry on oeis.org

19, 53, 103, 169, 251, 349, 463, 593, 739, 901, 1101, 1299, 1537, 1769, 2045, 2311, 2625, 2925, 3277, 3611, 4001, 4369, 4797, 5199, 5665, 6101, 6605, 7075, 7617, 8121, 8701, 9301, 9859, 10497, 11155, 11765, 12461, 13177, 13839, 14593, 15367, 16081, 16893, 17725
Offset: 2

Views

Author

Keywords

Comments

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

Crossrefs

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/(2*Range[50]), #] &, Range[5]];
    TableForm[t]
    t[[5]]  (* A024848 *)
    (* Peter J. C. Moses, Aug 06 2012 *)
Showing 1-3 of 3 results.