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-8 of 8 results.

A334778 Triangle read by rows: T(n,k) is the number of permutations of 2 indistinguishable copies of 1..n arranged in a circle with exactly k local maxima.

Original entry on oeis.org

1, 0, 1, 0, 4, 2, 0, 18, 66, 6, 0, 72, 1168, 1192, 88, 0, 270, 16220, 61830, 33600, 1480, 0, 972, 202416, 2150688, 3821760, 1268292, 40272, 0, 3402, 2395540, 62178928, 272509552, 279561086, 62954948, 1476944, 0, 11664, 27517568, 1629254640, 15313310208, 36381368048, 24342647424, 3963672720, 71865728
Offset: 0

Views

Author

Andrew Howroyd, May 13 2020

Keywords

Comments

T(n,k) is divisible by n for n > 0.

Examples

			Triangle begins:
   1;
   0,    1;
   0,    4,       2;
   0,   18,      66,        6;
   0,   72,    1168,     1192,        88;
   0,  270,   16220,    61830,     33600,      1480;
   0,  972,  202416,  2150688,   3821760,   1268292,    40272;
   0, 3402, 2395540, 62178928, 272509552, 279561086, 62954948, 1476944;
  ...
The T(2,1) = 4 permutations of 1122 with 1 local maximum are 1122, 1221, 2112, 2211.
The T(2,2) = 2 permutations of 1122 with 2 local maxima are 1212, 2121.
		

Crossrefs

Columns k=0..6 are A000007, A027261(n-1), A159716, A159717, A159718, A159719, A159720.
Row sums are A000680.
Main diagonal is A334779.
The version for permutations of 1..n is A263789.

Programs

  • PARI
    CircPeaksBySig(sig, D)={
      my(F(lev,p,q) = my(key=[lev,p,q], z); if(!mapisdefined(FC, key, &z),
        my(m=sig[lev]); z = if(lev==1, if(p==0, binomial(m-1, q), 0), sum(i=0, p, sum(j=0, min(m-i, q), self()(lev-1, p-i, q-j+i) * binomial(m+2*(q-j)+1, 2*q+i-j+1) * binomial(q-j+i, i) * binomial(q+1, j) )));
        mapput(FC, key, z)); z);
      local(FC=Map());
      vector(#D, i, my(k=D[i], lev=#sig); if(lev==1, k==1, my(m=sig[lev]); lev*sum(j=1, min(m,k), m*binomial(m-1,j-1)*F(lev-1,k-j,j-1)/j)));
    }
    Row(n)={ if(n==0, [1], CircPeaksBySig(vector(n,i,2), [0..n])) }
    { for(n=0, 8, print(Row(n))) }

Formula

T(n,k) = n*(2*F(2,n-1,k-1,0) + F(2,n-1,k-2,1)) for n > 1 where F(m,n,p,q) = Sum_{i=0..p} Sum_{j=0..min(m-i, q)} F(m, n-1, p-i, q-j+i) * binomial(m+2*(q-j)+1, 2*q+i-j+1) * binomial(q-j+i, i) * binomial(q+1, j) for n > 1 with F(m,1,0,q) = binomial(m-1, q), F(m,1,p,q) = 0 for p > 0.
A334780(n) = Sum_{k=1..n} k*T(n,k).

A151576 Number of permutations of 1..n arranged in a circle with exactly 3 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 4, 55, 396, 2114, 9528, 38637, 146080, 526240, 1831644, 6217523, 20716164, 68059710, 221195824, 712856665, 2282058360, 7266358556, 23035517940, 72760054815, 229112753980, 719545590010, 2254604460264, 7050252659525, 22006821057936, 68581455012504, 213411502891468
Offset: 3

Views

Author

R. H. Hardin, May 21 2009

Keywords

Comments

Exactly 2 adjacent element pairs in decreasing order gives A027540(n-1).

Crossrefs

Column k=3 of A334218.
Related sequences: A151577-A151610.
Cf. A000460.

Programs

  • PARI
    a(n)={n*(3^(n-1) - n*2^(n-1) + n*(n-1)/2)} \\ Andrew Howroyd, May 05 2020

Formula

From Andrew Howroyd, May 05 2020: (Start)
a(n) = n*A000460(n-1).
a(n) = n*(3^(n-1) - n*2^(n-1) + n*(n-1)/2).
a(n) = 16*a(n-1) - 111*a(n-2) + 438*a(n-3) - 1083*a(n-4) + 1740*a(n-5) - 1817*a(n-6) + 1190*a(n-7) - 444*a(n-8) + 72*a(n-9).
G.f.: x^4*(4 - 9*x - 40*x^2 + 131*x^3 - 98*x^4)/((1 - x)^4*(1 - 2*x)^3*(1 - 3*x)^2).
(End)

Extensions

Terms a(18) and beyond from Andrew Howroyd, May 05 2020

A151577 Number of permutations of 1..n arranged in a circle with exactly 4 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 5, 156, 2114, 19328, 140571, 882340, 5007112, 26441856, 132439905, 637468300, 2976161790, 13569454592, 60725449335, 267757190100, 1166662948900, 5034645823680, 21556696454685, 91704869986620, 388044105102650, 1634678955350400, 6860481786528275, 28700914012807556
Offset: 4

Views

Author

R. H. Hardin, May 21 2009

Keywords

Crossrefs

Column k=4 of A334218.
Cf. A000498.

Programs

  • PARI
    a(n) = {n*(4^(n-1) - n*3^(n-1) + binomial(n,2)*2^(n-1) - binomial(n,3))} \\ Andrew Howroyd, May 05 2020

Formula

From Andrew Howroyd, May 05 2020: (Start)
a(n) = n*A000498(n-1).
a(n) = n*(4^(n-1) - n*3^(n-1) + binomial(n,2)*2^(n-1) - binomial(n,3)). (End)

Extensions

Terms a(17) and beyond from Andrew Howroyd, May 05 2020

A151578 Number of permutations of 1..n arranged in a circle with exactly 5 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 6, 399, 9528, 140571, 1561900, 14413894, 116857368, 862140162, 5925941490, 38576132625, 240659672336, 1451515055333, 8520359419080, 48925419854400, 275923203690000, 1533178869210324, 8414851432723230, 45712442315346915, 246193095207323400, 1316311515774609375
Offset: 5

Views

Author

R. H. Hardin, May 21 2009

Keywords

Crossrefs

Column k=5 of A334218.
Cf. A000505.

Programs

  • PARI
    a(n) = {n*(5^(n-1) - n*4^(n-1) + binomial(n,2)*3^(n-1) - binomial(n,3)*2^(n-1) + binomial(n,4))} \\ Andrew Howroyd, May 05 2020

Formula

From Andrew Howroyd, May 05 2020: (Start)
a(n) = n*A000505(n-1).
a(n) = n*(5^(n-1) - n*4^(n-1) + binomial(n,2)*3^(n-1) - binomial(n,3)*2^(n-1) + binomial(n,4)). (End)

Extensions

Terms a(17) and beyond from Andrew Howroyd, May 05 2020

A151579 Number of permutations of 1..n arranged in a circle with exactly 6 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 7, 960, 38637, 882340, 14413894, 188690976, 2112659718, 21078701112, 192648942945, 1644431982848, 13295963811083, 102911255502876, 768689550213368, 5575887557096640, 39473882067826332, 273820542615005232, 1867156445048432043, 12548621876834960064
Offset: 6

Views

Author

R. H. Hardin, May 21 2009

Keywords

Crossrefs

Column k=6 of A334218.
Cf. A000514.

Programs

  • PARI
    a(n) = {n*(6^(n-1) - n*5^(n-1) + binomial(n,2)*4^(n-1) - binomial(n,3)*3^(n-1) + binomial(n,4)*2^(n-1) - binomial(n,5))} \\ Andrew Howroyd, May 05 2020

Formula

From Andrew Howroyd, May 05 2020: (Start)
a(n) = n*A000514(n-1).
a(n) = n*(6^(n-1) - n*5^(n-1) + binomial(n,2)*4^(n-1) - binomial(n,3)*3^(n-1) + binomial(n,4)*2^(n-1) - binomial(n,5)). (End)

Extensions

Terms a(17) and beyond from Andrew Howroyd, May 05 2020

A151580 Number of permutations of 1..n arranged in a circle with exactly 7 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 8, 2223, 146080, 5007112, 116857368, 2112659718, 31852408056, 419567641380, 4982201574576, 54527214028669, 559001753070984, 5433944411838700, 50558500037520720, 453570522365097900, 3946487691743226960, 33461385366044612088, 277535329177185004536
Offset: 7

Views

Author

R. H. Hardin, May 21 2009

Keywords

Crossrefs

Column k=7 of A334218.
Cf. A001243.

Formula

a(n) = n*A001243(n-1). - Andrew Howroyd, May 05 2020

Extensions

Terms a(16) and beyond from Andrew Howroyd, May 05 2020

A151581 Number of permutations of 1..n arranged in a circle with exactly 8 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 9, 5020, 526240, 26441856, 862140162, 21078701112, 419567641380, 7160621079552, 108507581733075, 1496470017336660, 19127489390389332, 229712892700188480, 2619711824193741060, 28608047711740408560, 301155410573256748920, 3072652643940279427584
Offset: 8

Views

Author

R. H. Hardin, May 21 2009

Keywords

Crossrefs

Column k=8 of A334218.
Cf. A001244.

Formula

a(n) = n*A001244(n-1). - Andrew Howroyd, May 05 2020

Extensions

Terms a(17) and beyond from Andrew Howroyd, May 05 2020

A151582 Number of permutations of 1..n arranged in a circle with exactly 9 adjacent element pairs in decreasing order.

Original entry on oeis.org

0, 10, 11143, 1831644, 132439905, 5925941490, 192648942945, 4982201574576, 108507581733075, 2068026851853900, 35442327497832350, 557245611341867160, 8160353475203019510, 112618455705219419340, 1478355077007310516350, 18597419323476152223600
Offset: 9

Views

Author

R. H. Hardin, May 21 2009

Keywords

Crossrefs

Column k=9 of A334218.

Extensions

Terms a(17) and beyond from Andrew Howroyd, May 05 2020
Showing 1-8 of 8 results.