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-3 of 3 results.

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

A067078 a(1) = 1, a(2) = 2, a(n) = (n-1)*a(n-1) - (n-2)*a(n-2).

Original entry on oeis.org

1, 2, 3, 5, 11, 35, 155, 875, 5915, 46235, 409115, 4037915, 43954715, 522956315, 6749977115, 93928268315, 1401602636315, 22324392524315, 378011820620315, 6780385526348315, 128425485935180315, 2561327494111820315
Offset: 1

Views

Author

Amarnath Murthy, Jan 05 2002

Keywords

Comments

Successive differences are factorials, or (n+1)st successive difference divided by n-th successive difference = n. I.e., {a(n+2)-a(n+1)}/{a(n+1)-a(n)} = n. - Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 14 2003
Equals the row sums of A165680. - Johannes W. Meijer, Oct 16 2009

Examples

			a(6) = 35, a(5)= 11 hence a(7) = 6*35 - 5*11 = 155.
		

Crossrefs

Programs

  • Haskell
    a067078 n = a067078_list !! (n-1)
    a067078_list = scanl (+) 1 a000142_list
    -- Reinhard Zumkeller, Dec 27 2011
  • Mathematica
    a[1] = 1; a[2] = 2; a[n_] := a[n] = (n - 1)*a[n - 1] - (n - 2)*a[n - 2]; Table[ a[n], {n, 1, 25} ]
    a=FoldList[Plus,2,(Range@40)! ];PrependTo[a,1] (* Vladimir Joseph Stephan Orlovsky, May 21 2010 *)
  • PARI
    A067078(n)=sum(k=0, n-2, k!, 1) \\ M. F. Hasler, Dec 16 2007
    

Formula

a(n) = 1 + Sum_{i=0..n-2} i! = 2*A014288(n-1)+1 = A007489(n-2)+2 (n>1). - Henry Bottomley, Oct 23 2002; corrected by M. F. Hasler, Dec 16 2007
a(n) = 1+!(n-1) = 1+A003422(n-1); a(n+1)=a(n)+(n-1)!. - M. F. Hasler, Dec 16 2007
E.g.f.: A(x)=x*B(x) satisfies the differential equation B'(x)=B(x)+log(1/(1-x))+1. - Vladimir Kruchinin, Jan 19 2011

Extensions

More terms from Robert G. Wilson v, Jan 07 2002
Edited by M. F. Hasler, Dec 16 2007

A138771 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} whose 2nd cycle has k entries; each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements (n>=1; 0<=k<=n-1). For example, 1432=(1)(24)(3) has 2 entries in the 2nd cycle; 3421=(1324) has 0 entries in the 2nd cycle.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 6, 11, 5, 2, 24, 50, 26, 14, 6, 120, 274, 154, 94, 54, 24, 720, 1764, 1044, 684, 444, 264, 120, 5040, 13068, 8028, 5508, 3828, 2568, 1560, 720, 40320, 109584, 69264, 49104, 35664, 25584, 17520, 10800, 5040
Offset: 1

Views

Author

Emeric Deutsch, Apr 10 2008

Keywords

Comments

T(n,0)=(n-1)!=A000142(n-1).
T(n,1)=A000254(n-1).
T(n,2)=A001705(n-2).
T(n,3)=2*A001711(n-4).
T(n,4)=6*A001716(n-5).
T(n,n-1)=(n-2)! (n>=2).
Sum(kT(n,k),k=0..n-1)=(n-1)!(n-1)(n+2)/4=A138772(n).

Examples

			T(4,2)=5 because we have (1)(23)(4), (1)(24)(3), (13)(24), (12)(34) and (14)(23).
Triangle starts;
1;
1,1;
2,3,1;
6,11,5,2;
24,50,26,14,6;
120,274,154,94,54,24;
		

Crossrefs

From Johannes W. Meijer, Oct 16 2009: (Start)
A000142 equals for n=>1 the row sums.
a(n) = A165680(n) * A165675(n-1).
(End)

Programs

  • Maple
    T:=proc (n,k) if k = 0 then factorial(n-1) elif n <= k then 0 else (n-1)*T(n-1, k)+factorial(n-2) end if end proc: for n to 9 do seq(T(n, k), k=0..n-1) end do;

Formula

T(n,k)=(n-1)T(n-1,k)+(n-2)! (1<=k<=n-1). The row generating polynomials P[n](t) satisfy: P[n+1](t)=nP[n](t)+(n-1)!(t+t^2+...+t^n).
Showing 1-3 of 3 results.