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.

A165675 Triangle read by rows. T(n, k) = (n - k + 1)! * H(k, n - k), where H are the hyperharmonic numbers. For 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 6, 11, 5, 1, 24, 50, 26, 7, 1, 120, 274, 154, 47, 9, 1, 720, 1764, 1044, 342, 74, 11, 1, 5040, 13068, 8028, 2754, 638, 107, 13, 1, 40320, 109584, 69264, 24552, 5944, 1066, 146, 15, 1, 362880, 1026576, 663696, 241128, 60216, 11274, 1650, 191, 17, 1
Offset: 0

Views

Author

Johannes W. Meijer, Oct 05 2009

Keywords

Comments

Previous name: Extended triangle related to the asymptotic expansions of the E(x, m = 2, n).
For the definition of the hyperharmonic numbers see the formula section.
This triangle is the same as triangle A165674 except for the extra left-hand column T(n, 0) = n!. The T(n) formulas for the right-hand columns generate the coefficients of this extra left-hand column.
Leroy Quet discovered triangle A105954 which is the reversal of our triangle.
In square format, row k gives the (n-1)-st elementary symmetric function of {k, k+1, k+2,..., k+n}, as in the Mathematica section. - Clark Kimberling, Dec 29 2011

Examples

			Triangle T(n, k) begins:
  [0]    1;
  [1]    1,     1;
  [2]    2,     3,    1;
  [3]    6,    11,    5,    1;
  [4]   24,    50,   26,    7,   1;
  [5]  120,   274,  154,   47,   9,   1;
  [6]  720,  1764, 1044,  342,  74,  11,  1;
  [7] 5040, 13068, 8028, 2754, 638, 107, 13, 1;
Seen as an array (the triangle arises when read by descending antidiagonals):
  [0] 1,  1,   2,    6,    24,    120,     720,     5040, ...
  [1] 1,  3,  11,   50,   274,   1764,   13068,   109584, ...
  [2] 1,  5,  26,  154,  1044,   8028,   69264,   663696, ...
  [3] 1,  7,  47,  342,  2754,  24552,  241128,  2592720, ...
  [4] 1,  9,  74,  638,  5944,  60216,  662640,  7893840, ...
  [5] 1, 11, 107, 1066, 11274, 127860, 1557660, 20355120, ...
  [6] 1, 13, 146, 1650, 19524, 245004, 3272688, 46536624, ...
  [7] 1, 15, 191, 2414, 31594, 434568, 6314664, 97053936, ...
		

Crossrefs

A105954 is the reversal of this triangle.
A165674, A138771 and A165680 are related triangles.
A080663 equals the third right hand column.
A000142 equals the first left hand column.
A093345 are the row sums.
Columns include A165676, A165677, A165678 and A165679.

Programs

  • Maple
    nmax := 8; for n from 0 to nmax do a(n, 0) := n! od: for n from 0 to nmax do a(n, n) := 1 od: for n from 2 to nmax do for m from 1 to n-1 do a(n, m) := (n-m+1)*a(n-1, m) + a(n-1, m-1) od: od: seq(seq(a(n, m), m=0..n), n=0..nmax);
    # Johannes W. Meijer, revised Nov 27 2012
    # Shows the array format, using hyperharmonic numbers.
    H := proc(n, k) option remember; if n = 0 then 1/(k+1)
    else add(H(n - 1, j), j = 0..k) fi end:
    seq(lprint(seq((k + 1)!*H(n, k), k = 0..7)), n = 0..7);
    # Shows the array format, using the hypergeometric formula.
    A := (n, k) -> (k+1)*((n + k)! / n!)*hypergeom([-k, 1, 1], [2, n + 1], 1):
    seq(lprint(seq(simplify(A(n, k)), k = 0..7)), n = 0..7);
    # Peter Luschny, Jul 03 2022
  • Mathematica
    a[n_] := SymmetricPolynomial[n - 1, t[n]]; z = 10;
    t[n_] := Table[k - 1, {k, 1, n}]; t1 = Table[a[n], {n, 1, z}]  (* A000142 *)
    t[n_] := Table[k,     {k, 1, n}]; t2 = Table[a[n], {n, 1, z}]  (* A000254 *)
    t[n_] := Table[k + 1, {k, 1, n}]; t3 = Table[a[n], {n, 1, z}]  (* A001705 *)
    t[n_] := Table[k + 2, {k, 1, n}]; t4 = Table[a[n], {n, 1, z}]  (* A001711 *)
    t[n_] := Table[k + 3, {k, 1, n}]; t5 = Table[a[n], {n, 1, z}]  (* A001716 *)
    t[n_] := Table[k + 4, {k, 1, n}]; t6 = Table[a[n], {n, 1, z}]  (* A001721 *)
    t[n_] := Table[k + 5, {k, 1, n}]; t7 = Table[a[n], {n, 1, z}]  (* A051524 *)
    t[n_] := Table[k + 6, {k, 1, n}]; t8 = Table[a[n], {n, 1, z}]  (* A051545 *)
    t[n_] := Table[k + 7, {k, 1, n}]; t9 = Table[a[n], {n, 1, z}]  (* A051560 *)
    t[n_] := Table[k + 8, {k, 1, n}]; t10 = Table[a[n], {n, 1, z}] (* A051562 *)
    t[n_] := Table[k + 9, {k, 1, n}]; t11 = Table[a[n], {n, 1, z}] (* A051564 *)
    t[n_] := Table[k + 10, {k, 1, n}];t12 = Table[a[n], {n, 1, z}] (* A203147 *)
    t = {t1, t2, t3, t4, t5, t6, t7, t8, t9, t10};
    TableForm[t]  (* A165675 in square format *)
    m[i_, j_] := t[[i]][[j]];
    (* A165675 as a sequence *)
    Flatten[Table[m[i, n + 1 - i], {n, 1, 10}, {i, 1, n}]]
    (* Clark Kimberling, Dec 29 2011 *)
    A[n_, k_] := (k + 1)*((n + k)! / n!)*HypergeometricPFQ[{-k, 1, 1}, {2, n + 1}, 1];
    Table[A[n, k], {n, 0, 7}, {k, 0, 7}] // TableForm (* Peter Luschny, Jul 03 2022 *)
  • Python
    from functools import cache
    @cache
    def Trow(n: int) -> list[int]:
        if n == 0:
            return [1]
        row = Trow(n - 1) + [1]
        for m in range(n - 1, 0, -1):
            row[m] = (n - m + 1) * row[m] + row[m - 1]
        row[0] *= n
        return row
    for n in range(9): print(Trow(n))  # Peter Luschny, Feb 27 2025

Formula

The hyperharmonic numbers are H(n, k) = Sum_{j=0..k} H(n - 1, j), with base condition H(0, k) = 1/(k + 1).
T(n, k) = (n - k + 1)*T(n - 1, k) + T(n - 1, k - 1), 1 <= k <= n-1, with T(n, 0) = n! and T(n, n) = 1.
From Peter Luschny, Jul 03 2022: (Start)
The rectangular array is given by:
A(n, k) = (k + 1)!*H(n, k).
A(n, k) = (k + 1)*((n + k)! / n!)*hypergeom([-k, 1, 1], [2, n + 1], 1). (End)
From Werner Schulte, Feb 26 2025: (Start)
T(n, k) = n * T(n-1, k) + (n-1)! / (k-1)! for 0 < k < n.
T(n, k) = (Sum_{i=k..n} 1/i) * n! / (k-1)! for 0 < k <= n.
Matrix inverse M = T^(-1) is given by: M(n, n) = 1, M(n, n-1) = 1 - 2 * n for n > 0, M(n, n-2) = (n-1)^2 for n > 1, and M(i, j) = 0 otherwise. (End)

Extensions

New name from Peter Luschny, Jul 03 2022