A357417
Row sums of the triangular array A357431.
Original entry on oeis.org
1, 5, 12, 27, 43, 76, 109, 168, 218, 301, 383, 499, 591, 779, 904, 1153, 1322, 1555, 1817, 2143, 2379, 2790, 3164, 3627, 3957, 4546, 5034, 5599, 6062, 6937, 7456, 8369, 8973, 9896, 10678, 11663, 12430, 13732, 14618, 15920, 16996, 18471, 19570, 20934, 22189, 24080
Offset: 1
For n = 6, the numbers of the chain that are divisible by 6, 5, 4, 3, 2, and 1 are 6, 10, 12, 15, 16, and 17, these forming row 6 of A357431. The sum of this row is a(6) = 76.
-
function a = A357417( max_n )
for n = 1:max_n
k = [n:-1:1];
for m = 2:length(k)
k(m) = k(m)*(floor(k(m-1)/k(m))+1);
end
a(n) = sum(k);
end
end % Thomas Scheuerle, Sep 27 2022
-
a[n_] := Module[{k = n, s = n, r}, Do[k++; k += If[(r = Mod[k, i]) == 0, 0, i - Mod[k, i]]; s += k, {i, n - 1, 1, -1}]; s]; Array[a, 50] (* Amiram Eldar, Sep 27 2022 *)
-
a(n) = my(t=0); sum(k=0,n-1, t++; t+=(-t)%(n-k)); \\ Kevin Ryde, Sep 27 2022
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
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
-
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
Original entry on oeis.org
1, 1, 2, 1, 3, 2, 4, 2, 4, 3, 5, 1, 9, 2, 10, 3, 5, 7, 9, 2, 10, 9, 9, 2, 13, 9, 8, 4, 20, 4, 15, 6, 15, 8, 12, 6, 22, 6, 15, 15, 21, 5, 13, 12, 23, 7, 24, 11, 19, 15, 24, 6, 30, 6, 26, 7
Offset: 1
Equals (b(n+2)-b(n+1))/2, where b(*) is
A007952.
A358435
Row sums of the triangular array A357498.
Original entry on oeis.org
1, 4, 8, 16, 22, 36, 47, 68, 81, 105, 125, 155, 169, 220, 239, 300, 326, 365, 414, 475, 500, 572, 635, 705, 734, 830, 897, 966, 1009, 1151, 1195, 1318, 1373, 1490, 1566, 1672, 1734, 1903, 1971, 2107, 2221, 2390, 2461, 2580, 2689, 2887, 2963, 3176, 3276, 3450, 3580, 3789, 3868
Offset: 1
For row n=6, the next greater multiples are 6, 10, 12, 15, 16, and 17. These, divided by n..1 result in 1, 2, 3, 5, 8, and 17, the sum of which is a(6) = 36.
-
a[n_] := Module[{k = n, s = Table[0, n], r}, s[[1]] = 1; Do[k++; k += If[(r = Mod[k, i]) == 0, 0, i - Mod[k, i]]; s[[n + 1 - i]] = k/i, {i, n - 1, 1, -1}]; Total[s]]; Array[a, 50] (* Amiram Eldar, Nov 16 2022 *)
-
a(n) = my(v=vector(n)); v[1] = n; for (k=2, n, v[k] = v[k-1] + (n-k+1) - (v[k-1] % (n-k+1));); vecsum(vector(n, k, v[k]/(n-k+1))); \\ Michel Marcus, Nov 16 2022
Comments