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.

Showing 1-2 of 2 results.

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

Views

Author

Tamas Sandor Nagy, Nov 16 2022

Keywords

Comments

The rows of the triangular array A357498 are chains of numbers that end with the positive terms of A007952.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    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

Extensions

More terms from Thomas Scheuerle, Nov 16 2022

A357431 Triangle read by rows where each term in row n is the next greater multiple of n..1.

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 4, 6, 8, 9, 5, 8, 9, 10, 11, 6, 10, 12, 15, 16, 17, 7, 12, 15, 16, 18, 20, 21, 8, 14, 18, 20, 24, 27, 28, 29, 9, 16, 21, 24, 25, 28, 30, 32, 33, 10, 18, 24, 28, 30, 35, 36, 39, 40, 41, 11, 20, 27, 32, 35, 36, 40, 44, 45, 46, 47
Offset: 1

Views

Author

Tamas Sandor Nagy, Sep 28 2022

Keywords

Comments

Row n has length n and columns are numbered k = 1..n.
Row n begins with n which is trivially divisible by n. This is followed by the least number greater than n that is divisible by n-1. Next comes the least number that is greater than this preceding one and is divisible by n-2. Then it continues the same way until the last one is reached, which is trivially divisible by 1.
The end-most terms of the rows are A007952.

Examples

			Triangle begins:
  n/k|  1   2   3   4   5   6   7
  --------------------------------
  1  |  1;
  2  |  2,  3;
  3  |  3,  4,  5;
  4  |  4,  6,  8,  9;
  5  |  5,  8,  9, 10, 11;
  6  |  6, 10, 12, 15, 16, 17;
  7  |  7, 12, 15, 16, 18, 20, 21;
  ...
For row n=6, the numbers of the chain, and below them their divisors are:
  6 10 12 15 16 17
  6  5  4  3  2  1
		

Crossrefs

Cf. A357417 (row sums), A357498, A007952 (right diagonal).

Programs

  • Mathematica
    row[n_] := Module[{k = n, s = Table[0, n], r}, s[[1]] = n;Do[k++; k += If[(r = Mod[k, i]) == 0, 0, i - Mod[k, i]]; s[[n+1-i]] = k, {i, n - 1, 1, -1}]; s]; Array[row, 11] // Flatten (* Amiram Eldar, Sep 28 2022 *)
  • PARI
    row(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));); v; \\ Michel Marcus, Nov 16 2022

Formula

T(n,1) = n.
T(n,k) = T(n,k-1) + (n-k+1) - (T(n,k-1) mod (n-k+1)), for k >= 2.
T(n,n) = A007952(n).
Showing 1-2 of 2 results.