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.

A129535 Number of permutations of 1,...,n with at least one pair of adjacent consecutive entries (i.e., of the form k(k+1) or (k+1)k), n >= 2.

Original entry on oeis.org

2, 6, 22, 106, 630, 4394, 35078, 315258, 3149494, 34620010, 415222566, 5395737242, 75516784982, 1132471183626, 18115911832390, 307919970965434, 5541804787940598, 105282261866132138, 2105441434230129254, 44210612765653749210, 972564180363044943766
Offset: 2

Views

Author

Emeric Deutsch, May 05 2007

Keywords

Comments

Column 1 of A129534. a(n) = n! - A002464(n).
Column k=2 of A322481.

Examples

			a(4)=22 because 3142 and 2413 are the only permutations of 1,2,3,4 with no adjacent consecutive entries.
		

References

  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.40.

Crossrefs

Programs

  • Maple
    E:=x->sum(n!*x^n,n=0..35): G:=E(x)-E(x*(1-x)/(1+x)): Gser:=series(G,x=0,30): seq(coeff(Gser,x,n),n=2..23);

Formula

G.f.: E(x) - E(x(1-x)/(1+x)), where E(x) = Sum_{n>=0} n!*x^n.
a(n) = n! - Sum_{k=1..n} ((-1)^(n-k)*k!*Sum_{i=0..n-k} binomial(i+k-1, k-1)*binomial(k, n-i-k)), n > 0. - Vladimir Kruchinin, Sep 08 2010
D-finite with recurrence a(n) +2*(-n+1)*a(n-1) +(n^2-2*n-2)*a(n-2) +(-n^2+7*n-14)*a(n-3) -(n-3)*(n-5)*a(n-4) +(n-3)*(n-4)*a(n-5)=0. - R. J. Mathar, Jul 26 2022

A064482 Triangle read by rows: T(n,k) (n >= 2, 1<=k<=n-1) is the number of permutations p of 1,...,n with max(|p(i)-p(i-1)|, i=2..n) = k.

Original entry on oeis.org

2, 2, 4, 2, 10, 12, 2, 18, 52, 48, 2, 32, 146, 300, 240, 2, 54, 372, 1204, 1968, 1440, 2, 86, 954, 4082, 10476, 14640, 10080, 2, 134, 2376, 13348, 46012, 97968, 122400, 80640, 2, 206, 5704, 44274, 186202, 536652, 990960, 1139040, 725760, 2, 312, 13278, 145216, 742940, 2655004, 6562128, 10847520, 11692800, 7257600
Offset: 2

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 05 2001

Keywords

Comments

T(n,n-1) = A052849; sum(T(n,k),k=1..n-1) = A000142.

Examples

			Triangle T(n,k) begins:
  2;
  2,   4;
  2,  10,   12;
  2,  18,   52,    48;
  2,  32,  146,   300,   240;
  2,  54,  372,  1204,  1968,  1440;
  2,  86,  954,  4082, 10476, 14640,  10080;
  2, 134, 2376, 13348, 46012, 97968, 122400, 80640;
		

Crossrefs

Extensions

More terms from Naohiro Nomoto, Dec 04 2001
More terms from R. J. Mathar, Oct 11 2007

A322255 Triangle T(n,k) giving the number of permutations of 1..n with no adjacent elements within k in value, for n >= 2, 1 <= k <= floor(n/2).

Original entry on oeis.org

2, 6, 24, 2, 120, 14, 720, 90, 2, 5040, 646, 32, 40320, 5242, 368, 2, 362880, 47622, 3984, 72, 3628800, 479306, 44304, 1496, 2, 39916800, 5296790, 521606, 25384, 160, 479001600, 63779034, 6564318, 399848, 6056, 2, 6227020800, 831283558, 88422296, 6231544, 161136, 352
Offset: 2

Views

Author

Seiichi Manyama, Dec 01 2018

Keywords

Examples

			Irregular triangle starts:
n\k|       1       2      3     4  5
---+---------------------------------
2  |       2;
3  |       6;
4  |      24,      2;
5  |     120,     14;
6  |     720,     90,     2;
7  |    5040,    646,    32;
8  |   40320,   5242,   368,    2;
9  |  362880,  47622,  3984,   72;
10 | 3628800, 479306, 44304, 1496, 2;
		

Crossrefs

Formula

T(n,k) = Sum_{j=k..floor(n/2)} A129534(n,j). - Alois P. Heinz, May 20 2023
Showing 1-3 of 3 results.