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 25 results. Next

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

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.

A183270 T(n,k) is the number of singly defective permutations of 1..n+2*k-2 with exactly k maxima.

Original entry on oeis.org

0, 3, 2, 120, 80, 15, 4760, 3552, 860, 64, 249984, 199168, 57064, 6576, 220, 17512704, 14548480, 4643712, 681984, 42112, 672, 1599330304, 1367568384, 469942528, 80506880, 6849792, 242688, 1904, 185616337920, 162107703296, 58754129408
Offset: 1

Views

Author

R. H. Hardin, Jan 03 2011

Keywords

Comments

A singly defective permutation omits one value and repeats another value.
T(1,1) is zero because there are no defective permutations of a single element.
T(n,k) is divisible by n + 2*k - 2. - Andrew Howroyd, May 12 2020

Examples

			Table starts:
     0      3     120     4760    249984   17512704 1599330304 ...
     2     80    3552   199168  14548480 1367568384 ...
    15    860   57064  4643712 469942528 ...
    64   6576  681984 80506880 ...
   220  42112 6849792 ...
   672 242688 ...
  1904 ...
  ...
Some solutions for n=4 with 2 maxima:
(6,1,4,4,3,2) (4,3,1,5,6,6) (4,2,1,2,3,5) (3,2,1,6,4,3) (5,5,6,1,2,3).
		

Crossrefs

Programs

  • PARI
    \\ PeaksBySig defined in A334774.
    T(n,k) = {my(m=n+2*k-3); (m+1)*sum(i=1, m, PeaksBySig(vector(m,j,if(i==j,2,1)), [k-1])[1])} \\ Andrew Howroyd, May 12 2020

Formula

A001804(n) = Sum_{k=1..2*n+1} T(n+2-2*k, k). - Andrew Howroyd, May 12 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).

A334775 Number of permutations of 2 indistinguishable copies of 1..n with exactly n local maxima.

Original entry on oeis.org

1, 3, 24, 339, 7392, 230217, 9689934, 529634931, 36463272996, 3086776079745, 315108659732034, 38170141911313467, 5412679282489599840, 888197438344278978537, 166988574370806672234630, 35659091146526471860555587, 8583030980293328579564829948, 2312892203852608268226402385617
Offset: 1

Views

Author

Andrew Howroyd, May 11 2020

Keywords

Crossrefs

Main diagonal of A334774.

Programs

  • PARI
    \\ PeaksBySig defined in A334774.
    a(n)={ PeaksBySig(vector(n,i,2), [n-1])[1] }

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

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

Original entry on oeis.org

0, 0, 8, 483, 16205, 430078, 10210206, 228926441, 4979392831, 106552681812, 2260112122016, 47713890438655, 1004771692065345, 21130651257100970, 444074589574292578, 9329140064903065365, 195950323696361689667, 4115367075816142112512, 86427075922333935342372
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Cf. A334774.

Programs

  • PARI
    \\ PeaksBySig defined in A334774.
    a(n) = {PeaksBySig(vector(n,i,2), [2])[1]/3} \\ Andrew Howroyd, May 12 2020
    
  • PARI
    concat([0,0], Vec(x^3*(8 + 83*x - 617*x^2 - 1056*x^3) / ((1 - 3*x)^3*(1 - 10*x)^2*(1 - 21*x)) + O(x^22))) \\ Colin Barker, Jul 18 2020

Formula

a(n) = A334774(n,3)/3. - Andrew Howroyd, May 12 2020
From Colin Barker, Jul 18 2020: (Start)
G.f.: x^3*(8 + 83*x - 617*x^2 - 1056*x^3) / ((1 - 3*x)^3*(1 - 10*x)^2*(1 - 21*x)).
a(n) = 50*a(n-1) - 916*a(n-2) + 7914*a(n-3) - 34047*a(n-4) + 70740*a(n-5) - 56700*a(n-6) for n>6.
(End)

Extensions

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

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

Original entry on oeis.org

0, 0, 0, 113, 16565, 1216902, 65819156, 3026987243, 126794945523, 5020186173560, 191940972943658, 7179017518306893, 264789361664356313, 9680016979445645738, 351879352694331441600, 12745281650338440074831, 460591166578400672643359, 16621008007245773574764028
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Cf. A334774.

Programs

  • PARI
    \\ PeaksBySig defined in A334774.
    a(n)={PeaksBySig(vector(n,i,2), [3])[1]/3} \\ Andrew Howroyd, May 12 2020

Formula

a(n) = A334774(n,4)/3. - Andrew Howroyd, May 12 2020

Extensions

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

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

Original entry on oeis.org

0, 0, 0, 0, 2464, 744881, 104768981, 10276536243, 822955247485, 58200440129470, 3799361321633144, 235172542192199514, 14040457016024386686, 817688213483194898191, 46806533018464413823463, 2647280824791216788157413, 148469293685889945755890443, 8277727866556696292321356900
Offset: 1

Views

Author

R. H. Hardin, Dec 06 2008

Keywords

Crossrefs

Cf. A334774.

Programs

  • PARI
    \\ PeaksBySig defined in A334774.
    a(n)={PeaksBySig(vector(n,i,2), [4])[1]/3} \\ Andrew Howroyd, May 12 2020

Formula

a(n) = A334774(n,5)/3. - Andrew Howroyd, May 12 2020

Extensions

Terms a(11) and beyond from Andrew Howroyd, May 12 2020
Showing 1-10 of 25 results. Next