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 10 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).

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

A159722 Number of permutations of 3 indistinguishable copies of 1..n arranged in a circle with exactly 2 local maxima.

Original entry on oeis.org

12, 576, 17376, 448800, 10861056, 253940736, 5807161344, 130675728384, 2903978803200, 63887897001984, 1393919508086784, 30201597684350976, 650495989232173056, 13939199950454784000, 297369599774111563776, 6319103998978368208896, 133816319995412169621504
Offset: 2

Views

Author

R. H. Hardin, Apr 20 2009

Keywords

Crossrefs

Column k=3 of A334772.
Cf. A159716.

Programs

  • PARI
    a(n) = {3*n*(121*20^(n-2) + 15*4^(n-2) - 36*n*4^(n-2))/32} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    Vec(12*x*(1 + 2*x)*(1 - 6*x - 108*x^2 + 80*x^3) / ((1 - 4*x)^3*(1 - 20*x)^2) + O(x^20)) \\ Colin Barker, Jul 16 2020

Formula

a(n) = 3*n*(121*20^(n-2) + 15*4^(n-2) - 36*n*4^(n-2))/32. - Andrew Howroyd, May 10 2020
From Colin Barker, Jul 16 2020: (Start)
G.f.: 12*x*(1 + 2*x)*(1 - 6*x - 108*x^2 + 80*x^3) / ((1 - 4*x)^3*(1 - 20*x)^2).
a(n) = 52*a(n-1) - 928*a(n-2) + 6784*a(n-3) - 21760*a(n-4) + 25600*a(n-5) for n>6.
(End)

Extensions

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

A159728 Number of permutations of 4 indistinguishable copies of 1..n arranged in a circle with exactly 2 local maxima.

Original entry on oeis.org

36, 2610, 129800, 5748750, 241987500, 9885006250, 395426250000, 15570077343750, 605504070312500, 23311913238281250, 890091272109375000, 33749294301074218750, 1272088786561523437500, 47703329503967285156250, 1780924301526757812500000, 66228122463283630371093750
Offset: 2

Views

Author

R. H. Hardin, Apr 20 2009

Keywords

Crossrefs

Column k=4 of A334772.
Cf. A159716.

Programs

  • PARI
    a(n) = {2*n*(121*35^(n-2) + 8*5^(n-2) - 24*n*5^(n-2))/9} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    Vec(2*x^2*(3 + 5*x)*(6 - 85*x - 1100*x^2 + 875*x^3) / ((1 - 5*x)^3*(1 - 35*x)^2) + O(x^40)) \\ Colin Barker, Jul 16 2020

Formula

a(n) = 2*n*(121*35^(n-2) + 8*5^(n-2) - 24*n*5^(n-2))/9. - Andrew Howroyd, May 10 2020

Extensions

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

A159734 Number of permutations of 5 indistinguishable copies of 1..n arranged in a circle with exactly 2 local maxima.

Original entry on oeis.org

80, 8520, 659560, 46412200, 3121135440, 203933233280, 13051880894720, 822269693093760, 51163456598214400, 3151668992962800640, 192538324414433556480, 11680658351228331345920, 704433549821153777192960, 42266012989435750480281600, 2524689842570106278817955840
Offset: 2

Views

Author

R. H. Hardin, Apr 20 2009

Keywords

Crossrefs

Column k=5 of A334772.
Cf. A159716.

Programs

  • PARI
    a(n) = {n*(23^2*56^(n-2) + 21*6^(n-2) - 75*n*6^(n-2))/10} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    Vec(40*x^2*(2 + 3*x)*(1 - 25*x - 303*x^2 + 252*x^3) / ((1 - 6*x)^3*(1 - 56*x)^2) + O(x^18)) \\ Colin Barker, Jul 16 2020

Formula

a(n) = n*(23^2*56^(n-2) + 21*6^(n-2) - 75*n*6^(n-2))/10. - Andrew Howroyd, May 10 2020
From Colin Barker, Jul 16 2020: (Start)
G.f.: 40*x^2*(2 + 3*x)*(1 - 25*x - 303*x^2 + 252*x^3) / ((1 - 6*x)^3*(1 - 56*x)^2).
a(n) = 130*a(n-1) - 5260*a(n-2) + 68760*a(n-3) - 362880*a(n-4) + 677376*a(n-5) for n>6.
(End)

Extensions

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

A159717 Number of permutations of 2 indistinguishable copies of 1..n arranged in a circle with exactly 3 local maxima.

Original entry on oeis.org

0, 0, 6, 1192, 61830, 2150688, 62178928, 1629254640, 40346856234, 965510596600, 22606163844396, 521603874280248, 11911230805813846, 269907065756299440, 6079103449024019880, 136243494317831152480, 3040751938796332410018, 67621304208554979697224, 1499043510801269678080708
Offset: 1

Views

Author

R. H. Hardin, Apr 20 2009

Keywords

Crossrefs

Column 3 of A334778.
Cf. A159716.

Programs

  • PARI
    \\ CircPeaksBySig defined in A334778.
    a(n) = {CircPeaksBySig(vector(n, i, 2), [3])[1]} \\ Andrew Howroyd, May 13 2020

Extensions

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

A159718 Number of permutations of 2 indistinguishable copies of 1..n arranged in a circle with exactly 4 local maxima.

Original entry on oeis.org

0, 0, 0, 88, 33600, 3821760, 272509552, 15313310208, 750469872312, 33813251867920, 1443455210369040, 59454199364673024, 2389923754993613176, 94450458835284703536, 3687585353084799432720, 142691482885508987276800, 5484263653598164634676600, 209677462059979688650122960
Offset: 1

Views

Author

R. H. Hardin, Apr 20 2009

Keywords

Crossrefs

Column 4 of A334778.
Cf. A159716.

Programs

  • PARI
    \\ CircPeaksBySig defined in A334778.
    a(n) = {CircPeaksBySig(vector(n, i, 2), [4])[1]} \\ Andrew Howroyd, May 13 2020

Extensions

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

A159719 Number of permutations of 2 indistinguishable copies of 1..n arranged in a circle with exactly 5 local maxima.

Original entry on oeis.org

0, 0, 0, 0, 1480, 1268292, 279561086, 36381368048, 3573883594170, 296395007981680, 22044296362400136, 1523944523765510064, 100158396249221188476, 6351609408030664973692, 392562103869990035520330, 23810390333486683269302048, 1424190819067621511845096358
Offset: 1

Views

Author

R. H. Hardin, Apr 20 2009

Keywords

Crossrefs

Column 5 of A334778.
Cf. A159716.

Programs

  • PARI
    \\ CircPeaksBySig defined in A334778.
    a(n) = {CircPeaksBySig(vector(n, i, 2), [5])[1]} \\ Andrew Howroyd, May 13 2020

Extensions

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

A159720 Number of permutations of 2 indistinguishable copies of 1..n arranged in a circle with exactly 6 local maxima.

Original entry on oeis.org

0, 0, 0, 0, 0, 40272, 62954948, 24342647424, 5320007368884, 848044852469680, 111078667024032048, 12769013592631944576, 1340902091662029846456, 132008300342568131914656, 12398363733385845967412220, 1124539850663707285433353472, 99357839137277548804214431980
Offset: 1

Views

Author

R. H. Hardin, Apr 20 2009

Keywords

Crossrefs

Column 6 of A334778.
Cf. A159716.

Programs

  • PARI
    \\ CircPeaksBySig defined in A334778.
    a(n) = {CircPeaksBySig(vector(n, i, 2), [6])[1]} \\ Andrew Howroyd, May 13 2020

Extensions

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

A159737 Number of permutations of 6 indistinguishable copies of 1..n arranged in a circle with exactly 2 local maxima.

Original entry on oeis.org

150, 22680, 2596608, 273322980, 27558217008, 2700777267972, 259275295383552, 24501521550788100, 2286808732032093360, 211301127303186249252, 19362866942233277773632, 1762020891775616889450852, 159395120671659354639719856, 14345560860451487040265198020
Offset: 2

Views

Author

R. H. Hardin, Apr 20 2009

Keywords

Crossrefs

Column k=6 of A334772.
Cf. A159716.

Programs

  • PARI
    a(n) = {3*n*(61^2*84^(n-2) + 96*7^(n-2) - 396*n*7^(n-2))/121} \\ Andrew Howroyd, May 10 2020
    
  • PARI
    Vec(6*x^2*(5 + 7*x)*(5 - 196*x - 2401*x^2 + 2058*x^3) / ((1 - 7*x)^3*(1 - 84*x)^2) + O(x^40)) \\ Colin Barker, Jul 18 2020

Formula

a(n) = 3*n*(61^2*84^(n-2) + 96*7^(n-2) - 396*n*7^(n-2))/121. - Andrew Howroyd, May 10 2020
From Colin Barker, Jul 18 2020: (Start)
G.f.: 6*x^2*(5 + 7*x)*(5 - 196*x - 2401*x^2 + 2058*x^3) / ((1 - 7*x)^3*(1 - 84*x)^2).
a(n) = 189*a(n-1) - 10731*a(n-2) + 173215*a(n-3) - 1094856*a(n-4) + 2420208*a(n-5) for n>6.
(End)

Extensions

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