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 51-60 of 84 results. Next

A334776 Total number of peaks in all permutations of 2 indistinguishable copies of 1..n.

Original entry on oeis.org

0, 3, 105, 4620, 283500, 23700600, 2610808200, 367783416000, 64607286744000, 13859305059600000, 3567385122341040000, 1085582734152396480000, 385634331725066424000000, 158175715893528308976000000, 74203019661816956710800000000, 39481403043334753112451840000000
Offset: 1

Views

Author

Andrew Howroyd, May 12 2020

Keywords

Crossrefs

Programs

  • PARI
    \\ PeaksBySig defined in A334774.
    a(n)={my(u=PeaksBySig(vector(n,i,2), [0..n-1])); sum(k=1, #u, (k-1)*u[k])}

Formula

a(n) = Sum_{k=1..n} (k-1)*A334774(n,k).
a(n) = A334777(n) - A000680(n).

A334777 Total number of local maxima in all permutations of 2 indistinguishable copies of 1..n.

Original entry on oeis.org

1, 9, 195, 7140, 396900, 31185000, 3291888600, 449513064000, 77111922888000, 16235185926960000, 4116213602701200000, 1237059394731800640000, 434864246413372776000000, 176784623645708110032000000, 82297894534015170170160000000, 43496460979945066988294400000000
Offset: 1

Views

Author

Andrew Howroyd, May 12 2020

Keywords

Crossrefs

Programs

  • PARI
    \\ PeaksBySig defined in A334774.
    a(n)={my(u=PeaksBySig(vector(n,i,2), [0..n-1])); sum(k=1, #u, k*u[k])}

Formula

a(n) = Sum_{k=1..n} k*A334774(n,k).
a(n) = A334776(n) + A000680(n).

A361651 Number T(n,k) of permutations p of [n] such that p(i), p(i+k), p(i+2k),... form an up-down sequence for i in [k]; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 2, 3, 6, 0, 5, 6, 12, 24, 0, 16, 20, 30, 60, 120, 0, 61, 80, 90, 180, 360, 720, 0, 272, 350, 420, 630, 1260, 2520, 5040, 0, 1385, 1750, 2240, 2520, 5040, 10080, 20160, 40320, 0, 7936, 10080, 13440, 15120, 22680, 45360, 90720, 181440, 362880
Offset: 0

Views

Author

Alois P. Heinz, Mar 19 2023

Keywords

Comments

Number T(n,k) of permutations p of [n] such that p(i) < p(i+k) > p(i+2k) < ... for i <= k.
T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k<=n. T(n,k) = n! for k>=n.

Examples

			Triangle T(n,k) begins:
  1;
  0,    1;
  0,    1,    2;
  0,    2,    3,    6;
  0,    5,    6,   12,   24;
  0,   16,   20,   30,   60,  120;
  0,   61,   80,   90,  180,  360,   720;
  0,  272,  350,  420,  630, 1260,  2520,  5040;
  0, 1385, 1750, 2240, 2520, 5040, 10080, 20160, 40320;
  ...
		

Crossrefs

Columns k=0-3 give: A000007, A000111, A361648, A367336.
Main diagonal gives A000142.
T(2n,n) gives A000680.

Programs

  • Maple
    b:= proc(u, o) option remember; `if`(u+o=0, 1,
          add(b(o-1+j, u-j), j=1..u))
        end:
    T:= (n, k)-> `if`(n=0, 1, `if`(k=0, 0, (l-> mul(b(s, 0), s=l)*
        combinat[multinomial](n, l[]))([floor((n+i)/k)$i=0..k-1]))):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[u_, o_] := b[u, o] = If[u+o == 0, 1, Sum[b[o-1+j, u-j], {j, 1, u}]];
    T[n_, k_] := If[n == 0, 1, If[k == 0, 0, Function[l, Product[b[s, 0], {s, l}]*multinomial[n, l]][Table[Floor[(n+i)/k], {i, 0, k-1}]]]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Nov 22 2023, after Alois P. Heinz *)

A089975 Array read by ascending antidiagonals: T(n,k) is the number of n-letter words from a k-letter alphabet such that no letter appears more than twice.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 0, 4, 3, 1, 0, 0, 6, 9, 4, 1, 0, 0, 6, 24, 16, 5, 1, 0, 0, 0, 54, 60, 25, 6, 1, 0, 0, 0, 90, 204, 120, 36, 7, 1, 0, 0, 0, 90, 600, 540, 210, 49, 8, 1, 0, 0, 0, 0, 1440, 2220, 1170, 336, 64, 9, 1, 0, 0, 0, 0, 2520, 8100, 6120, 2226, 504, 81, 10, 1
Offset: 0

Views

Author

Paul Boddington, Nov 17 2003

Keywords

Examples

			Array begins:
  1, 1, 1,  1,    1,     1,      1,      1,       1,       1,       1, ...
  0, 1, 2,  3,    4,     5,      6,      7,       8,       9,      10, ...
  0, 1, 4,  9,   16,    25,     36,     49,      64,      81,     100, ...
  0, 0, 6, 24,   60,   120,    210,    336,     504,     720,     990, ...
  0, 0, 6, 54,  204,   540,   1170,   2226,    3864,    6264,    9630, ...
  0, 0, 0, 90,  600,  2220,   6120,  14070,   28560,   52920,   91440, ...
  0, 0, 0, 90, 1440,  8100,  29520,  83790,  201600,  430920,  842400, ...
  0, 0, 0,  0, 2520, 25200, 128520, 463680, 1345680, 3356640, 7484400, ...
  ... - _Robert FERREOL_, Nov 03 2017
		

Crossrefs

T(1, k) = A001477(k); T(2, k) = A000290(k); T(3, k) = A007531(k); T(n, n) = A012244(n); T(n, n+1) = A036774(n); T(n, n+2) = A003692(n+1); T(2*n, n) = A000680(n); sum(T(n, k), n=0..2*k) = A003011(k); sum(T(r, n-r), r=0..n) = A089976(n).
See A141765 for an irregular triangle version : T(n,k)=A141765(k,n) for n <= 2k.

Programs

  • Maple
    T:=(n,k)->add(n!*k!/(n-2*i)!/i!/(k-n+i)!/2^i,i=max(0,n-k)..n/2):
    or
    T:=proc(n,k) option remember :if n=0 then 1 elif n=1 then k elif k=0 then 0 else T(n, k-1)+n*T(n-1, k-1)+binomial(n,2)*T(n-2, k-1) fi end:
    or
    T:=(n,k)-> n!*coeff((1 + x + x^2/2)^k, x,n):
    seq(seq(T(n-k,k),k=0..n),n=0..20);
    # Robert FERREOL, Nov 07 2017
  • Mathematica
    T[n_, k_] := Sum[n!*k!/(2^i*(n - 2 i)!*(k - n + i)!*i!), {i, Max[0, n - k], Floor[n/2]}];
    Table[T[n-k , k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 05 2017, after Robert FERREOL *)
  • Python
    from math import factorial as f
    def T(n,k):
        return sum(f(n)*f(k)//f(n-2*i)//f(i)//f(k-n+i)//2**i for i in range(max(0,n-k),n//2+1))
    [T(n-k,k) for n in range(21) for k in range(n+1)]
    # Robert FERREOL, Oct 17 2017

Formula

T(n, k) = T(n, k-1) + n*T(n-1, k-1) + binomial(n, 2)*T(n-2, k-1) for n >= 2 and k >= 1.
T(n, k) = Sum_{i=max(0,n-k)..floor(n/2)} n!*k!/(2^i*(n-2*i)!*(k-n+i)!*i!). - Robert FERREOL, Oct 30 2017
T(n,k) = (-1)^n*n!*2^(-n/2)*GegenbauerC(n, -k, 1/sqrt(2)) for k >= n. - Robert Israel, Nov 08 2017
G.f.: Sum({n>=0} T(n,k)x^n)=n!(1 + x + x^2/2)^k. See Walsh link. - Robert FERREOL, Nov 14 2017

A117414 An Euler triangle.

Original entry on oeis.org

1, 0, 1, 0, 4, 1, 0, 48, 12, 1, 0, 1088, 272, 24, 1, 0, 39680, 9920, 880, 40, 1, 0, 2122752, 530688, 47104, 2160, 60, 1, 0, 156577792, 39144448, 3474688, 159488, 4480, 84, 1, 0, 15230058496, 3807514624, 337979392, 15514880, 436352, 8288, 112, 1
Offset: 0

Views

Author

Paul Barry, Mar 13 2006

Keywords

Comments

Conjecture: row sums are the Euler numbers A000364. Second column is A024255. Third column is A117415.
Here, w = w_1,w_2,...,w_(2n) is an alternating permutation if w_1 < w_2 > w_3 < ... > w_(2n-1) < w_2n. An alternating permutation is cyclically alternating if w_1 < w_(2n). Define the cyclically alternating decomposition of w in the following manner: From the set {w_2,w_4,w_6,...,w_(2n)} find the largest i such that w_(2i) > w_1. Then w_1,w_2,...,w_(2i) is the first component in the cyclically alternating decomposition of w. Repeat the process with the set {w_(2i+1),w_(2i+2),...,w_(2n)} to find the successive components. Conjecture: T(n,k) is the number of alternating permutations of [2n] with exactly k cyclically alternating components. - Geoffrey Critzer, Apr 26 2023

Examples

			Triangle begins:
  1;
  0,       1;
  0,       4,      1;
  0,      48,     12,     1;
  0,    1088,    272,    24,    1;
  0,   39680,   9920,   880,   40,  1;
  0, 2122752, 530688, 47104, 2160, 60, 1;
  ...
		

Crossrefs

Programs

  • Mathematica
    nn = 6; B[n_] := (2 n)!/2^n; e[z_] := Sum[z^n/B[n], {n, 0, nn}];
    Map[Select[#, # > 0 &] &,Table[B[n], {n, 0, nn}] CoefficientList[
    Series[e[(u - 1) z] 1/e[-z], {z, 0, nn}], {z, u}]] // Grid (* Geoffrey Critzer, Apr 26 2023 *)

Formula

From Geoffrey Critzer, Apr 26 2023: (Start)
Sum_{n>=0} Sum_{k=0..n} T(n,k)*u^k*z^n/A000680(n) = E((u-1)*z)/E(-z) Where E(z) = Sum_{n>=0} z^n/A000680(n).
Sum_{k=0..n} T(n,k)*k = A086646(n,1). (End)

A133401 Diagonal of polygorial array T(n,k) = n-th polygorial for k = n, for n > 2.

Original entry on oeis.org

18, 576, 46200, 7484400, 2137544640, 981562982400, 678245967907200, 670873729125600000, 913601739437346960000, 1660189302321994373529600, 3923769742187622047360640000, 11805614186177306251101945600000, 44403795869109177300313209696000000
Offset: 3

Views

Author

Jonathan Vos Post, Nov 25 2007

Keywords

Comments

Array T(n,k) = k-th polygorial(n,k) begins:
k | polygorial(n,k)
3 | 1 1 3 18 180 2700 56700 1587600 57153600
4 | 1 1 4 36 576 14400 518400 25401600 1625702400
5 | 1 1 5 60 1320 46200 2356200 164934000 15173928000
6 | 1 1 6 90 2520 113400 7484400 681080400 81729648000
7 | 1 1 7 126 4284 235620 19085220 2137544640 316356606720
8 | 1 1 8 168 6720 436800 41932800 5577062400 981562982400
9 | 1 1 9 216 9936 745200 82717200 12738448800 2598643555200
10 | 1 1 10 270 14040 1193400 150368400 26314470000 6104957040000

Examples

			a(3) = polygorial(3,3) = A006472(3) = product of the first 3 triangular numbers = 1*3*6 = 18.
a(4) = polygorial(4,4) = A001044(4) = product of the first 4 squares = 1*4*9*16 = 576.
a(5) = polygorial(5,5) = A084939(5) = product of the first 5 pentagonal numbers = 1*5*12*22*35 = 46200.
		

Crossrefs

Programs

  • Maple
    A133401 := proc(n) return mul((n/2-1)*m^2-(n/2-2)*m,m=1..n): end: seq(A133401(n),n=3..15); # Nathaniel Johnston, May 05 2011
  • Mathematica
    Table[Product[m*(4 - n + m*(n-2))/2, {m, 1, n}],{n, 3, 20}] (* Vaclav Kotesovec, Feb 20 2015 *)
    Table[FullSimplify[(n-2)^n * Gamma[n+1] * Gamma[n+2/(n-2)] / (2^n*Gamma[2/(n-2)])],{n,3,15}] (* Vaclav Kotesovec, Feb 20 2015 *)
    polygorial[k_, n_] := FullSimplify[ n!/2^n (k -2)^n*Pochhammer[2/(k - 2), n]]; Array[ polygorial[#, #] &, 13, 3] (* Robert G. Wilson v, Dec 13 2016 *)

Formula

a(n) ~ Pi * n^(3*n-1) / (2^(n-2) * exp(2*n+2)). - Vaclav Kotesovec, Feb 20 2015

Extensions

Edited by Nathaniel Johnston, May 05 2011

A157018 Triangle T(n,k) read by rows: number of k-lists (ordered k-sets) of disjoint 2-subsets of an n-set, n>1, 0

Original entry on oeis.org

1, 3, 6, 6, 10, 30, 15, 90, 90, 21, 210, 630, 28, 420, 2520, 2520, 36, 756, 7560, 22680, 45, 1260, 18900, 113400, 113400, 55, 1980, 41580, 415800, 1247400, 66, 2970, 83160, 1247400, 7484400, 7484400, 78, 4290, 154440, 3243240, 32432400, 97297200
Offset: 2

Views

Author

Allan L. Edmonds and Vladeta Jovovic, Feb 21 2009

Keywords

Comments

T(n,k) is also the number of involutions (unary operators) on S_n, i.e., endomorphisms U with 2k non-invariant elements such that U^2 is the identity mapping. The extension to n=1 is a(1)=0. - Stanislav Sykora, Nov 03 2016

Examples

			For n = 4 we have 12 lists: 6 1-lists: [{1,2}], [{1,3}], [{1,4}], [{2,3}], [{2,4}], [{3,4}] and 6 2-lists: [{1,2},{3,4}], [{3,4},{1,2}], [{1,3},{2,4}], [{2,4},{1,3}], [{1,4},{2,3}] and [{2,3},{1,4}].
		

Crossrefs

Programs

  • Mathematica
    Table[n!/(2^k (n - 2 k)!), {n, 2, 13}, {k, Floor[n/2]}] // Flatten (* Michael De Vlieger, Nov 04 2016 *)
  • PARI
    nmax=100;a=vector(floor(nmax^2/4));idx=0;
    for(n=2,nmax,for(k=1,n\2,a[idx++]=n!/(2^k*(n-2*k)!)));
    a \\ Stanislav Sykora, Nov 03 2016

Formula

E.g.f.: y*x^2*exp(x)/(2-y*x^2).
T(n,k) = Product_{m=1..floor(n/2)} binomial(n-2*m,2) = n!/(2^k*(n-2*k)!).

A177284 Number of permutations of 2 copies of 1..n with all adjacent differences <= 3 in absolute value.

Original entry on oeis.org

1, 1, 6, 90, 2520, 41580, 516180, 6068622, 76331906, 958679970, 11679900408, 138047313960, 1610654864328, 18649754961744, 214256589488616, 2439692058769566, 27562317214408488, 309367132582535226, 3453299423388485028, 38354816922190327314, 424048220090513056908
Offset: 0

Views

Author

R. H. Hardin, May 06 2010

Keywords

Crossrefs

Formula

a(n) = (2n)!/2^n for n<=4.

Extensions

a(0), a(13) from Alois P. Heinz, Jan 14 2016
Terms a(14) and beyond from Andrew Howroyd, May 14 2020

A210280 (7n)!/7^n.

Original entry on oeis.org

1, 720, 1779148800, 148953184174080000, 126983900296423931904000000, 614812159599342234168301977600000000, 11942354952042770431904585727413846016000000000
Offset: 0

Views

Author

Mohammad K. Azarian, Apr 12 2012

Keywords

Crossrefs

Programs

Formula

E.g.f.: 1/(1-x^7/7).

A357297 T(m,n) is the number of linear extensions of n fork-join DAGs of width m, read by downward antidiagonals.

Original entry on oeis.org

1, 1, 1, 6, 1, 1, 90, 20, 2, 1, 2520, 1680, 280, 6, 1, 113400, 369600, 277200, 9072, 24, 1, 7484400, 168168000, 1009008000, 163459296, 532224, 120, 1, 681080400, 137225088000, 9777287520000, 15205637551104, 237124952064, 49420800, 720, 1, 81729648000, 182509367040000, 207786914375040000, 4847253138540933120, 765985681152147456, 689598074880000, 6671808000, 5040, 1
Offset: 0

Views

Author

José E. Solsona, Feb 22 2023

Keywords

Comments

The fork-join structure is a modeling structure, commonly seen for example in parallel computing, usually represented as a DAG (or poset). It has an initial "fork" vertex that spawns a number of m independent children vertices (the width) whose output edges are connected to a final "join" vertex. More generally, we can have a number n of these DAGs, each one with m+2 vertices.
The family of fork-join DAGs we are considering here can be depicted as follows (we omit the first column for n=0 because the graph is empty in this case):
m\n| 1 | 2 | 3
---------------------------------------------------
0 | o | o o | o o o
| | | | | | | | |
| o | o o | o o o
---------------------------------------------------
| o | o o | o o o
| | | | | | | | |
1 | o | o o | o o o
| | | | | | | | |
| o | o o | o o o
---------------------------------------------------
| o | o o | o o o
| / \ | / \ / \ | / \ / \ / \
2 | o o | o o o o | o o o o o o
| \ / | \ / \ / | \ / \ / \ /
| o | o o | o o o
---------------------------------------------------
| o | o o | o o o
| /|\ | /|\ /|\ | /|\ /|\ /|\
3 | o o o | o o o o o o | o o o o o o o o o
| \|/ | \|/ \|/ | \|/ \|/ \|/
| o | o o | o o o
The array begins like this:
m\n|0 1 2 3 4
-----------------------------------------------------------
0 |1 1 6 90 2520 ... A000680
1 |1 1 20 1680 369600 ... A014606
2 |1 2 280 277200 1009008000 ... A260331
3 |1 6 9072 163459296 15205637551104 ... A361901
4 |1 24 532224 237124952064 765985681152147456 ... A362565
5 |1 120 49420800 689598074880000 97981404549709824000000 ...
with columns: A000012 (n=0) and A000142 (n=1).

Examples

			T(3,1) = 6 is the number of linear extensions of one fork-join DAG of width 3. Let the DAG be labeled as follows:
     1
   / | \
  2  3  4
   \ | /
     5
Then the six linear extensions are:
  1 2 3 4 5
  1 2 4 3 5
  1 3 2 4 5
  1 3 4 1 5
  1 4 2 3 5
  1 4 3 2 5
		

Crossrefs

Rows m = 0..4 give A000680, A014606, A260331, A361901, A362565.
Columns n = 0..1 give A000012, A000142.

Programs

  • Mathematica
    (* Formula *)
    T[m_, n_] := (n*(m+2))!/((m+1)^n*(m+2)^n)
    (* 5 X 5 Table *)
    Table[T[m, n], {m, 0, 5}, {n, 0, 5}]
    (* Eight rows of the triangle *)
    Table[Table[T[m, n - m], {m, 0, n}], {n, 0, 8}]
    (* As a sequence *)
    Flatten[Table[Table[T[m, n - m], {m, 0, n}], {n, 0, 8}]]

Formula

T(m,n) = (n*(m+2))!/((m+1)^n*(m+2)^n).
Previous Showing 51-60 of 84 results. Next