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.

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

Views

Author

Tamas Sandor Nagy, Sep 27 2022

Keywords

Comments

The rows of the triangular array A357431 are chains of numbers that end with the positive terms of A007952.
It appears that lim_{n->oo} a(n)/A002411(n) will converge to a number close to 0.464401.. . - Thomas Scheuerle, Sep 27 2022

Examples

			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.
		

Crossrefs

Programs

  • MATLAB
    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
    
  • Mathematica
    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 *)
  • PARI
    a(n) = my(t=0); sum(k=0,n-1, t++; t+=(-t)%(n-k)); \\ Kevin Ryde, Sep 27 2022

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

Original entry on oeis.org

1, 1, 3, 1, 2, 5, 1, 2, 4, 9, 1, 2, 3, 5, 11, 1, 2, 3, 5, 8, 17, 1, 2, 3, 4, 6, 10, 21, 1, 2, 3, 4, 6, 9, 14, 29, 1, 2, 3, 4, 5, 7, 10, 16, 33, 1, 2, 3, 4, 5, 7, 9, 13, 20, 41, 1, 2, 3, 4, 5, 6, 8, 11, 15, 23, 47, 1, 2, 3, 4, 5, 6, 8, 10, 13, 18, 28, 57
Offset: 1

Views

Author

Tamas Sandor Nagy, Oct 01 2022

Keywords

Comments

This triangle is related to A357431. Terms there are divisible by n..1 and here that division is performed, leaving the respective multiple of each.
Row n has length n and columns are numbered k = 1..n corresponding to multiples n..1.
Row n begins with n/n = 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  |  1,  3;
  3  |  1,  2,  5;
  4  |  1,  2,  4,  9;
  5  |  1,  2,  3,  5, 11;
  6  |  1,  2,  3,  5,  8, 17;
  7  |  1,  2,  3,  4,  6, 10, 21;
  ...
For row n=6, we have:
  A357431 row  6 10 12 15 16 17
  divided by   6  5  4  3  2  1
  results in   1  2  3  5  8 17
		

Crossrefs

Cf. A358435 (row sums), A357431, A007952 (right diagonal).

Programs

  • Mathematica
    row[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}]; s]; Array[row, 12] // Flatten (* Amiram Eldar, Oct 01 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));); vector(n, k, v[k]/(n-k+1)); \\ Michel Marcus, Nov 16 2022

Formula

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