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.

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

Original entry on oeis.org

1, 3, 3, 9, 57, 24, 27, 705, 1449, 339, 81, 7617, 48615, 49695, 7392, 243, 78357, 1290234, 3650706, 2234643, 230217, 729, 791589, 30630618, 197457468, 314306943, 128203119, 9689934, 2187, 7944321, 686779323, 9080961729, 30829608729, 31435152267, 9159564513, 529634931
Offset: 1

Views

Author

Andrew Howroyd, May 11 2020

Keywords

Comments

Also the number of permutations of 2 indistinguishable copies of 1..n with exactly k-1 peaks. A peak is an interior maximum.

Examples

			Triangle begins:
    1;
    3,      3;
    9,     57,       24;
   27,    705,     1449,       339;
   81,   7617,    48615,     49695,      7392;
  243,  78357,  1290234,   3650706,   2234643,    230217;
  729, 791589, 30630618, 197457468, 314306943, 128203119, 9689934;
  ...
The T(2,1) = 3 permutations of 1122 with 1 local maxima are 1122, 1221, 2211.
The T(2,2) = 3 permutations of 1122 with 2 local maxima are 1212, 2112, 2121.
The T(2,1) = 3 permutations of 1122 with 0 peaks are 2211, 2112, 1122.
The T(2,2) = 3 permutations of 1122 with 1 peak are 2121, 1221, 1212.
		

Crossrefs

Columns k=1..6 are A000244(n-1), 3*A152494, 3*A152495, 3*A152496, 3*A152497, 3*A152498.
Row sums are A000680.
Main diagonal is A334775.
The version for permutations of 1..n is A008303(n,k-1).

Programs

  • PARI
    PeaksBySig(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, F(#sig, D[i], 0));
    }
    Row(n)={ PeaksBySig(vector(n,i,2), [0..n-1]) }
    { for(n=1, 8, print(Row(n))) }

Formula

T(n,k) = F(2,n,k-1,0) 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.
A334776(n) = Sum_{k=1..n} (k-1)*T(n,k).
A334777(n) = Sum_{k=1..n} k*T(n,k).

A334773 Array read by antidiagonals: T(n,k) is the number of permutations of k indistinguishable copies of 1..n with exactly 2 local maxima.

Original entry on oeis.org

3, 12, 57, 30, 360, 705, 60, 1400, 7968, 7617, 105, 4170, 51750, 163584, 78357, 168, 10437, 241080, 1830000, 3293184, 791589, 252, 23072, 894201, 13562040, 64168750, 65968128, 7944321, 360, 46440, 2804480, 75278553, 759940800, 2246625000, 1319854080, 79541625
Offset: 2

Views

Author

Andrew Howroyd, May 10 2020

Keywords

Examples

			Array begins:
======================================================
n\k |       2          3           4              5
----|-------------------------------------------------
  2 |       3         12          30            60 ...
  3 |      57        360        1400          4170 ...
  4 |     705       7968       51750        241080 ...
  5 |    7617     163584     1830000      13562040 ...
  6 |   78357    3293184    64168750     759940800 ...
  7 |  791589   65968128  2246625000   42560067360 ...
  8 | 7944321 1319854080 78636093750 2383387566720 ...
  ...
The T(2,2) = 3 permutations of 1122 with 2 local maxima are 1212, 2112, 2121.
		

Crossrefs

Columns k=2..8 are 3*A152494, 12*A152499, 10*A152504, 30*A152509, 21*A152513, 56*A152517, 36*A152518.

Programs

  • PARI
    T(n,k) = {3*((k^2 + 4*k + 1)*binomial(k+3,3)^(n-1) - (2*k^2 + 9*k + 1)*(k+1)^(n-1) - k*(k + 5)*(n-2)*(k+1)^(n-1))/(k + 5)^2}

Formula

T(n,k) = Sum_{j=0..n-2} P(k-1,3) * P(k-2,2) * P(k,2)^(n-2-j) * P(k,4)^j + 2 * (n-j-2) * P(k-1,3)^2 * P(k,2)^(n-3-j) * P(k,4)^j where P(n,k) = binomial(n+k-1,k-1).
T(n,k) = 3*((k^2 + 4*k + 1)*binomial(k+3,3)^(n-1) - (2*k^2 + 9*k + 1)*(k+1)^(n-1) - k*(k + 5)*(n-2)*(k+1)^(n-1))/(k + 5)^2.

A152499 1/12 of the number of permutations of 3 indistinguishable copies of 1..n with exactly 2 local maxima.

Original entry on oeis.org

0, 1, 30, 664, 13632, 274432, 5497344, 109987840, 2199945216, 43999756288, 879998926848, 17599995314176, 351999979683840, 7039999912443904, 140799999624609792, 2815999998397775872, 56319999993188450304, 1126399999971143188480, 22527999999878130302976
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {(11*20^(n-1) - 11*4^(n-1) - 12*(n-1)*4^(n-1))/128} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    concat(0, Vec(x^2*(1 + 2*x) / ((1 - 4*x)^2*(1 - 20*x)) + O(x^40))) \\ Colin Barker, Jul 15 2020

Formula

a(n) = (11*20^(n-1) - 11*4^(n-1) - 12*(n-1)*4^(n-1))/128. - Andrew Howroyd, May 10 2020
From Colin Barker, Jul 15 2020: (Start)
G.f.: x^2*(1 + 2*x) / ((1 - 4*x)^2*(1 - 20*x)).
a(n) = 28*a(n-1) - 176*a(n-2) + 320*a(n-3) for n>2.
(End)

Extensions

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

A152504 1/10 of the number of permutations of 4 indistinguishable copies of 1..n with exactly 2 local maxima.

Original entry on oeis.org

0, 3, 140, 5175, 183000, 6416875, 224662500, 7863609375, 275228750000, 9633019921875, 337155773437500, 11800452490234375, 413015839453125000, 14455554393310546875, 505944403833007812500, 17708054134515380859375, 619781894709960937500000, 21692366314858856201171875
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {(11*35^(n-1) - 11*5^(n-1) - 12*(n-1)*5^(n-1))/90} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    concat(0, Vec(x^2*(3 + 5*x) / ((1 - 5*x)^2*(1 - 35*x)) + O(x^20))) \\ Colin Barker, Jul 16 2020

Formula

a(n) = (11*35^(n-1) - 11*5^(n-1) - 12*(n-1)*5^(n-1))/90. - Andrew Howroyd, May 10 2020
From Colin Barker, Jul 16 2020: (Start)
G.f.: x^2*(3 + 5*x) / ((1 - 5*x)^2*(1 - 35*x)).
a(n) = 45*a(n-1) - 375*a(n-2) + 875*a(n-3) for n>3.
(End)

Extensions

Terms a(9) and beyond from Andrew Howroyd, May 10 2020

A152509 1/30 of the number of permutations of 5 indistinguishable copies of 1..n with exactly 2 local maxima.

Original entry on oeis.org

0, 2, 139, 8036, 452068, 25331360, 1418668912, 79446252224, 4448995583296, 249143789616128, 13952052465406720, 781314939695363072, 43753636633642845184, 2450203651553656365056, 137211404487455350386688, 7683838651300399095726080, 430294964472840921667551232
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{68,-708,2016},{0,2,139},20] (* Harvey P. Dale, Feb 03 2022 *)
  • PARI
    a(n) = {(23*56^(n-1) - 23*6^(n-1) - 25*(n-1)*6^(n-1))/500} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    concat(0, Vec(x^2*(2 + 3*x) / ((1 - 6*x)^2*(1 - 56*x)) + O(x^20))) \\ Colin Barker, Jul 16 2020

Formula

a(n) = (23*56^(n-1) - 23*6^(n-1) - 25*(n-1)*6^(n-1))/500. - Andrew Howroyd, May 10 2020
From Colin Barker, Jul 16 2020: (Start)
G.f.: x^2*(2 + 3*x) / ((1 - 6*x)^2*(1 - 56*x)).
a(n) = 68*a(n-1) - 708*a(n-2) + 2016*a(n-3) for n>3.
(End)

Extensions

Terms a(8) and beyond from Andrew Howroyd, May 10 2020

A152513 1/21 of the number of permutations of 6 indistinguishable copies of 1..n with exactly 2 local maxima.

Original entry on oeis.org

0, 5, 497, 42581, 3584693, 301183841, 25300030889, 2125207418285, 178517461842461, 14995467100301177, 1259619238806161681, 105808016078078472389, 8887873350698981879429, 746581361459780256986513, 62712834362629583374730873, 5267878086460945365330876893
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {(61*84^(n-1) - 61*7^(n-1) - 66*(n-1)*7^(n-1))/847} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    Vec(x^2*(5 + 7*x) / ((1 - 7*x)^2*(1 - 84*x)) + O(x^18)) \\ Colin Barker, Jul 16 2020

Formula

a(n) = (61*84^(n-1) - 61*7^(n-1) - 66*(n-1)*7^(n-1))/847. - Andrew Howroyd, May 10 2020
From Colin Barker, Jul 16 2020: (Start)
G.f.: x^2*(5 + 7*x) / ((1 - 7*x)^2*(1 - 84*x)).
a(n) = 98*a(n-1) - 1225*a(n-2) + 4116*a(n-3) for n>3.
(End)

Extensions

Terms a(7) and beyond from Andrew Howroyd, May 10 2020

A152517 1/56 of the number of permutations of 7 indistinguishable copies of 1..n with exactly 2 local maxima.

Original entry on oeis.org

0, 3, 412, 50080, 6016512, 722051072, 86646800384, 10397622337536, 1247714738176000, 149725769101213696, 17967092296776155136, 2156051075653940805632, 258726129078829378961408, 31047135489462617851822080, 3725656258735540805375623168, 447078751048265125343493357568
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {(13*120^(n-1) - 13*8^(n-1) - 14*(n-1)*8^(n-1))/448} \\ Andrew Howroyd, May 10 2020

Formula

a(n) = (13*120^(n-1) - 13*8^(n-1) - 14*(n-1)*8^(n-1))/448. - Andrew Howroyd, May 10 2020

Extensions

Terms a(7) and beyond from Andrew Howroyd, May 10 2020

A152518 1/36 of the number of permutations of 8 indistinguishable copies of 1..n with exactly 2 local maxima.

Original entry on oeis.org

0, 7, 1290, 214713, 35450244, 5849546139, 965177888238, 159254380788525, 26276973131433672, 4335700569742873071, 715390594038180275346, 118039448016603095674977, 19476508922742491987034060, 3213623972252540268102877443, 530247955421669426384081722614
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {(97*165^(n-1) - 97*9^(n-1) - 104*(n-1)*9^(n-1))/2028} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    concat(0, Vec(x^2*(7 + 9*x) / ((1 - 9*x)^2*(1 - 165*x)) + O(x^17))) \\ Colin Barker, Jul 18 2020

Formula

a(n) = (97*165^(n-1) - 97*9^(n-1) - 104*(n-1)*9^(n-1))/2028. - Andrew Howroyd, May 10 2020
From Colin Barker, Jul 18 2020: (Start)
G.f.: x^2*(7 + 9*x) / ((1 - 9*x)^2*(1 - 165*x)).
a(n) = 183*a(n-1) - 3051*a(n-2) + 13365*a(n-3) for n>3.
(End)

Extensions

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