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.

Previous Showing 11-12 of 12 results.

A366191 Enumeration of the rational numbers in the closed real interval [0, 1] after Cantor.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 5, 1, 6, 2, 5, 3, 4, 1, 7, 3, 5, 1, 8, 2, 7, 4, 5, 1, 9, 3, 7, 1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 1, 11, 5, 7, 1, 12, 2, 11, 3, 10, 4, 9, 5, 8, 6, 7, 1, 13, 3, 11, 5, 9, 1, 14, 2, 13, 4, 11, 7, 8, 1, 15, 3, 13, 5, 11, 7, 9
Offset: 1

Views

Author

Peter Luschny, Oct 10 2023

Keywords

Comments

The rational numbers in the interval [0, 1] are listed as pairs of relatively prime integers a(2*n-1) / a(2*n).
Start with (0, 1). Then append pairs (t, n - t) where t and n - t are relatively prime positive integers and 1 <= t <= floor(n/2). Sort first by n then by t in ascending order.

Examples

			Seen as an irregular table:
   1: [0,  1],
   2: [1,  1],
   3: [1,  2],
   4: [1,  3],
   5: [1,  4], [2, 3],
   6: [1,  5],
   7: [1,  6], [2, 5], [3, 4],
   8: [1,  7], [3, 5],
   9: [1,  8], [2, 7], [4, 5],
  10: [1,  9], [3, 7],
  11: [1, 10], [2, 9], [3, 8], [4, 7], [5, 6],
  ...
		

Crossrefs

Cf. A352911, A333856 (numerators only).
Essentially, A182972/A182973 give the numerators/denominators separately.

Programs

  • Maple
    A366191List := proc(upto) local C, F, n, t, count;
    C := [0, 1]; count := 0:
    for n from 2 while count < upto do
        F := select(t -> igcd(t, n - t) = 1, [$1..iquo(n,2)]);
        C := C, seq([t, n - t], t = F);
        count := count + nops(F) od;
    ListTools:-Flatten([C]) end:
    A366191List(40);
  • Mathematica
    A366191row[n_] := If[n == 1, {0, 1}, Select[Array[{#, n - #}&, Floor[n/2]], CoprimeQ[First[#], Last[#]]&]];
    Array[A366191row, 20] (* Paolo Xausa, Jan 16 2024 *)

A354459 Lazy cutter's sequence (see Comments).

Original entry on oeis.org

2, 3, 4, 4, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23
Offset: 1

Views

Author

Ivan N. Ianakiev, May 31 2022

Keywords

Comments

From the infinite sequence G of fractions that may be used to demonstrate the countability of rational numbers, where a(n) = A092542(n)/A092543(n), form a new sequence H by taking only those terms of G that are proper fractions unequal to a fraction that appears earlier in H (making H the list of all proper fractions without repetitions). Let b/c be the n-th term of H and b be the number of congruent pizzas that have to be equally divided between c people by means of radial cuts. a(n) is the minimum number of cuts to achieve such a division.
H can be directly calculated as its n-th term equals A182972(n)/A182973(n). H starts with 1/2, 1/3, 1/4, 2/3, 1/5, 1/6, 2/5, 3/4, 3/5, 1/7, 1/8, 2/7, 4/5, 3/7, 1/9.
As a(n) is equal for all proper fractions b/c such that b + c = n, counting the number of equal consecutive terms of this sequence gives A023022 from its third term onwards (see Geoffrey Critzer's and Reinhard Zumkeller's comments at A023022).

Examples

			To equally divide 4 pizzas between 7 people we can divide each pizza into 7 equal parts with 7 radial cuts making the total number of cuts 28 (far from minimal). Ancient Egyptians, representing 4/7 as 1/2 + 1/14, would cut all pizzas into halves (8 cuts) and one of the halves into 7 equal pieces (6 additional cuts), making the total number of cuts 8 + 6 = 14. We can do even better by cutting each pizza into two pieces (3/7 and 4/7), for a total of 8 cuts, and dividing one 3/7 piece to 3 equal pieces (2 additional cuts), minimizing the total number of cuts to 8 + 2 = 10. Since the 19th term of H sequence is 4/7, a(19) = 10.
		

Crossrefs

Programs

  • Mathematica
    a092542=Flatten[Table[Join[Range[2n-1],Reverse@Range[2n-2]],{n,12}]];
    a092543=Take[Cases[Import["https://oeis.org/A092543/b092543.txt","Table"],{,}][[All,2]],276];g=a092542/a092543; h=DeleteDuplicates[Select[g,#<1&]];
    a[n_]:=Module[{x=Floor[Denominator[n]/Numerator[n]],r=Mod[Denominator[n],
    Numerator[n]]},(x+1)*Numerator[n]+r-1];a/@h

Formula

h(n) = A182972(n)/A182973(n) = b/c, c = x*b + r and a(n) = (x+1)*b + r - 1.
Previous Showing 11-12 of 12 results.