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-9 of 9 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).

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

Original entry on oeis.org

0, 1, 19, 235, 2539, 26119, 263863, 2648107, 26513875, 265250287, 2652876847, 26530008499, 265304159371, 2653054879735, 26530591844071, 265306057146811, 2653061016284227, 26530611583384063, 265306120353746335, 2653061217872021443, 26530612224048411643
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Cf. A334773.

Programs

  • PARI
    a(n) = {(13*10^(n-1) - 13*3^(n-1) - 14*(n-1)*3^(n-1))/49} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    concat(0, Vec(x*(1 + 3*x) / ((1 - 3*x)^2*(1 - 10*x)) + O(x^20))) \\ Colin Barker, May 19 2020

Formula

a(n) = (13*10^(n-1) - 13*3^(n-1) - 14*(n-1)*3^(n-1))/49. - Andrew Howroyd, May 10 2020
From Colin Barker, May 19 2020: (Start)
G.f.: x*(1 + 3*x) / ((1 - 3*x)^2*(1 - 10*x)).
a(n) = 16*a(n-1) - 69*a(n-2) + 90*a(n-3) for n>3.
(End)

Extensions

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

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

Original entry on oeis.org

2, 12, 66, 36, 576, 1168, 80, 2610, 17376, 16220, 150, 8520, 129800, 448800, 202416, 252, 22680, 659560, 5748750, 10861056, 2395540, 392, 52416, 2596608, 46412200, 241987500, 253940736, 27517568, 576, 109116, 8505728, 273322980, 3121135440, 9885006250, 5807161344, 310123764
Offset: 2

Views

Author

Andrew Howroyd, May 10 2020

Keywords

Comments

T(n,k) is divisible by n and 2*T(n,k) is divisible by n*k.

Examples

			Array begins:
==========================================================
n\k |        2          3            4              5
----|----------------------------------------------------
  2 |        2         12           36             80 ...
  3 |       66        576         2610           8520 ...
  4 |     1168      17376       129800         659560 ...
  5 |    16220     448800      5748750       46412200 ...
  6 |   202416   10861056    241987500     3121135440 ...
  7 |  2395540  253940736   9885006250   203933233280 ...
  8 | 27517568 5807161344 395426250000 13051880894720 ...
...
The T(2,3) = 12 permutations of 111222 with 2 local maxima are 112122, 112212 and their rotations.
The T(3,2) = 66 permutations of 112233 with 2 local maxima are 112323, 113223, 113232, 121233, 121332, 122133, 122313, 123213, 123123, 123132, 131322 and their rotations.
		

Crossrefs

Columns k=2..6 are A159716, A159722, A159728, A159734, A159737.

Programs

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

Formula

T(n,k) = n*k*( P(k,4)^(n-2) * P(k-2,2)^2 + 4*(Sum_{j=0..n-3} P(k-1,3) * P(k-2,2) * P(k,2)^j * P(k, 4)^(n-j-3)) + 4*(Sum_{j=0..n-4} (j + 1) * P(k-1,3)^2 * P(k,2)^j * P(k,4)^(n-j-4)) )/2 where P(n,k) = binomial(n+k-1, k-1).
T(n,k) = n*k*( (k^2 + 4*k + 1)^2*binomial(k+3, 3)^(n-2) + 12*(k + 2)*(k+1)^(n-2) - 6*k*(k+5)*n*(k+1)^(n-2))/(2*(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-9 of 9 results.