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.

Previous Showing 21-25 of 25 results.

A236538 Triangle read by rows: T(n,k) = (n+1)*2^(n-2)+(k-1)*2^(n-1) for 1 <= k <= n.

Original entry on oeis.org

1, 3, 5, 8, 12, 16, 20, 28, 36, 44, 48, 64, 80, 96, 112, 112, 144, 176, 208, 240, 272, 256, 320, 384, 448, 512, 576, 640, 576, 704, 832, 960, 1088, 1216, 1344, 1472, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 2816, 3328, 3840, 4352, 4864, 5376
Offset: 1

Views

Author

Fedor Igumnov, Jan 28 2014

Keywords

Comments

1, 9, 45, 161, 497, 1409, ... is the sequence of perimeters (sum of border elements) of the triangle.
1, 5, 80, 3520, 394240, 107233280, 68629299200, ... is the sequence of determinants of the triangle.
Only the first three terms are odd.

Examples

			Triangle begins:
================================================
\k |    1     2     3     4     5     6     7
n\ |
================================================
1  |    1;
2  |    3,    5;
3  |    8,   12,   16;
4  |   20,   28,   36,   44;
5  |   48,   64,   80,   96,  112;
6  |  112,  144,  176,  208,  240,  272;
7  |  256,  320,  384,  448,  512,  576,  640;
...
		

Crossrefs

Cf. A001792 (column 1), A053220 (right border). Also:
A014477, row sums;
A036826, partial sums;
A058962, central elements in odd rows;
A045623, second column;
A045891, third column;
A034007, fourth column;
A167667, subdiagonal;
A130129, second subdiagonal.

Programs

  • C
    int a(int n, int k) {return (n+1)*pow(2,n-2)+(k-1)*pow(2,n-1);}
    
  • Magma
    /* As triangle: */ [[(n+1)*2^(n-2)+(k-1)*2^(n-1): k in [1..n]]: n in [1..10]]; // Bruno Berselli, Jan 28 2014
  • Mathematica
    t[n_, k_] := (n + 1)*2^(n - 2) + (k - 1)*2^(n - 1); Table[t[n, k], {n, 10}, {k, n}] // Flatten (* Bruno Berselli, Jan 28 2014 *)

Formula

T(n,k) = T(n-1,k) + T(n-1,k+1).
Sum_{k=1..n} T(n,k) = n^2*2^(n-1) = A014477(n-1).

Extensions

More terms from Bruno Berselli, Jan 28 2014

A347823 Triangle read by rows: T(n,k) = (n+k+1)*binomial(n,k), 0 <= k <= n.

Original entry on oeis.org

1, 2, 3, 3, 8, 5, 4, 15, 18, 7, 5, 24, 42, 32, 9, 6, 35, 80, 90, 50, 11, 7, 48, 135, 200, 165, 72, 13, 8, 63, 210, 385, 420, 273, 98, 15, 9, 80, 308, 672, 910, 784, 420, 128, 17, 10, 99, 432, 1092, 1764, 1890, 1344, 612, 162, 19, 11, 120, 585, 1680, 3150, 4032, 3570, 2160, 855, 200, 21
Offset: 0

Views

Author

Jules Beauchamp, Jan 23 2022

Keywords

Examples

			Triangle begins:
  1;
  2,  3;
  3,  8,   5;
  4, 15,  18,   7;
  5, 24,  42,  32,   9;
  6, 35,  80,  90,  50,  11;
  7, 48, 135, 200, 165,  72, 13;
  8, 63, 210, 385, 420, 273, 98, 15;
  ...
		

Crossrefs

Row sums give A053220.
Columns give A000027, A005563, A212343.
Diagonals give A005408, A001105, A059270, A112742.

Programs

Formula

T(n,k) = A094727(n+1,k)*A007318(n,k).
Row g.f.: (1 + x)^(n-1)*(1 + n + x + 2*n*x). - Stefano Spezia, Jan 23 2022

A367631 Triangle read by rows: T(n,k) is the number of permutations of length n avoiding simultaneously the patterns 123 and 132 with the maximum number of non-overlapping descents equal k.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 0, 4, 0, 0, 0, 5, 3, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 23, 9, 0, 0, 0, 0, 0, 16, 48, 0, 0, 0, 0, 0, 0, 4, 97, 27, 0, 0, 0, 0, 0, 0, 0, 94, 162, 0, 0, 0, 0, 0, 0, 0, 0, 44, 387, 81, 0, 0, 0, 0, 0, 0, 0, 0, 8, 476, 540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320, 1485, 243, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Tian Han, Nov 24 2023

Keywords

Comments

Number of permutations of length n avoiding simultaneously the patterns 123 and 132 with the maximum number of non-overlapping descents equal k. A descent in a permutation a(1)a(2)...a(n) is position i such that a(i) > a(i+1).

Examples

			Triangle T(n,k) begins:
  1;
  1, 0;
  1, 1,  0;
  0, 4,  0,  0;
  0, 5,  3,  0,   0;
  0, 2, 14,  0,   0,    0;
  0, 0, 23,  9,   0,    0,   0;
  0, 0, 16, 48,   0,    0,   0, 0;
  0, 0,  4, 97,  27,    0,   0, 0, 0;
  0, 0,  0, 94, 162,    0,   0, 0, 0, 0;
  0, 0,  0, 44, 387,   81,   0, 0, 0, 0, 0;
  0, 0,  0,  8, 476,  540,   0, 0, 0, 0, 0, 0;
  0, 0,  0,  0, 320, 1485, 243, 0, 0, 0, 0, 0, 0;
  ...
		

Crossrefs

Row sums give A011782.
Column sums give 3*A005054.
T(2n,n) gives A133494.
T(3n+2,n) gives A000079.
T(3n+1,n) gives A053220(n+1).

Formula

G.f.: (1 + x + x^2 - 2*x^2*z - x^3*z)/(1 - 3*x^2*z - 2*x^3*z).

A340228 a(n) is the sum of the lengths of all the segments used to draw a rectangle of height 2^(n-1) and width n divided into 2^(n-1) rectangles of unit height, in turn, divided into rectangles of unit height and lengths corresponding to the parts of the compositions of n.

Original entry on oeis.org

4, 11, 27, 64, 149, 342, 775, 1736, 3849, 8458, 18443, 39948, 86029, 184334, 393231, 835600, 1769489, 3735570, 7864339, 16515092, 34603029, 72351766, 150994967, 314572824, 654311449, 1358954522, 2818572315, 5838471196, 12079595549, 24964497438, 51539607583, 106300440608
Offset: 1

Views

Author

Stefano Spezia, Jan 01 2021

Keywords

Examples

			Illustrations for n = 1..4:
      _           _ _
     |_|         |_ _|
                 |_|_|
  a(1) = 4     a(2) = 11
    _ _ _       _ _ _ _
   |_ _ _|     |_ _ _ _|
   |_ _|_|     |_ _ _|_|
   |_|_ _|     |_|_ _ _|
   |_|_|_|     |_ _|_ _|
               |_ _|_|_|
               |_|_ _|_|
               |_|_|_ _|
               |_|_|_|_|
  a(3) = 27    a(4) = 64
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{6,-13,12,-4},{4,11,27,64},32]

Formula

O.g.f.: x*(4 - 13*x + 13*x^2 - 3*x^3)/(1 - 3*x + 2*x^2)^2.
E.g.f.: (exp(2*x)*(3 + 6*x) + 4*x*exp(x) - 3)/4.
a(n) = 6*a(n-1) - 13*a(n-2) + 12*a(n-3) - 4*a(n-4) for n > 4.
a(n) = n + 3*(n + 1)*2^(n-2).
a(n) = A001792(n) + A188626(n).
a(n) = A045623(n) + A215149(n).
a(n) = A006127(n) + A053220(n).

A386250 Total number of ones in runs of 1's of length >= 4 over all binary strings of length n.

Original entry on oeis.org

0, 0, 0, 0, 4, 13, 36, 92, 224, 528, 1216, 2752, 6144, 13568, 29696, 64512, 139264, 299008, 638976, 1359872, 2883584, 6094848, 12845056, 27000832, 56623104, 118489088, 247463936, 515899392, 1073741824, 2231369728, 4630511616, 9596567552, 19864223744, 41070624768, 84825604096, 175019917312
Offset: 0

Views

Author

Félix Balado, Aug 14 2025

Keywords

Examples

			For n=6 there are eight binary strings that contain runs of 1s of length >= 4: 001111, 011110, 011111, 101111, 111100, 111101, 111110 and 111111; the runs of length >= 4 in these strings contain a(6) = 36 ones.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence [{4,-4}, {4,13}, 30] (* Hugo Pfoertner, Aug 14 2025 *)

Formula

For n>=4, a(n) = (5*n-12)*2^(n-5).
G.f.: -x^4*(3*x-4)/(2*x-1)^2. - Alois P. Heinz, Aug 14 2025
Previous Showing 21-25 of 25 results.