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.

A360371 Triangle read by rows: lexicographically earliest sequence of distinct positive integers such that each column contains only multiples of the first number in that column. See example.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 9, 10, 8, 11, 12, 15, 16, 13, 14, 18, 20, 24, 26, 17, 19, 21, 25, 32, 39, 34, 22, 23, 27, 30, 40, 52, 51, 44, 28, 29, 33, 35, 48, 65, 68, 66, 56, 31, 36, 42, 45, 64, 78, 85, 88, 84, 62, 37, 38, 54, 50, 72, 91, 102, 110, 112, 93, 74, 41
Offset: 1

Views

Author

Samuel Harkness, Mar 17 2023

Keywords

Comments

A permutation of the natural numbers.
Among the first number of columns, are there more primes or composites? Of the first 500 columns, 296 are prime, 203 are composite (first column begins with 1).

Examples

			The start of the sequence as a triangular array read by rows:
   1;
   2,  3;
   4,  6,  5;
   7,  9, 10,  8;
  11, 12, 15, 16, 13;
  14, 18, 20, 24, 26, 17;
  19, 21, 25, 32, 39, 34, 22;
  23, 27, 30, 40, 52, 51, 44, 28;
  ...
Note that each column contains only multiples of the first number in the column.
For a(17), note that we are in the second column, so a(17) must be a positive multiple of 3. No numbers can be repeated, and we see that {3, 6, 9, 12, 15} have already been used, and 18 is the smallest unused positive multiple of 3. Therefore, a(17) = 18.
		

Crossrefs

Cf. A194982, A361251 (inverse).

Programs

  • MATLAB
    See Links section.
  • Maple
    b:= proc() false end:
    T:= proc(n, k) option remember; local j;
          if {n, k} = {1} then j:=1
        elif n=k then for j from T(n-1$2) while b(j) do od
        else for j from T(n-1, k) by T(k, k) while b(j) do od
          fi; b(j):=true; j
        end:
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Mar 19 2023