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 21-25 of 25 results.

A211229 Matrix inverse of lower triangular array A211226.

Original entry on oeis.org

1, -1, 1, 0, -1, 1, 0, 0, -1, 1, 1, 0, 0, -2, 1, -1, 1, 0, 0, -1, 1, 2, -3, 3, 0, 0, -3, 1, -2, 2, -3, 3, 0, 0, -1, 1, 9, -8, 8, -12, 6, 0, 0, -4, 1, -9, 9, -8, 8, -6, 6, 0, 0, -1, 1, 44, -45, 45, -40, 20, -30, 10, 0, 0, -5, 1, -44, 44, -45, 45, -20, 20, -10, 10, 0, 0, -1, 1
Offset: 0

Views

Author

Peter Bala, Apr 05 2012

Keywords

Comments

This triangle is related to the derangement numbers. The subtriangles (T(2*n,2*k))n,k>=0, -(T(2*n+1,2*k))n,k>=0, and (T(2*n+1,2*k+1))n,k>=0 are all equal to A008290, while the subtriangle (T(2*n,2*k+1))n,k>=0 equals -A180188 (with an extra initial row of zeros).

Examples

			Triangle begins:
   n\k |    0    1    2    3    4    5    6    7    8    9
  =====+==================================================
    0  |    1
    1  |   -1    1
    2  |    0   -1    1
    3  |    0    0   -1    1
    4  |    1    0    0   -2    1
    5  |   -1    1    0    0   -1    1
    6  |    2   -3    3    0    0   -3    1
    7  |   -2    2   -3    3    0    0   -1    1
    8  |    9   -8    8  -12    6    0    0   -4    1
    9  |   -9    9   -8    8   -6    6    0    0   -1    1
  ...
		

Crossrefs

Programs

  • Mathematica
    b[j_] = Floor[j/2]; h = If[EvenQ[n] && OddQ[k], 1, 0];
    Table[(-1)^(n+k) (b[n]!/b[k]!) Sum[(-1)^i/i!, {i, 0, b[n-k]-h}], {n, 0, 31}, {k, 0, n}] //Flatten (* Manfred Boergens, Jan 10 2023 *)
    (* Sum-free code *)
    b[j_] = Floor[j/2]; h = If[EvenQ[n] && OddQ[k], 1, 0];
    T[n_, k_] = (-1)^(n+k) (b[n]!/b[k]!) If[n-k<2, 1, Round[(b[n-k]-h)!/E]/(b[n-k]-h)!];
    Table[T[n, k], {n, 0, 31}, {k, 0, n}] // Flatten
    (* Manfred Boergens, Jan 10 2023 *)
  • PARI
    f(n) = (n\2)!; \\ A081123
    T(n,k) = f(n)/(f(k)*f(n-k)); \\ A211226
    tabl(nn) = my(m=matrix(nn, nn, n, k, if (n>=k, T(n-1,k-1), 0))); 1/m; \\ Michel Marcus, Jan 10 2023

Formula

T(2*n,2*k) = T(2*n+1,2*k+1) = -T(2*n+1,2*k) = binomial(n,k)*A000166(n-k) = (n!/k!)*Sum_{i = 0..n-k} (-1)^i/i!;
T(2*n,2*k+1) = -n*binomial(n-1,k)*A000166(n-k-1) = -(n!/k!)*Sum_{i = 0..n-k-1} (-1)^i/i!.
T(n,k) = T(n-k,0)*A211226(n,k).
Column entries:
T(2*n,0) = A000166(n), T(2*n,2) = A000240(n), T(2*n,4) = A000387(n), T(2*n,6) = A000449(n), T(2*n,8) = A000475(n).
From Manfred Boergens, Jan 10 2023: (Start)
With b(j) = floor(j/2); h = 1 for n even and k odd, h = 0 else:
T(n,k) = (-1)^(n+k)*(b(n)!/b(k)!)*Sum_{i = 0..b(n-k)-h} (-1)^i/i!.
Sum-free formula:
T(n,k) = (-1)^(n+k)*(b(n)!/b(k)!) for n-k < 2.
T(n,k) = (-1)^(n+k)*(b(n)!/b(k)!)*round((b(n-k)-h)!/exp(1))/(b(n-k)-h)!) otherwise. (End)

Extensions

More terms from Manfred Boergens, Jan 10 2023

A228924 Irregular triangular array read by rows: T(n,k) is the number of derangement permutations of [n] that have exactly k inversions; n>=2, 1<=k<=binomial(n,2) for even n, 1<=k<=binomial(n,2)-1 for odd n.

Original entry on oeis.org

1, 0, 2, 0, 1, 4, 1, 2, 1, 0, 0, 4, 8, 4, 10, 10, 6, 2, 0, 0, 1, 12, 18, 16, 35, 44, 47, 40, 25, 14, 8, 4, 1, 0, 0, 0, 6, 32, 44, 60, 118, 160, 208, 244, 244, 214, 174, 140, 104, 64, 30, 10, 2, 0, 0, 0, 1, 24, 83, 118, 206, 388, 565, 802, 1068, 1308, 1466, 1508, 1479, 1414, 1290, 1076, 806, 544, 333, 186, 96, 46, 19, 6, 1
Offset: 2

Views

Author

Geoffrey Critzer, Sep 08 2013

Keywords

Comments

Row sums = A000166.
Sum_{k>=1} T(n,k)*k = A216239(n).
Sum_{even k} T(n,k) = A003221(n) and Sum_{odd k} T(n,k) = A000387(n).
It would be nice to have a closed formula for T(n,k). - Alois P. Heinz, Dec 31 2014

Examples

			Triangle T(n,k) begins:
  1;
  0, 2;
  0, 1, 4,  1,  2,  1;
  0, 0, 4,  8,  4, 10, 10,  6,  2;
  0, 0, 1, 12, 18, 16, 35, 44, 47, 40, 25, 14, 8, 4, 1;
  ...
		

Crossrefs

Programs

  • Mathematica
    Map[Distribution[#,Range[1,Max[#]]]&,Table[Map[Inversions,Derangements[n]],{n,2,6}]]//Grid

A065088 a(n) = A000166(n)*binomial(n,2).

Original entry on oeis.org

0, 0, 1, 6, 54, 440, 3975, 38934, 415324, 4805856, 60073245, 807651350, 11630179506, 178681848696, 2918470195459, 50511984152070, 923647710209400, 17795612550034304, 360361154138194809, 7652375096699313126, 170052779926651402990, 3947014523560698353400
Offset: 0

Views

Author

N. J. A. Sloane, Nov 10 2001

Keywords

Crossrefs

Cf. A000387.

Programs

  • Maple
    with (combstruct):with (combinat):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, card>=m))}, labeled]; end: ZLL:=a(2):seq(count(ZLL, size=n)*binomial(n,2), n=0..21); # Zerinvary Lajos, Jun 11 2008
  • Mathematica
    Table[Subfactorial[n]*Binomial[n, 2], {n, 0, 22}] (* Zerinvary Lajos, Jul 09 2009 *)

A009281 Expansion of e.g.f. exp(x)*cosh(log(1+x)).

Original entry on oeis.org

1, 1, 2, 1, 7, -19, 136, -923, 7421, -66743, 667486, -7342279, 88107427, -1145396459, 16035550532, -240533257859, 3848532125881, -65425046139823, 1177650830516986, -22375365779822543, 447507315596451071, -9397653627525472259, 206748379805560389952, -4755212735527888968619, 114125105652669335247157
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A000387.

Programs

  • Mathematica
    With[{nn=20},CoefficientList[Series[Exp[x]*Cosh[Log[1+x]],{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Sep 02 2016 *)
    CoefficientList[Series[(E^x*(1 + (1 + x)^2))/(2*(1 + x)), {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Jan 22 2015 *)
  • PARI
    my(x='x+O('x^66)); Vec(serlaplace(exp(x)*cosh(log(1+x)))) \\ Joerg Arndt, Jan 05 2024

Formula

a(n) ~ n! * (-1)^n / (2*exp(1)). - Vaclav Kotesovec, Jan 22 2015
a(n) = ((-1)^n * A000387(n)) + 1. - Christian Krause, Jan 05 2024

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997
Prior Mathematica program replaced by Harvey P. Dale, Sep 02 2016

A182661 Expansion of x^3*exp(-x)/(3*(1-x)).

Original entry on oeis.org

2, 0, 20, 80, 630, 4928, 44520, 444960, 4894890, 58738240, 763597692, 10690366960, 160355505310, 2565688083840, 43616697426640, 785100553677888, 14916910519881810, 298338210397633920, 6265102418350314980, 137832253203706926480
Offset: 3

Views

Author

Geoffrey Critzer, Feb 01 2011

Keywords

Comments

a(n) is the number of 3-cycles in all derangements of {1,2,...n}.

Crossrefs

Cf. A000387.

Programs

  • Maple
    egf:= x^3 * exp(-x)/(3*(1-x)):
    a:= n-> n! * coeff (series (egf, x, n+1), x, n):
    seq (a(n), n=3..25);
  • Mathematica
    Table[Count[Flatten[Map[Length,Map[ToCycles,Derangements[n]],{2}]],3],{n,0,8}]
    Range[0,20]! CoefficientList[Series[x^3/3 Exp[-x]/(1-x),{x,0,20}],x]

Formula

E.g.f.: x^3 * exp(-x)/(3*(1-x)).
In general, E.g.f. for the number of k cycles in the derangements of [n] is: x^k * exp(-x)/(k*(1-x)).
Previous Showing 21-25 of 25 results.