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.

A372646 Irregular triangle read by rows, T(n,k) is the number of integer compositions of n such that their set of adjacent differences is a subset of {-1,1}, they contain 1 as a part, and have k parts. T(n,k) for n >= 0, floor(sqrt(2*(n+1))-(1/2)) <= k <= floor((2*n+1)/3).

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 1, 2, 2, 0, 0, 1, 0, 4, 1, 0, 0, 3, 2, 2, 2, 0, 1, 0, 3, 6, 1, 0, 2, 0, 4, 2, 0, 2, 8, 3, 0, 1, 0, 0, 0, 6, 8, 1, 2, 8, 5, 0, 5, 2, 0, 0, 7, 14, 4, 0, 1, 0, 4, 6, 0, 10, 10, 1, 0, 0, 8, 20, 8, 0, 6, 2, 0, 2, 3, 0, 14, 22, 5, 0, 1, 0, 0, 6
Offset: 0

Views

Author

John Tyler Rascoe, May 08 2024

Keywords

Comments

Is there a bijection between the unrestricted compositions of k-1 and compositions of this kind with k parts for k > 0?

Examples

			T(10,4) = 2: (1,2,3,4), (4,3,2,1).
T(10,5) = 2: (2,1,2,3,2), (2,3,2,1,2).
T(10,7) = 1: (1,2,1,2,1,2,1).
Triangle T(n,k) begins:
  0;
  .  1;
  .  0;
  .  .  2;
  .  .  0, 1;
  .  .  0, 1;
  .  .  .  2, 2;
  .  .  .  0, 0, 1;
  .  .  .  0, 4, 1;
  .  .  .  0, 0, 3, 2;
  .  .  .  .  2, 2, 0, 1;
  ...
		

Crossrefs

Cf. A131577 (empirical column sums), A372647 (row sums).

Programs

  • Python
    # see linked program

Formula

G.f. for k-th column is C(x,k) - (x^k)*C(x,k) for k > 0 where C(x,k) is the g.f of the k-th column of A309938.

A227045 G.f.: 1/(1 - q/G(0)) where G(k) = 1 - q^(k+1) / (1 - q^(k+1) / G(k+1) ).

Original entry on oeis.org

1, 1, 2, 5, 13, 35, 95, 260, 713, 1959, 5386, 14815, 40759, 112151, 308609, 849240, 2337009, 6431246, 17698332, 48704714, 134032593, 368850417, 1015056867, 2793383746, 7687248186, 21154913043, 58217239536, 160210872557, 440892153268, 1213312738702, 3338974845151, 9188688696438
Offset: 0

Views

Author

Joerg Arndt, Jul 06 2013

Keywords

Crossrefs

Cf. A006958 (g.f.: 1/G(0), where G(k) = 1 - q^(k+1) / (1 - q^(k+1)/G(k+1) ) ).
Cf. A226729 (g.f.: 1/G(0), where G(k) = 1 - q^(k+1) / (1 - q^(k+1)/G(k+2) ) ).
Cf. A226728 (g.f.: 1/G(0), where G(k) = 1 + q^(k+1) / (1 - q^(k+1)/G(k+2) ) ).
Cf. A227309 (g.f.: 1/G(0), where G(k) = 1 - q^(k+1) / (1 - q^(k+2)/G(k+1) ) ).
Cf. A227310 (g.f.: 1/G(0), where G(k) = 1 + (-q)^(k+1) / (1 - (-q)^(k+1)/G(k+1) ) ).

Programs

  • Mathematica
    nmax = 40; CoefficientList[Series[1/(1 - x/Fold[(1 - #2/#1) &, 1, Reverse[x^(Range[nmax + 2] - Floor[Range[nmax + 2]/2])]]), {x, 0, nmax}], x] (* Vaclav Kotesovec, Sep 05 2017 *)
  • PARI
    N = 66;  q = 'q + O('q^N);
    G(k) = if(k>N, 1, 1 - q^(k+1) / (1 - q^(k+1) / G(k+1) ) );
    gf = 1 /(1- q/G(0));
    Vec(gf)

Formula

G.f.: 1/(1-q/ (1-q/(1-q/ (1-q^2/(1-q^2/ (1-q^3/(1-q^3/ (1-q^4/(1-q^4/ (1-q^5/(1-q^5/ (1-...))))))))))) ).
G.f. A(x) = 1/(1 - B(x)) where B(x) is the g.f. of A006958.
a(n) ~ c * d^n, where d = 2.751949072495748078279227332764623096815571855905843246297955690122791154... and c = 0.215973947378529032758849789768859077066690378163074586384819930605436492... - Vaclav Kotesovec, Sep 05 2017

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