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 71-80 of 119 results. Next

A010029 Irregular triangle read by rows: T(n,k) (n>=1, 0 <= k <= floor(n/2)) = number of permutations of 1..n with exactly floor(n/2) - k runs of consecutive pairs up.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 12, 11, 11, 56, 53, 3, 87, 321, 309, 53, 693, 2175, 2119, 11, 680, 5934, 17008, 16687, 309, 8064, 55674, 150504, 148329, 53, 5805, 96370, 572650, 1485465, 1468457, 2119, 95575
Offset: 1

Views

Author

Keywords

Examples

			Triangle begins
     1
     1     1
     3     3
     1    12    11
    11    56    53
     3    87   321    309
    53   693  2175   2119
    11   680  5934  17008   16687
   309  8064 55674 150504  148329
    53  5805 96370 572650 1485465 1468457
  2119 95575 ...
  ...
		

References

  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 264, Table 7.6.1.

Crossrefs

Cf. A000255, A001277, A001278, A001279, A001280, A000142 (row sums), A136123 (rows reversed).

Programs

  • Maple
    A010029 := proc(n,k)
        add( x^i*( ((1-y)*x-1)/((1-y)*x^2-1) )^i*i!,i=0..n+1) ;
        coeftayl(%,x=0,n) ;
        coeftayl(%,y=0,floor(n/2)-k) ;
    end proc:
    seq(seq( A010029(n,k),k=0..floor(n/2)),n=1..12) ; # R. J. Mathar, Jul 01 2022
  • Mathematica
    max = 16; coes = CoefficientList[ Series[ Sum[ n!*(((1 - y)*x^2 - x)/((1 - y)*x^2 - 1))^n, {n, 0, max}], {x, 0, max}, {y, 0, max}], {x, y}]; Table[ Table[ coes[[n, k]] , {k, 1, Floor[(n + 1)/2]}] // Reverse, {n, 2, max - 4}] // Flatten (* Jean-François Alcover, Jan 10 2013, after Vladeta Jovovic *)

Formula

G.f.: Sum_{n>=0} n! *( ((1-y)*x^2-x)/((1-y)*x^2-1) )^n, for the triangle read right-to-left. - Vladeta Jovovic, Nov 21 2007
T(n,k) = A136123(n,[n/2]-k). - R. J. Mathar, Jul 01 2022

A046740 Triangle of number of permutations of [n] with 0 successions, by number of rises.

Original entry on oeis.org

1, 1, 1, 2, 1, 8, 2, 1, 22, 28, 2, 1, 52, 182, 72, 2, 1, 114, 864, 974, 164, 2, 1, 240, 3474, 8444, 4174, 352, 2, 1, 494, 12660, 57194, 61464, 15782, 732, 2, 1, 1004, 43358, 332528, 660842, 373940, 55286, 1496, 2, 1, 2026, 142552, 1747558, 5814124
Offset: 1

Views

Author

Keywords

Comments

The recurrence given by Roselle is wrong.

Examples

			Triangle begins:
  1;
  1;
  1,  2;
  1,  8,  2;
  1, 22, 28,  2;
  ...
		

Crossrefs

Cf. A046739, A000295. Row sums give A000255. Diagonals give A005803, A065340.
Row sums give A000255.

Programs

  • Mathematica
    a[, 1] = 1; a[n, 2] := 2^n - 2*n; a[n_, r_] /; 1 <= r <= n-1 := a[n, r] = r*a[n-1, r] + (n-r)*a[n-1, r-1] + (n-2)*a[n-2, r-1]; a[, ] = 0;
    row[1] = {{1}}; row[n_] := Table[a[n, r], {r, 1, n-1}];
    Table[row[n], {n, 1, 11}] // Flatten (* Jean-François Alcover, Sep 07 2017 *)

Formula

a(n, 1) = 1; for r > 1, a(n, r) = r*a(n-1, r) + (n-r)*a(n-1, r-1) + (n-2)*a(n-2, r-1).
a(n, 2) = 2^n - 2*n = 2*A000295 = A005803, n >= 3.

Extensions

More terms from Vladeta Jovovic, Jan 03 2003

A090013 Permanent of (0,1)-matrix of size n X (n+d) with d=3 and n-1 zeros not on a line.

Original entry on oeis.org

4, 16, 84, 536, 4004, 34176, 327604, 3481096, 40585284, 514872176, 7058605844, 103969203576, 1637182717924, 27442553929696, 487806792137844, 9164718013496936, 181446744138509444, 3775570370986139856
Offset: 1

Views

Author

Jaap Spies, Dec 13 2003

Keywords

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.

Crossrefs

Programs

  • Mathematica
    t={4,16};Do[AppendTo[t,(n+2)*t[[-1]]+(n-2)*t[[-2]]],{n,3,18}];t (* Indranil Ghosh, Feb 21 2017 *)

Formula

a(n) = (n+2)*a(n-1) + (n-2)*a(n-2), a(1)=4, a(2)=16
a(n) ~ exp(-1) * n! * n^3 / 6. - Vaclav Kotesovec, Nov 30 2017

Extensions

Corrected by Jaap Spies, Jan 26 2004

A090015 Permanent of (0,1)-matrix of size n X (n+d) with d=5 and n-1 zeros not on a line.

Original entry on oeis.org

6, 36, 258, 2136, 19998, 208524, 2393754, 29976192, 406446774, 5930064372, 92608986546, 1541044428456, 27216454135758, 508388707585116, 10013199347882058, 207381428863832784, 4505207996358719334
Offset: 1

Views

Author

Jaap Spies, Dec 13 2003

Keywords

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.

Crossrefs

Programs

  • Maple
    f:= gfun:-rectoproc({a(n) = (n+4)*a(n-1) + (n-2)*a(n-2),a(1)=6,a(2)=36},a(n),remember):
    map(f, [$1..40]); # Robert Israel, Nov 26 2018
  • Mathematica
    t={6,36};Do[AppendTo[t,(n+4)*t[[-1]]+(n-2)*t[[-2]]],{n,3,17}];t (* Indranil Ghosh, Feb 21 2017 *)
    RecurrenceTable[{a[n] == (n+4)*a[n-1] + (n-2)*a[n-2],
    a[1] == 6, a[2] == 36}, a, {n, 1, 40}] (* Jean-François Alcover, Sep 16 2022, after Robert Israel *)

Formula

a(n) = (n+4)*a(n-1) + (n-2)*a(n-2), a(1)=6, a(2)=36
a(n) ~ exp(-1) * n! * n^5 / 5!. - Vaclav Kotesovec, Nov 30 2017
a(n) = ((n^6+21*n^5+160*n^4+545*n^3+814*n^2+415*n+1)*exp(-1)*Gamma(n, -1)+(-1)^n*(n^5+20*n^4+141*n^3+422*n^2+499*n+154))/120. - Robert Israel, Nov 26 2018

Extensions

Corrected by Jaap Spies, Jan 26 2004

A113059 a(n) = n! * Sum_{k=0..n} A000296(k)/k!.

Original entry on oeis.org

1, 1, 3, 10, 44, 231, 1427, 10151, 81923, 740732, 7425042, 81773715, 981864897, 12767876941, 178774288331, 2681781213130, 42909715480460, 729474427239587, 13130613291110603, 249482261007109579, 4989650444408388515, 104782705832468197252, 2305219956684224457858
Offset: 0

Views

Author

Karol A. Penson, Oct 12 2005

Keywords

Comments

Number of set partitions of [n] where the k-th singletons are k-colored and all other blocks are unicolored. - Alois P. Heinz, Apr 29 2025

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Exp(Exp(x)-1-x)/(1-x))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 23 2018
  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, k*b(n-1, k+1)+
          add(b(n-j, k)*binomial(n-1, j-1), j=2..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..22);  # Alois P. Heinz, Apr 29 2025
    # second Maple program:
    b:= proc(n, k, m) option remember; `if`(n=0, k!, `if`(k>0,
          b(n-1, k-1, m+1)*k, 0)+m*b(n-1, k, m)+b(n-1, k+1, m))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..22);  # Alois P. Heinz, Apr 29 2025
  • Mathematica
    With[{nmax = 50}, CoefficientList[Series[Exp[Exp[x] - 1 - x]/(1 - x), {x, 0, nmax}], x]*Range[0, nmax]!] (* G. C. Greubel, May 23 2018 *)
  • PARI
    x='x+O('x^30); Vec(serlaplace( exp(exp(x)-1-x)/(1-x))) \\ G. C. Greubel, May 23 2018
    

Formula

a(n) = (-1)^n*n!*Sum_{k >=0} LaguerreL(n, -n-1, k-1)/k!/exp(1), n>=0.
E.g.f.: exp(exp(x)-1-x)/(1-x).
a(n) ~ exp(exp(1)-2) * n!. - Vaclav Kotesovec, Jun 26 2022

A153869 Triangle read by rows, A129186 * A128064(unsigned).

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 0, 2, 3, 0, 0, 0, 3, 4, 0, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 5, 6, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0
Offset: 1

Views

Author

Gary W. Adamson, Jan 03 2009

Keywords

Comments

Lim_{k->inf} A153869^n = A000255: (1, 1, 3, 11, 53, 309, 2119,...).
Row sums = (1, 1, 3, 5, 7, 9,...).
A153869 * (1, 2, 3,...) = A001844 prefaced with a 1: (1, 1, 5, 13, 25, 41,...).

Examples

			First few rows of the triangle =
1;
1, 0;
1, 2, 0;
0, 2, 3, 0;
0, 0, 3, 4, 0;
0, 0, 0, 4, 5, 0;
0, 0, 0, 0, 5, 6, 0;
0, 0, 0, 0, 0, 6, 7, 0;
0, 0, 0, 0, 0, 0, 7, 8, 0;
...
		

Crossrefs

Formula

Triangle read by rows, A129186 * A128064; where A129186 = a shift operator, shifting down triangle A128064(unsigned) one row and inserting a "1" at (1,1).

A174549 a(n) = (2*n-1)! + (2*n)!.

Original entry on oeis.org

3, 30, 840, 45360, 3991680, 518918400, 93405312000, 22230464256000, 6758061133824000, 2554547108585472000, 1175091669949317120000, 646300418472124416000000, 418802671169936621568000000, 315777214062132212662272000000, 274094621805930760590852096000000
Offset: 1

Views

Author

Paul Curtz, Mar 22 2010

Keywords

Comments

x*cos(x) - sin(x) = Sum_{n>=1} (-1)^n/a(n) * x^(2*n+1). - James R. Buddenhagen, Nov 21 2013
Also the number of adjacency matrices for the n-helm graph. - Eric W. Weisstein, May 25 2017

Crossrefs

Programs

Formula

a(n) = A001048(2n) = (1+2n)*(2n-1)! = 3*A165457(n-1).
Sum_{n>=1} 1/a(n) = A068985 = 1/e = lim_{n->infinity} A000255(n-1)/A001048(n).
zeta(2*n+1) = Integral_{u=0..Pi/2} (sin(u)*log(sin(u))^(2*n+1)/(cos(u)^3))*(-2)^(2*n+1)/(n*a(n)) du. Verified for n=1 to 4 on Wolfram Alpha. - Jean-Claude Babois, Oct 28 2014
Sum_{n>=1} (-1)^(n+1)/a(n) = sin(1)-cos(1) = (-1)*A143624. - Amiram Eldar, Apr 12 2021

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.

A189284 Number of permutations p of 1,2,...,n satisfying p(i+5)-p(i)<>5 for all 1<=i<=n-5.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 696, 4572, 34260, 290328, 2751480, 28686024, 328764732, 4106158164, 55495145304, 806797105320, 12554890849992, 208164423163908, 3663256621120548, 68188490015132040, 1338490745511631080, 27630826605742438968
Offset: 0

Views

Author

Vaclav Kotesovec, Apr 19 2011

Keywords

Comments

a(n) is also number of ways to place n nonattacking pieces rook + semi-leaper[5,5] on an n X n chessboard.

Crossrefs

Formula

Asymptotics (V. Kotesovec, Mar 2011): a(n)/n! ~ (1 + 9/n + 20/n^2)/e.

Extensions

Terms a(25)-a(26) from Vaclav Kotesovec, Apr 20 2012

A269954 Triangle read by rows, T(n,k) = Sum_{j=0..n} C(-j,-n)*S1(j,k), S1 the Stirling cycle numbers A132393, for n>=0 and 0<=k<=n.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Apr 12 2016

Keywords

Examples

			Triangle starts:
  1;
  0,   1;
  0,   0,   1;
  0,   1,   1,   1;
  0,   2,   5,   3,   1;
  0,   9,  20,  17,   6,   1;
  0,  44, 109, 100,  45,  10,  1;
  0, 265, 689, 694, 355, 100, 15, 1;
		

Crossrefs

A000255 (row sums), A000217 (diag. n,n-1), A133252 (diag. n,n-2).
Columns k=0..4 give A000007, A000166(n-1), A300490(n-1), A381067(n-1), A381068(n-1).

Programs

  • Maple
    A269954 := (n, k) -> add(binomial(-j, -n)*abs(Stirling1(j, k)), j=0..n):
    seq(seq(A269954(n, k), k=0..n), n=0..9);
  • Mathematica
    Flatten[Table[Sum[Binomial[-j,-n] Abs[StirlingS1[j,k]],{j,0,n}], {n,0,9},{k,0,n}]]
  • PARI
    T(n, k) = sum(j=0, n, (-1)^(n-j)*binomial(n-1, n-j)*abs(stirling(j, k)));
    for(n=0, 9, for(k=0, n, print1(T(n, k), ", "))); \\ Seiichi Manyama, Feb 13 2025
Previous Showing 71-80 of 119 results. Next