A386755 Triangle read by rows, where row terms are filled depending on divisibility of n. See comments.
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
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
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
Comments