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

A018927 For each permutation p of {1,2,...,n} define maxjump(p) = max(p(i) - i); a(n) is sum of maxjumps of all p.

Original entry on oeis.org

0, 1, 7, 45, 313, 2421, 20833, 198309, 2073793, 23664021, 292834513, 3907994949, 55967406433, 856355084661, 13944569166193, 240803714700069, 4395998055854593, 84596337986326101, 1711691067680320273, 36329581765125539589, 807099012174816776353
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[k*k!*((k+1)^(n-k)-k^(n-k)),{k,0,n-1}],{n,1,20}] (* Vaclav Kotesovec, Mar 17 2014 *)

Formula

a(n) = Sum_{k=0..n-1} k*k!*((k+1)^(n-k)-k^(n-k)).
a(n) = Sum_{k=0..n*(n-1)/2} k*A127452(n-1,k). - Paul D. Hanna, Jan 15 2007
a(n) = Sum_{k=0..n-1} k * A180190(n,k). - Alois P. Heinz, Feb 21 2019

A136213 Triple factorial triangle, read by rows of 3n(n+1)/2+1 terms, where row n+1 is generated from row n by first inserting zeros in row n at positions {[m*(m+5)/6], m=0..3n-1} and then taking partial sums, starting with a '1' in row 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 4, 4, 4, 3, 3, 2, 2, 1, 1, 28, 28, 28, 28, 24, 24, 20, 20, 16, 16, 12, 9, 9, 6, 4, 4, 2, 1, 1, 280, 280, 280, 280, 252, 252, 224, 224, 196, 196, 168, 144, 144, 120, 100, 100, 80, 64, 64, 48, 36, 27, 27, 18, 12, 8, 8, 4, 2, 1, 1, 3640, 3640, 3640, 3640, 3360
Offset: 0

Views

Author

Paul D. Hanna, Dec 22 2007

Keywords

Comments

Square array A136212 is generated by a complementary process. This is the triple factorial variant of triangles A135877 (double factorials) and A127452 (factorials).

Examples

			Triangle begins:
1;
1,1,1,1;
4,4,4,4,3,3,2,2,1,1;
28,28,28,28,24,24,20,20,16,16,12,9,9,6,4,4,2,1,1;
280,280,280,280,252,252,224,224,196,196,168,144,144,120,100,100,80,64,64,48,36,27,27,18,12,8,8,4,2,1,1;
3640,3640,3640,3640,3360,3360,3080,3080,2800,2800,2520,2268,2268,2016,1792,1792,1568,1372,1372,1176,1008,864,864,720,600,500,500,400,320,256,256,192,144,108,81,81,54,36,24,16,16,8,4,2,1,1;
...
To generate row 3, start with row 2:
[4,4,4,4,3,3,2,2,1,1];
insert zeros at positions [0,1,2,4,6,8,11,14,17] to get:
[0,0,0,4,0,4,0,4,0,4,3,0,3,2,0,2,1,0,1],
then take reverse partial sums (from right to left) to obtain row 3:
[28,28,28,28,24,24,20,20,16,16,12,9,9,6,4,4,2,1,1].
Continuing in this way will generate all the rows of this triangle.
		

Crossrefs

Cf. A007559; related tables: A136212, A136218, A136214, A135877.

Programs

  • PARI
    {T(n,k)=local(A=[1],B);if(n>0,for(i=1,n,m=1;B=[0,0]; for(j=1,#A,if(j+m-1==(m*(m+7))\6,m+=1;B=concat(B,0));B=concat(B,A[j])); A=Vec(Polrev(Vec(Pol(B)/(1-x+O(x^#B)))))));if(k+1>#A,0,A[k+1])}

Formula

Column 0 forms the triple factorials A007559.

A127714 Triangle, read by rows of (n+1)*(n+2)/2 terms, generated by the following rule. Start with a single '1' in row n=0; from then on, obtain row n from row n-1 by inserting zeros in row n-1 at positions: {(j+1)*n - j*(j-1)/2 | j=0..n} and then take partial sums.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 1, 3, 5, 5, 8, 11, 11, 14, 14, 14, 1, 4, 9, 14, 14, 22, 33, 44, 44, 58, 72, 72, 86, 86, 86, 1, 5, 14, 28, 42, 42, 64, 97, 141, 185, 185, 243, 315, 387, 387, 473, 559, 559, 645, 645, 645, 1, 6, 20, 48, 90, 132, 132, 196, 293, 434, 619, 804, 804
Offset: 0

Views

Author

Paul D. Hanna, Jan 24 2007

Keywords

Examples

			Triangle begins:
  1;
  1, 1, 1;
  1, 2, 2, 3, 3, 3;
  1, 3, 5, 5, 8, 11, 11, 14, 14, 14;
  1, 4, 9, 14, 14, 22, 33, 44, 44, 58, 72, 72, 86, 86, 86;
  1, 5, 14, 28, 42, 42, 64, 97, 141, 185, 185, 243, 315, 387, 387, 473, 559, 559, 645, 645, 645;
  1, 6, 20, 48, 90, 132, 132, 196, 293, 434, 619, 804, 804, 1047, 1362, 1749, 2136, 2136, 2609, 3168, 3727, 3727, 4372, 5017, 5017, 5662, 5662, 5662;
  ...
Obtain row n from row n-1 by inserting zeros in row n-1 at positions:
[n,2*n,3*n-1,4*n-3,5*n-6,6*n-10,...,(j+1)*n - j*(j-1)/2,... | j=0..n],
and then take partial sums; illustrated by the following examples.
Obtain row 3 from row 2 by inserting zeros at positions [3,6,8,9],
and then take partial sums:
[1, 2, 2, 0, 3, 3, 0, 3, 0, 0];
[1, 3, 5, 5, 8,11,11,14,14,14];
Obtain row 4 from row 3 by inserting zeros at positions [4,8,11,13,14],
and then take partial sums:
[1, 3, 5, _5, _0, _8, 11, 11, _0, 14, 14, _0, 14, _0, _0];
[1, 4, 9, 14, 14, 22, 33, 44, 44, 58, 72, 72, 86, 86, 86].
		

Crossrefs

Programs

  • PARI
    {T(n,k)=local(t);if(n<0 || k<0 || k>(n+1)*(n+2)/2-1,0, t=(sqrtint((2*n+3)^2-8*(k+1))-1)\2; if(k==0,1,if(issquare((2*n+3)^2-8*(k+1)),T(n,k-1),T(n,k-1)+T(n-1,k-n+t))))} {/* for(n=0,8,for(k=0,(n+1)*(n+2)/2-1,print1(T(n,k),","));print("")) */}

Formula

T(n,n) = A000108(n);
A009766 (Catalan's triangle) forms lower left sub-triangle;
T(n+1,2*n+1) = A127632(n), where g.f. of A127632 is: 2/(1+sqrt(2*sqrt(1-4*x)-1)).
T(n,n*(n+1)/2) = A127716(n).
T(n,(n+1)*(n+2)/2-1) = A127715(n).

A135879 Triangle, read by rows of A135901(n) terms, where row n+1 is generated from row n by inserting zeros at positions [(m+3)^2/4 - 2], as m=0,1,2,3,... and then taking partial sums from right to left, starting with a single 1 in row 0.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 6, 6, 4, 4, 2, 2, 1, 25, 25, 19, 19, 13, 13, 9, 5, 5, 3, 1, 1, 138, 138, 113, 113, 88, 88, 69, 50, 50, 37, 24, 24, 15, 10, 5, 5, 2, 1, 970, 970, 832, 832, 694, 694, 581, 468, 468, 380, 292, 292, 223, 173, 123, 123, 86, 62, 38, 38, 23, 13, 8, 3, 3, 1, 8390
Offset: 0

Views

Author

Paul D. Hanna, Dec 14 2007

Keywords

Comments

Column 0 is A135881 which equals column 0 of square array A135878 and also equals column 0 of triangle A135880. Compare to square array A135878, which is generated by a complementary process. An interesting variant is triangle A135877 in which column 0 equals the double factorials (A001147).

Examples

			Triangle begins:
1;
1, 1;
2, 2, 1, 1;
6, 6, 4, 4, 2, 2, 1;
25, 25, 19, 19, 13, 13, 9, 5, 5, 3, 1, 1;
138, 138, 113, 113, 88, 88, 69, 50, 50, 37, 24, 24, 15, 10, 5, 5, 2, 1;
970, 970, 832, 832, 694, 694, 581, 468, 468, 380, 292, 292, 223, 173, 123, 123, 86, 62, 38, 38, 23, 13, 8, 3, 3, 1;
8390, 8390, 7420, 7420, 6450, 6450, 5618, 4786, 4786, 4092, 3398, 3398, 2817, 2349, 1881, 1881, 1501, 1209, 917, 917, 694, 521, 398, 275, 275, 189, 127, 89, 51, 51, 28, 15, 7, 4, 1, 1;
There are A135901(n) number of terms in row n.
To generate the triangle, start with a single 1 in row 0,
and then obtain row n+1 from row n by inserting zeros at
positions {[(m+3)^2/4 - 2], m=0,1,2,...} and then
taking reverse partial sums (i.e., summing from right to left).
Start with row 0, insert a zero in front of the '1' at position 0:
[0,1];
take reverse partial sums to get row 1:
[1,1];
insert zeros at positions [0,2]:
[0,1,0,1];
take reverse partial sums to get row 2:
[2,2,1,1];
insert zeros at positions [0,2,4]:
[0,2,0,2,0,1,1];
take reverse partial sums to get row 3:
[6,6,4,4,2,2,1];
insert zeros at positions [0,2,4,7]:
[0,6,0,6,0,4,4,0,2,2,0,1];
take reverse partial sums to get row 4:
[25,25,19,19,13,13,9,5,5,3,1,1];
insert zeros at positions [0,2,4,7,10,14]:
[0,25,0,25,0,19,19,0,13,13,0,9,5,5,0,3,1,1];
take reverse partial sums to get row 5:
[138,138,113,113,88,88,69,50,50,37,24,24,15,10,5,5,2,1].
Triangle A135880 begins:
1;
1, 1;
2, 2, 1;
6, 7, 3, 1;
25, 34, 15, 4, 1;
138, 215, 99, 26, 5, 1;
970, 1698, 814, 216, 40, 6, 1; ...
and is generated by matrix powers of itself.
		

Crossrefs

Programs

  • PARI
    {T(n,k)=local(A=[1],B);if(n>0,for(i=1,n,m=1;B=[]; for(j=1,#A,if(j+m-1==floor((m+2)^2/4)-1,m+=1;B=concat(B,0));B=concat(B,A[j])); A=Vec(Polrev(Vec(Pol(B)/(1-x+O(x^#B)))))));if(k+1>#A,0,A[k+1])}

A135877 Triangle, read by rows of n(n+1)+1 terms, where row n+1 is generated from row n by inserting zeros at positions [(m+2)^2/4 - 1] for m=1..2n+2 and then taking partial sums from right to left, starting with a single 1 in row 0.

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 3, 2, 2, 1, 1, 15, 15, 15, 12, 12, 9, 9, 6, 4, 4, 2, 1, 1, 105, 105, 105, 90, 90, 75, 75, 60, 48, 48, 36, 27, 27, 18, 12, 8, 8, 4, 2, 1, 1, 945, 945, 945, 840, 840, 735, 735, 630, 540, 540, 450, 375, 375, 300, 240, 192, 192, 144, 108, 81, 81, 54, 36, 24, 16, 16, 8
Offset: 0

Views

Author

Paul D. Hanna, Dec 14 2007

Keywords

Comments

Compare to square array A135876 which is generated by a complementary process. Compare to triangle A127452 which generates the factorials in column 0. A very interesting variant is triangle A135879.

Examples

			Triangle begins:
1;
1, 1, 1;
3, 3, 3, 2, 2, 1, 1;
15, 15, 15, 12, 12, 9, 9, 6, 4, 4, 2, 1, 1;
105, 105, 105, 90, 90, 75, 75, 60, 48, 48, 36, 27, 27, 18, 12, 8, 8, 4, 2, 1, 1;
945, 945, 945, 840, 840, 735, 735, 630, 540, 540, 450, 375, 375, 300, 240, 192, 192, 144, 108, 81, 81, 54, 36, 24, 16, 16, 8, 4, 2, 1, 1; ...
To generate the triangle, start with a single 1 in row 0,
and then obtain row n+1 from row n by inserting zeros
at positions [(m+2)^2/4 - 1] for m=1..2n+2 and then
taking reverse partial sums (i.e., summing from right to left).
Start with row 0, insert 2 zeros in front of the '1':
[0,0,1];
take reverse partial sums to get row 1:
[1,1,1];
insert zeros at positions [0,1,3,5]:
[0,0,1,0,1,0,1];
take reverse partial sums to get row 2:
[3,3,3,2,2,1,1];
insert zeros at positions [0,1,3,5,8,11]:
[0,0,3,0,3,0,3,2,0,2,1,0,1];
take reverse partial sums to get row 3:
[15,15,15,12,12,9,9,6,4,4,2,1,1];
insert zeros at positions [0,1,3,5,8,11,15,19]:
[0,0,15,0,15,0,15,12,0,12,9,0,9,6,4,0,4,2,1,0,1];
take reverse partial sums to get row 4:
[105,105,105,90,90,75,75,60,48,48,36,27,27,18,12,8,8,4,2,1,1].
		

Crossrefs

Programs

  • PARI
    {T(n,k)=local(A=[1],B);if(n>0,for(i=1,n,m=1;B=[0]; for(j=1,#A,if(j+m-1==floor((m+2)^2/4)-1,m+=1;B=concat(B,0));B=concat(B,A[j])); A=Vec(Polrev(Vec(Pol(B)/(1-x+O(x^#B)))))));if(k+1>#A,0,A[k+1])} /* for(n=0,8,for(k=0,n*(n+1),print1(T(n,k),","));print("")) */

Formula

Column 0 equals the double factorials A001147(n) = (2n)!/(n!*2^n).
Showing 1-5 of 5 results.