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.

Previous Showing 11-15 of 15 results.

A061312 Triangle T[n,m]: T[n,-1] = 0; T[0,0] = 0; T[n,0] = n*n!; T[n,m] = T[n,m-1] - T[n-1,m-1].

Original entry on oeis.org

0, 1, 1, 4, 3, 2, 18, 14, 11, 9, 96, 78, 64, 53, 44, 600, 504, 426, 362, 309, 265, 4320, 3720, 3216, 2790, 2428, 2119, 1854, 35280, 30960, 27240, 24024, 21234, 18806, 16687, 14833, 322560, 287280, 256320, 229080, 205056, 183822, 165016, 148329
Offset: 0

Views

Author

Wouter Meeussen, Jun 06 2001

Keywords

Comments

Appears in the (n,k)-matching problem A076731. [Johannes W. Meijer, Jul 27 2011]

Examples

			0,
1, 1,
4, 3, 2,
18, 14, 11, 9,
96, 78, 64, 53, 44,
600, 504, 426, 362, 309, 265,
4320, 3720, 3216, 2790, 2428, 2119, 1854,
35280, 30960, 27240, 24024, 21234, 18806, 16687, 14833,
		

Crossrefs

Cf. A061018.
From Johannes W. Meijer, Jul 27 2011: (Start)
The row sums equal A193465. (End)

Programs

  • Magma
    [[(&+[(-1)^j*Binomial(k+1,j)*Factorial(n-j+1): j in [0..k+1]]): k in [0..n]]: n in [0..20]]; // G. C. Greubel, Aug 13 2018
  • Maple
    A061312 := proc(n,m): add(((-1)^j)*binomial(m+1,j)*(n+1-j)!, j=0..m+1) end: seq(seq(A061312(n,m), m=0..n), n=0..7); # Johannes W. Meijer, Jul 27 2011
  • Mathematica
    T[n_, k_]:= Sum[(-1)^j*Binomial[k + 1, j]*(n + 1 - j)!, {j, 0, k + 1}]; Table[T[n, k], {n, 0, 100}, {k, 0, n}] // Flatten  (* G. C. Greubel, Aug 13 2018 *)
  • PARI
    for(n=0,20, for(k=0,n, print1(sum(j=0,k+1, (-1)^j*binomial(k+1,j) *(n-j+1)!), ", "))) \\ G. C. Greubel, Aug 13 2018
    

Formula

T[n,m] = T[n,m-1]-T[n-1,m-1] with T[n,-1] = 0 and T[n,0] = A001563(n) = n*n!
T(n,m) = sum(((-1)^j)*binomial(m+1,j)*(n+1-j)!, j=0..m+1) [Johannes W. Meijer, Jul 27 2011]

A094791 Triangle read by rows giving coefficients of polynomials arising in successive differences of (n!)_{n>=0}.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 3, 5, 2, 1, 6, 17, 20, 9, 1, 10, 45, 100, 109, 44, 1, 15, 100, 355, 694, 689, 265, 1, 21, 196, 1015, 3094, 5453, 5053, 1854, 1, 28, 350, 2492, 10899, 29596, 48082, 42048, 14833, 1, 36, 582, 5460, 32403, 124908, 309602, 470328, 391641, 133496
Offset: 0

Views

Author

Benoit Cloitre, Jun 11 2004

Keywords

Comments

Let D_0(n)=n! and D_{k+1}(n)=D_{k}(n+1)-D_{k}(n), then D_{k}(n)=n!*P_{k}(n) where P_{k} is a polynomial with integer coefficients of degree k.
The horizontal reversal of this triangle arises as a binomial convolution of the derangements coefficients der(n,i) (numbers of permutations of size n with i derangements = A098825(n,i) = number of permutations of size n with n-i rencontres = A008290(n,n-i), see formula section). - Olivier Gérard, Jul 31 2011

Examples

			D_3(n) = n!*(n^3 + 3*n^2 + 5*n + 2).
D_4(n) = n!*(n^4 + 6*n^3 + 17*n^2 + 20*n + 9).
Table begins:
  1
  1  0
  1  1   1
  1  3   5   2
  1  6  17  20    9
  1 10  45 100  109   44
  1 15 100 355  694  689  265
  ...
		

Crossrefs

Successive differences of factorial numbers: A001563, A001564, A001565, A001688, A001689, A023043.
Rencontres numbers A008290. Partial derangements A098825.
Row sum is A000255. Signed version in A126353.

Programs

  • Maple
    with(LREtools): A094791_row := proc(n)
    delta(x!,x,n); simplify(%/x!); seq(coeff(%,x,n-j),j=0..n) end:
    seq(print(A094791_row(n)),n=0..9); # Peter Luschny, Jan 09 2015
  • Mathematica
    d[0][n_] := n!; d[k_][n_] := d[k][n] = d[k - 1][n + 1] - d[k - 1][n] // FullSimplify;
    row[k_] := d[k][n]/n! // FullSimplify // CoefficientList[#, n]& // Reverse;
    Array[row, 10, 0] // Flatten (* Jean-François Alcover, Aug 02 2019 *)

Formula

T(n, n) = A000166(n).
T(2, k) = A000217(k).
Sum_{k=0..n} T(n,n-k)*x^k = Sum_{i=0..n} der(n,i)*binomial( n+x, i) (an analog of Worpitzky's identity). - Olivier Gérard, Jul 31 2011

Extensions

Edited and T(0,0) corrected according to the author's definition by Olivier Gérard, Jul 31 2011

A116853 Difference triangle of factorial numbers read by upward diagonals.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 11, 14, 18, 24, 53, 64, 78, 96, 120, 309, 362, 426, 504, 600, 720, 2119, 2428, 2790, 3216, 3720, 4320, 5040, 16687, 18806, 21234, 24024, 27240, 30960, 35280, 40320
Offset: 1

Views

Author

Gary W. Adamson, Feb 24 2006

Keywords

Comments

This is a subsequence of Euler's difference table A068106 and of A047920 (in a different ordering), since 0! = 1 was left out here. - Georg Fischer, Mar 23 2019

Examples

			Starting with 1, 2, 6, 24, 120 ... we take the first difference row (A001563), second, third, etc. Reorient into a flush left format, getting:
[1]    1;
[2]    1,   2;
[3]    3,   4,   6;
[4]   11,  14,  18,  24;
[5]   53,  64,  78,  96, 120;
[6]  309, 362, 426, 504, 600, 720;
...
		

Crossrefs

Cf. A000142 (factorial numbers).
Cf. A000255 (first column and inverse binomial transform of A000142).
N-th forward differences of A000142: A001563 (1st), A001564 (2nd), A001565 (3rd), A001688 (4th), A001689 (5th).
Cf. A047920 (with 0!, different order), A068106 (with 0!), A180191 (row sums), A246606 (central terms).

Programs

  • Haskell
    a116853 n k = a116853_tabl !! (n-1) !! (k-1)
    a116853_row n = a116853_tabl !! (n-1)
    a116853_tabl = map reverse $ f (tail a000142_list) [] where
       f (u:us) vs = ws : f us ws where ws = scanl (-) u vs
    -- Reinhard Zumkeller, Aug 31 2014
  • Mathematica
    rows = 8;
    rr = Range[rows]!;
    dd = Table[Differences[rr, n], {n, 0, rows-1}];
    T = Array[t, {rows, rows}];
    Do[Thread[Evaluate[Diagonal[T, -k+1]] = dd[[k, ;;rows-k+1]]], {k, rows}];
    Table[t[n, k], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 21 2019 *)

Formula

Take successive difference rows of factorial numbers n! starting with n=1. Reorient into a triangle format.

A180196 Triangle read by rows: T(n,k) is the number of permutations of [n] that have k isolated entries (0 <= k <= n).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 2, 0, 3, 2, 2, 9, 0, 11, 3, 11, 9, 44, 0, 53, 7, 20, 75, 44, 265, 0, 309, 14, 73, 141, 574, 265, 1854, 0, 2119, 35, 170, 737, 1104, 4900, 1854, 14833, 0, 16687, 81, 576, 1863, 7814, 9535, 46353, 14833, 133496, 0, 148329, 216, 1556, 8154, 20704, 88335, 90852, 482069, 133496, 1334961, 0, 1468457
Offset: 0

Views

Author

Emeric Deutsch, Sep 09 2010

Keywords

Comments

An entry j of a permutation p is isolated if it is not preceded by j-1 and not followed by j+1. For example, the permutation 23178564 has 2 isolated entries: 1 and 4.
Sum of entries in row n is n! = A000142(n).
T(n,n) = d(n) + d(n-1) = A000255(n-1), where d(i)=A000166(i) are the derangement numbers.
T(n,n-2) = d(n) (n >= 2).
T(n,n-3) = d(n-1) (n >= 3).
Sum_{k=0..n} k*T(n,k) = (n-2)!*(n^3 - 3n^2 + 5n - 4) = A001565(n-2) (n >= 2).

Examples

			T(4,2)=9 because we have 124'3', 1'4'23, 1'342', 3'124', 4'3'12, 2'1'34, 231'4', 4'231', and 342'1' (the isolated entries are marked).
Triangle starts:
  1;
  0,  1;
  1,  0,  1;
  1,  2,  0,  3;
  2,  2,  9,  0, 11;
  3, 11,  9, 44,  0, 53;
		

Crossrefs

Programs

  • Maple
    d[ -1] := 0: d[0] := 1: for n to 50 do d[n] := n*d[n-1]+(-1)^n end do: T := proc (n, k) if k < n then sum(binomial(n-1-j, j-k-1)*binomial(j, k)*(d[j]+d[j-1]), j = k+1 .. floor((1/2)*n+(1/2)*k)) elif k = n then d[n]+d[n-1] else 0 end if end proc: for n from 0 to 10 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := With[{d = Subfactorial}, Which[k == n == 0, 1, k == n, d[n] + d[n - 1], True, Sum[Binomial[n - 1 - j, j - k - 1]*Binomial[j, k]*(d[j] + d[j - 1]), {j, k + 1, Floor[(n + k)/2]}]]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 19 2024 *)

Formula

T(n,k) = Sum_{j=k+1..floor((n+k)/2)} binomial(n-1-j, j-k-1)*binomial(j,k)*(d(j) + d(j-1)), if k < n;
T(n,n) = d(n) + d(n-1); d(i)=A000166(i) are the derangement numbers.

A184183 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k blocks of length 2 (0 <= k <= floor(n/2)). A block of a permutation is a maximal sequence of consecutive integers which appear in consecutive positions. For example, the permutation 5412367 has 4 blocks: 5, 4, 123, and 67; one of them is of length 2.

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 14, 9, 1, 65, 46, 9, 366, 285, 66, 3, 2451, 2006, 539, 44, 18949, 16054, 4776, 530, 11, 166033, 144128, 46230, 6224, 265, 1624948, 1436322, 487573, 75269, 4635, 53, 17561350, 15740718, 5584332, 954116, 74430, 1854, 207650171, 188194591, 69157935, 12776470, 1177625, 44499, 309
Offset: 0

Views

Author

Emeric Deutsch, Feb 14 2011

Keywords

Comments

Number of entries in row n is 1+floor(n/2).
Sum of entries in row n is n!.
T(2n+1,n) = d(n+2), where d(i)=A000166(n) are the derangement numbers.
T(2n,n) = d(n-1) + d(n), where d(i)=A000166(n) are the derangement numbers.
Sum_{k>=0} k*T(n,k) = A001565(n-3) (n>=3).

Examples

			T(4,1) = 9 because we have 1243, 2314, 3421, 3124, 4231, 1342, 4312, 1423, and 2134.
T(6,3) = 3 because we have 563412, 341256, and 125634.
Triangle starts:
    1;
    1;
    1,   1;
    4,   2;
   14,   9,  1;
   65,  46,  9;
  366, 285, 66, 3;
  ...
		

Crossrefs

Programs

  • Maple
    d[-1] := 0: d[0] := 1: for n to 40 do d[n] := n*d[n-1]+(-1)^n end do: b := proc (n, i, j) if i+2*j < n then add(binomial(n+i-2*q-1, q-i-j-1)*factorial(q)*(d[q]+d[q-1])/(factorial(i)*factorial(j)*factorial(q-i-j)), q = i+j+1 .. (1/3)*n+(2/3)*i+(1/3)*j) elif i+2*j = n then factorial(i+j)*(d[i+j]+d[i+j-1])/(factorial(i)*factorial(j)) else 0 end if end proc: T := proc (n, k) options operator, arrow; add(b(n, i, k), i = 0 .. n) end proc: for n from 0 to 12 do seq(T(n, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form
  • Mathematica
    d = Subfactorial;
    b[n_, i_, j_] := Which[i+2j < n, Sum[Binomial[n+i-2q-1, q-i-j-1]*q!*(d[q]+ d[q-1])/(i!*j!*(q-i-j)!), {q, i+j+1, n/3 + 2i/3 + j/3}], i+2j == n, (i+j)!*((d[i+j] + d[i+j-1])/(i!*j!)), True, 0];
    T[n_, k_] := Sum[b[n, i, k], {i, 0, n}]; T[0, 0] = 1;
    Table[T[n, k], {n, 0, 12}, {k, 0, Quotient[n, 2]}] // Flatten (* Jean-François Alcover, Feb 16 2021, after Maple *)

Formula

T(n,k) = Sum_{i=0..n} b(n,i,k), where b(n,i,j) = number of permutations of {1,2,...,n} having i blocks of length 1 and j blocks of length 2 is given by
b(n,i,j) = Sum_{q=i+j+1..(1/3)*(n+2i+j)} binomial(n+i-2q-1, q-i-j-1)*q!*(d(q) + d(q-1))/(i!j!(q-i-j)!) if i+2j < n,
b(n,i,j) = binomial(i+j,i)*(d(q) + d(q-1)) if i+2j=n,
b(n,i,j) = 0 if i+2j > n, where
d(m) = A000166(m) are the derangement numbers.
Previous Showing 11-15 of 15 results.