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 11-13 of 13 results.

A370929 Number of compositions of n with parts (p_1, ..., p_i) such that the set of adjacent differences is a subset of {-k,k} for some k > 0 and the number of parts equals ceiling(p_1/k).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 3, 5, 5, 7, 5, 9, 7, 7, 10, 11, 9, 13, 9, 13, 17, 11, 14, 19, 15, 13, 20, 19, 18, 23, 19, 20, 26, 21, 20, 32, 22, 25, 27, 33, 25, 37, 21, 34, 36, 35, 24, 50, 26, 40, 37, 44, 32, 51, 31, 48, 46, 49, 34, 65, 40, 45, 54, 56, 48, 63, 42, 58
Offset: 0

Views

Author

John Tyler Rascoe, Mar 06 2024

Keywords

Examples

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

Crossrefs

Compositions such that no adjacent parts are equal is A003242.
Compositions such that the set of adjacent differences is a subset of {-1,1} is A173258 and {-2,2} is A214254.
The array A214247 counts compositions such that the set of adjacent differences is a subset of {-k,k}.

Programs

  • PARI
    { my(N=75, x='x+O('x^N));
    my(gf= 1 + sum(p=1, N, sum(k=1, p, x^(p*ceil(p/k)) * prod(j=1, ceil(p/k)-1, (x^(-j*k) + x^(j*k))))));
    Vec(gf) }

Formula

G.f.: 1 + Sum_{p>0} Sum_{k=1..p} x^(p*i) * Product_{j=1..i-1} (x^(-j*k) + x^(j*k)), where i = ceiling(p/k).

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 11-13 of 13 results.