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

A372647 Number of compositions such that their set adjacent differences are a subset of {-1,1} and contain 1 as a part of the composition itself.

Original entry on oeis.org

0, 1, 0, 2, 1, 1, 4, 1, 5, 5, 5, 10, 8, 14, 15, 22, 26, 31, 44, 47, 69, 80, 101, 131, 156, 203, 246, 315, 388, 484, 609, 746, 945, 1163, 1453, 1812, 2242, 2799, 3464, 4319, 5351, 6652, 8261, 10235, 12732, 15763, 19577, 24276, 30092, 37338, 46254, 57376, 71081
Offset: 0

Views

Author

John Tyler Rascoe, May 08 2024

Keywords

Examples

			The compositions for n = 6..8 are:
a(6) = 4: [3,2,1], [2,1,2,1], [1,2,3], [1,2,1,2].
a(7) = 1: [1,2,1,2,1].
a(8) = 5: [2,1,2,1,2], [3,2,1,2], [2,1,2,3], [2,3,2,1], [1,2,3,2].
		

Crossrefs

Cf. (row sums of A372646).

A375763 Irregular triangle read by rows, T(n,k) is the number of North-East lattice paths from (0,0) to (n,n+2) that stay weakly above y = x, with weight = k + A000217(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 3, 4, 5, 4, 4, 3, 2, 1, 1, 1, 4, 7, 10, 11, 11, 11, 9, 8, 6, 5, 3, 2, 1, 1, 1, 5, 11, 18, 24, 27, 30, 29, 28, 25, 23, 19, 16, 12, 10, 7, 5, 3, 2, 1, 1, 1, 6, 16, 30, 46, 59, 71, 78, 81, 81, 78, 74, 67, 60, 52, 46, 37, 31, 24
Offset: 0

Views

Author

John Tyler Rascoe, Aug 26 2024

Keywords

Comments

Here the weight of a lattice path is the area under the path and above the x-axis. T(n,k) also counts the number of integer compositions of (3*n) + (2*k) + 6 with adjacent differences in {-1,1}, first part 1, and last part 3.

Examples

			Triangle begins:
    k=0  1  2   3   4   5   6   7   8   9  10  11  12  13  14
 n=0: 1;
 n=1: 1, 1, 1;
 n=2: 1, 2, 2,  2,  1,  1;
 n=3: 1, 3, 4,  5,  4,  4,  3,  2,  1,  1;
 n=4: 1, 4, 7, 10, 11, 11, 11,  9,  8,  6,  5,  3,  2,  1,  1;
 ...
T(1,0) = 1: (NENN).
T(2,1) = 2: (NNEENN) and (NENNEN).
T(3,2) = 4: (NENENNNE), (NENNENEN), (NNEENNEN), and (NNENEENN).
		

Crossrefs

Cf. A000245 (empirical row sums), A000217 (row lengths).
Cf. A227543 (paths of this kind from (0,0) to (n,n), offset 1 for (0,0) to (n,n+1)).

Programs

  • Python
    # see linked program

A383620 Number of weak compositions of n such that the set of adjacent differences is a subset of {-1,1}.

Original entry on oeis.org

1, 4, 5, 9, 13, 20, 30, 45, 66, 102, 152, 229, 344, 518, 780, 1180, 1775, 2676, 4037, 6088, 9182, 13852, 20891, 31512, 47536, 71706, 108166, 163172, 246140, 371303, 560118, 844943, 1274606, 1922767, 2900522, 4375493, 6600511, 9956990, 15020307, 22658428
Offset: 0

Views

Author

John Tyler Rascoe, May 02 2025

Keywords

Examples

			a(0) = 1: (0).
a(1) = 4: (0,1), (0,1,0), (1,0), (1).
...
a(4) = 13: (0,1,0,1,0,1,0,1), (0,1,0,1,0,1,0,1,0), (1,0,1,0,1,0,1,0), (1,0,1,0,1,0,1), (0,1,0,1,2), (1,0,1,2), (2,1,0,1,0), (2,1,0,1), (0,1,2,1,0), (0,1,2,1), (1,2,1,0), (1,2,1), (4).
		

Crossrefs

Programs

  • PARI
    M(k) = matrix(k+1,k+1, i,j, if(i==j,1,if(i==j-1, -x^(i-1), if(i==j+1, -x^(i-1), 0))))
    A_x(N) = {my(k=N+1,x='x+O('x^k)); Vec(vecsum(M(k)^(-1) * vector(k+1,i,x^(i-1))~))}
    A_x(10)

A383549 Number of rises in all compositions of n with parts in {1,2,3} and adjacent differences in {-1,1}.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 5, 3, 9, 11, 10, 24, 21, 30, 50, 43, 75, 93, 96, 161, 170, 215, 312, 323, 456, 574, 639, 906, 1046, 1276, 1710, 1935, 2501, 3135, 3642, 4760, 5699, 6893, 8823, 10401, 12952, 16079, 19104, 24002, 29097, 35165, 43865, 52628, 64503, 79363, 95329
Offset: 0

Views

Author

John Tyler Rascoe, Apr 29 2025

Keywords

Comments

A rise is any pair of parts (p_{i-1},p_i) with p_{i-1} < p_i.
By reversal a(n) is also the number of descents in all compositions of n of this kind.

Examples

			For n = 6 the following compositions have 5 rises: (1,2,1,2), (1,2,3), (2,1,2,1), (3,2,1).
		

Crossrefs

Programs

  • PARI
    A_x(N) = {my(x='x+O('x^N)); concat([0,0,0], Vec(x^3*(1 + x^2)^2*(1 + x + x^3)/(1 - x^3 - x^5)^2))}
    A_x(40)

Formula

G.f.: x^3*(1 + x^2)^2*(1 + x + x^3)/(1 - x^3 - x^5)^2.
Previous Showing 21-24 of 24 results.