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.

A386755 Triangle read by rows, where row terms are filled depending on divisibility of n. See comments.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 2, 0, 1, 0, 0, 3, 2, 1, 0, 0, 3, 2, 0, 1, 0, 0, 3, 0, 0, 2, 1, 0, 0, 3, 0, 0, 2, 0, 1, 0, 0, 0, 4, 0, 3, 0, 2, 1, 0, 0, 0, 4, 0, 3, 0, 2, 0, 1, 0, 0, 0, 0, 5, 0, 0, 4, 3, 2, 1, 0, 0, 0, 0, 5, 0, 0, 4, 3, 2, 0, 1, 0, 0, 0, 0, 5, 0, 0, 4, 3, 0, 0, 2, 1
Offset: 1

Views

Author

Tamas Sandor Nagy, Aug 01 2025

Keywords

Comments

The construction of the array is as follows:
With divisibility testing steps of the process, we find the next strictly smaller multiple of k and enter that k in the row, one after the other.
In this process of row by row, we start at column number n that is the same as the row number. We always start with k=1 and then seek out those greatest m's that are lesser than the previous ones and which are divisible by the incremental k's, until a k exceeds the next m to be tested for divisibility. We write the divisors k inside the rows of the array, but leave 0 where k is not a divisor of n.
Notable properties of the array: Each column contains the proper divisors of n as well as n itself, with multiplicity.
The construction of row n is independent of any other row.
Another related sequence, A007952, is the row numbers where the first k=n's appear.
To construct row n we start by placing d=1 in column n. If we just placed d-1 in column j, then we next place d in the largest column k < j such that d | k. If there is no such column the process ends with d-1 as the largest number in the row. All unused columns are set to 0.

Examples

			The triangle begins:
  1;
  0, 1;
  0, 2, 1;
  0, 2, 0, 1;
  0, 0, 3, 2, 1;
  0, 0, 3, 2, 0, 1;
  0, 0, 3, 0, 0, 2, 1;
  0, 0, 3, 0, 0, 2, 0, 1;
  0, 0, 0, 4, 0, 3, 0, 2, 1;
  0, 0, 0, 4, 0, 3, 0, 2, 0, 1;
  ...
.
An example for the step by step construction of a particular row, let it be row n=20: We start with k=1 at column 20, and find that k=1 divides c=20. So we enter k=1 into the array in that column. Next, let now k=2, and we look for the greatest c that is less than 20, and which is divisible by k=2. That c is 18 in column 18, so we enter 2 in that column. We increase k by 1 to k=3, and similarly seek out the greatest c again that is less than 18, and which is divisible by 3. This number is 15, and so we enter 3 in column 15. And so on, we test divisibility with k=4, k=5, and k=6 to find that these k's fit under c=12, c=10 and c=6, respectively.
  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
  0  0  0  0  0  6  0  0  0  5  0  4  0  0  3  0  0  2  0  1
		

Crossrefs

Programs

  • PARI
    row(n) = my(v=vector(n), m=n); for(k=1, n, my(keepm = m); while(m%k, m--); if (m == 0, keepm=m, v[m] = k; m--);); v; \\ Michel Marcus, Aug 01 2025