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-10 of 19 results. Next

A324564 Number T(n,k) of permutations p of [n] such that n-k is the maximum of 0 and the number of elements in any integer interval [p(i)..i+n*[i=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 4, 1, 1, 0, 15, 7, 1, 1, 0, 76, 31, 11, 1, 1, 0, 455, 185, 60, 18, 1, 1, 0, 3186, 1275, 435, 113, 29, 1, 1, 0, 25487, 10095, 3473, 1001, 215, 47, 1, 1, 0, 229384, 90109, 31315, 9289, 2299, 406, 76, 1, 1, 0, 2293839, 895169, 313227, 95747, 24610, 5320, 763, 123, 1, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Mar 06 2019

Keywords

Comments

Mirror image of A324563.

Examples

			Triangle T(n,k) begins:
      1;
      1,     0;
      1,     1,     0;
      4,     1,     1,     0;
     15,     7,     1,     1,      0;
     76,    31,    11,     1,      1,      0;
    455,   185,    60,    18,      1,      1,   0;
   3186,  1275,   435,   113,     29,      1,   1,  0;
  25487, 10095,  3473,  1001,    215,     47,   1,  1,  0;
  ...
Square array A(n,k) begins:
      1,     0,     0,     0,      0,      0, ...
      1,     1,     1,     1,      1,      1, ...
      1,     1,     1,     1,      1,      1, ...
      4,     7,    11,    18,     29,     47, ...
     15,    31,    60,   113,    215,    406, ...
     76,   185,   435,  1001,   2299,   5320, ...
    455,  1275,  3473,  9289,  24610,  65209, ...
   3186, 10095, 31315, 95747, 290203, 876865, ...
   ...
		

Crossrefs

Columns k=0-10 give: A002467 (for n>0), A324621, A324622, A324623, A324624, A324625, A324626, A324627, A324628, A324629, A324630.
Diagonals of the triangle (rows of the array) n=0, (1+2), 3-10 give: A000007, A000012, A000032 (for n>=3), A324631, A324632, A324633, A324634, A324635, A324636, A324637.
Row sums give A000142.
T(2n,n) or A(n,n) gives A324638.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k>n, 0, `if`(k=0, n!,
           LinearAlgebra[Permanent](Matrix(n, (i, j)->
          `if`(j>=i and k+jk+j, 1, 0)))))
        end:
    # as triangle:
    T:= (n, k)-> b(n, k)-b(n, k+1):
    seq(seq(T(n, k), k=0..n), n=0..10);
    # as array:
    A:= (n, k)-> b(n+k, k)-b(n+k, k+1):
    seq(seq(A(d-k, k), k=0..d), d=0..10);
  • Mathematica
    b[n_, k_] := b[n, k] = If[k > n, 0, If[k == 0, n!, Permanent[Table[If[j >= i && k+j < n+i || i > k+j, 1, 0], {i, n}, {j, n}]]]];
    (* as triangle: *)
    T[n_, k_] := b[n, k] - b[n, k+1];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten
    (* as array: *)
    A[n_, k_] := b[n+k, k] - b[n+k, k+1];
    Table[A[d-k, k], {d, 0, 10}, {k, 0, d}] // Flatten (* Jean-François Alcover, May 09 2019, after Alois P. Heinz *)

A324621 Number of permutations p of [1+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(1+n)*[i

Original entry on oeis.org

0, 1, 1, 7, 31, 185, 1275, 10095, 90109, 895169, 9793829, 116998199, 1515196619, 21143666585, 316260079951, 5047672782687, 85623656678457, 1538245254809537, 29176112648650441, 582614412521648359, 12217688610474042487, 268445509189890555577
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=1 of A324563 and column of A324564 (as array).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<5, [0, 1$2, 7, 31][n+1],
          ((2*n^4-3*n^3-2*n^2+n+4)*a(n-1) -(n^5-4*n^4+7*n^2+6*n-14)*
           a(n-2) -(n^5-2*n^4-4*n^3+2*n^2+13*n-12)*a(n-3)-(n-2)*
           (n^3+2*n^2+n-2)*a(n-4))/(n^3-n^2-2))
        end:
    seq(a(n), n=0..23);
  • Mathematica
    menage[n_] := If[n == 0, 1, 2n Sum[(-1)^k Binomial[2n-k, k] (n-k)!/(2n-k), {k, 0, n}]];
    a[n_] := If[n == 0, 0, Subfactorial[n+1] - menage[n+1]];
    a /@ Range[0, 21] (* Jean-François Alcover, Oct 28 2021 *)

Formula

a(n) = A000166(n+1) - A000179(n+1) for n < 0, a(0) = 0.

A324622 Number of permutations p of [2+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(2+n)*[i

Original entry on oeis.org

0, 1, 1, 11, 60, 435, 3473, 31315, 313227, 3445641, 41341502, 537313583, 7520316423, 112771887719, 1803821926465, 30656189582521, 551659191788556, 10478765887885181, 209522984620760153, 4398943767896801309, 96755196700729056267, 2224901906327124750355
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=2 of A324563 and column of A324564 (as array).

Formula

a(n) = A000179(n+2) - A000183(n+2).

A324623 Number of permutations p of [3+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(3+n)*[i

Original entry on oeis.org

0, 1, 1, 18, 113, 1001, 9289, 95747, 1075779, 13129188, 173006731, 2449243815, 37082963875, 598045522873, 10236223969309, 185344819109346, 3539853769700281, 71122126197951465, 1499666213536206971, 33113352117542113491, 764116379880803291501
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=3 of A324563 and column of A324564 (as array).

Formula

a(n) = A000183(n+3) - A004307(n+3).

A324631 Number of permutations p of [n] such that four is the maximum of the number of elements in any integer interval [p(i)..i+n*[i

Original entry on oeis.org

15, 31, 60, 113, 215, 406, 763, 1431, 2676, 4993, 9299, 17290, 32103, 59535, 110292, 204137, 377535, 697742, 1288763, 2379167, 4390148, 8097681, 14931075, 27522586, 50719103, 93444207, 172125100, 316999057, 583718215, 1074702870, 1978430491, 3641722423
Offset: 4

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Examples

			a(4) = 15: 1243, 1324, 1342, 2134, 2143, 2314, 2341, 2413, 2431, 3142, 3241, 3421, 4231, 4312, 4321.
a(5) = 31: 12534, 12543, 14235, 14325, 14523, 14532, 15342, 31245, 31524, 31542, 32145, 32514, 34125, 34215, 34512, 35124, 35142, 35214, 41523, 41532, 42315, 42513, 45132, 45213, 45312, 51342, 52314, 54123, 54132, 54213, 54312.
		

Crossrefs

Column k=4 of A324563.

Programs

  • Magma
    I:=[15,31,60,113,215]; [n le 5 select I[n] else 2*Self(n-1)+Self(n-2)-Self(n-3)-2*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Jun 06 2019
  • Maple
    a:= n-> `if`(n<4, 0, (<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>,
            <0|0|0|0|1>, <-1|-2|-1|1|2>>^n. <<4, 1, 3, 10, 15>>)[1$2]):
    seq(a(n), n=4..40);
  • Mathematica
    LinearRecurrence[{2, 1, -1, -2, -1}, {15, 31, 60, 113, 215}, 40] (* Vincenzo Librandi, Jun 06 2019 *)

Formula

G.f.: -x^4*(10*x^4+23*x^3+17*x^2-x-15)/((x^2+x-1)*(x^3+x^2+x-1)).

A324632 Number of permutations p of [n] such that five is the maximum of the number of elements in any integer interval [p(i)..i+n*[i

Original entry on oeis.org

76, 185, 435, 1001, 2299, 5320, 12277, 28337, 65469, 151401, 350368, 811513, 1881187, 4364213, 10131903, 23537656, 54713385, 127248885, 296086085, 689224889, 1604944676, 3738477553, 8710572523, 20300163281, 47319366179, 110319510400, 257234285829, 599872668089
Offset: 5

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Column k=5 of A324563.

Formula

G.f.: -x^5 *(41*x^12 +136*x^11 +167*x^10 +14*x^9 -397*x^8 -765*x^7 -807*x^6 -445*x^5 +128*x^4 +261*x^3 +196*x^2 +43*x -76) / ((x+1) *(x^3+x^2+x-1) *(x^4+x^3+x^2+x-1) *(x^5-2*x^3-2*x+1)).

A324624 Number of permutations p of [4+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(4+n)*[i

Original entry on oeis.org

0, 1, 1, 29, 215, 2299, 24610, 290203, 3664639, 49665695, 719356045, 11100719773, 181925519591, 3157018912485, 57848571473665, 1116400995778789, 22637359008083824, 481232567245746693, 10703530470036896333, 248615220921060645505, 6020095122314424497575
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=4 of A324563 and column of A324564 (as array).

Formula

a(n) = A004307(n+4) - A189389(n+4).

A324625 Number of permutations p of [5+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(5+n)*[i

Original entry on oeis.org

0, 1, 1, 47, 406, 5320, 65209, 876865, 12428079, 187013213, 2977639454, 50100075551, 889030153223, 16605705694513, 325842147818131, 6704025812865230, 144359437306938642, 3247712172059705741, 76210676599647821811, 1862449116865631232577
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=5 of A324563 column of A324564 (as array).

Formula

a(n) = A189389(n+5) - A184965(n+5).

A324626 Number of permutations p of [6+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(6+n)*[i

Original entry on oeis.org

0, 1, 1, 76, 763, 12277, 173111, 2653275, 42093128, 702648806, 12292640257, 225478889531, 4332332279039, 87108358452379, 1830631685045257, 40159929532511862, 918479788074790715, 21870877993310401595
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=6 of A324563 and column of A324564 (as array).

A324627 Number of permutations p of [7+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(7+n)*[i

Original entry on oeis.org

0, 1, 1, 123, 1431, 28337, 457965, 8041166, 142688017, 2639058561, 50689730519, 1013206417391, 21074302033903, 456084254291809, 10265228833915967, 240124807728408475, 5833187694753202363
Offset: 0

Views

Author

Alois P. Heinz, Mar 09 2019

Keywords

Crossrefs

Row n=7 of A324563 and column of A324564 (as array).
Showing 1-10 of 19 results. Next