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

A336070 Number of inversion sequences avoiding the vincular pattern 10-0 (or 10-1).

Original entry on oeis.org

1, 1, 2, 6, 23, 106, 567, 3440, 23286, 173704, 1414102, 12465119, 118205428, 1199306902, 12958274048, 148502304614, 1798680392716, 22953847041950, 307774885768354, 4325220458515307, 63563589415836532, 974883257009308933, 15575374626562632462, 258780875395778033769, 4464364292401926006220
Offset: 0

Views

Author

Michael De Vlieger, Jul 07 2020

Keywords

Comments

From Joerg Arndt, Jan 20 2024: (Start)
a(n) is the number of weak ascent sequences of length n.
A weak ascent sequence is a sequence [d(1), d(2), ..., d(n)] where d(1)=0, d(k)>=0, and d(k) <= 1 + asc([d(1), d(2), ..., d(k-1)]) and asc(.) counts the weak ascents d(j) >= d(j-1) of its argument.
The number of length-n weak ascent sequences with maximal number of weak ascents is A000108(n).
(End)

Examples

			From _Joerg Arndt_, Jan 20 2024: (Start)
There are a(4) = 23 weak ascent sequences (dots for zeros):
   1:  [ . . . . ]
   2:  [ . . . 1 ]
   3:  [ . . . 2 ]
   4:  [ . . . 3 ]
   5:  [ . . 1 . ]
   6:  [ . . 1 1 ]
   7:  [ . . 1 2 ]
   8:  [ . . 1 3 ]
   9:  [ . . 2 . ]
  10:  [ . . 2 1 ]
  11:  [ . . 2 2 ]
  12:  [ . . 2 3 ]
  13:  [ . 1 . . ]
  14:  [ . 1 . 1 ]
  15:  [ . 1 . 2 ]
  16:  [ . 1 1 . ]
  17:  [ . 1 1 1 ]
  18:  [ . 1 1 2 ]
  19:  [ . 1 1 3 ]
  20:  [ . 1 2 . ]
  21:  [ . 1 2 1 ]
  22:  [ . 1 2 2 ]
  23:  [ . 1 2 3 ]
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1,
          add(b(n-1, j, t+`if`(j>=i, 1, 0)), j=0..t+1))
        end:
    a:= n-> b(n, -1$2):
    seq(a(n), n=0..25);  # Alois P. Heinz, Jan 23 2024
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, Sum[b[n - 1, j, t + If[j >= i, 1, 0]], {j, 0, t + 1}]];
    a[n_] := b[n, -1, -1];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jan 18 2025, after Alois P. Heinz *)
  • PARI
    \\ see formula (5) on page 18 of the Benyi/Claesson/Dukes reference
    N=40;
    M=matrix(N,N,r,c,-1);  \\ memoization
    a(n,k)=
    {
        if ( n==0 && k==0, return(1) );
        if ( k==0, return(0) );
        if ( n==0, return(0) );
        if ( M[n,k] != -1 , return( M[n,k] ) );
        my( s );
        s = sum( i=0, n, sum( j=0, k-1,
             (-1)^j * binomial(k-j,i) * binomial(i,j) * a( n-i, k-j-1 )) );
        M[n,k] = s;
        return( s );
    }
    for (n=0, N, print1( sum(k=1,n,a(n,k)),", "); );
    \\ print triangle a(n,k), see A369321:
    \\ for (n=0, N, for(k=0,n, print1(a(n,k),", "); ); print(););
    \\ Joerg Arndt, Jan 20 2024

Extensions

a(0)=1 prepended and more terms from Joerg Arndt, Jan 20 2024

A369322 a(n) is the number of weak ascent sequences (of any length) with n weak ascents.

Original entry on oeis.org

1, 1, 3, 20, 285, 8498, 521549, 65149296, 16446593964, 8354292354562, 8517018874559019, 17400156347544892896, 71175200852044807325678, 582639858848549658827324726, 9542182685892187892079287210803, 312611431819035281373960038697247872
Offset: 0

Views

Author

Joerg Arndt, Jan 20 2024

Keywords

Comments

Column sums of A369321.
A weak ascent sequence is a sequence [d(1), d(2), ..., d(n)] where d(1)=0, d(k)>=0, and d(k) <= 1 + asc([d(1), d(2), ..., d(k-1)]) and asc(.) counts the weak ascents d(j) >= d(j-1) of its argument.

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember;
         `if`(k<0, 0,  `if`(n=0, `if`(k=0, 1, 0), add((d->
            b(n-1, j, t+d, k-d))(`if`(j>=i, 1, 0)), j=0..t+1)))
        end:
    a:= n-> add(b(j, -1$2, n), j=n..n*(n+1)/2):
    seq(a(n), n=0..15);  # Alois P. Heinz, Jan 25 2024
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[k < 0, 0, If[n == 0, If[k == 0, 1, 0], Sum[Function[d, b[n-1, j, t+d, k-d]][If[j >= i, 1, 0]], {j, 0, t+1}]]];
    a[n_] := Sum[b[j, -1, -1, n], {j, n, n*(n+1)/2}];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Jul 07 2025, after Alois P. Heinz *)

A373115 Number weak ascent sequences of length 2n (prefixed with a zero) with exactly n weak ascents.

Original entry on oeis.org

1, 0, 0, 1, 35, 1661, 107002, 9047970, 972937247, 129603346139, 20934881571217, 4029204458109445, 910549073414709876, 238643240329544375336, 71772700696174395158056, 24544642886642172762170933, 9468192975202745545226891834, 4090995487728206638560153282674
Offset: 0

Views

Author

Alois P. Heinz, May 25 2024

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; expand(`if`(n=0, 1, add(
          b(n-1, j, t+`if`(j>=i, 1, 0))*`if`(j>=i, x, 1), j=0..t+1)))
        end:
    a:= n-> coeff(b(2*n, -1$2), x, n):
    seq(a(n), n=0..17);

Formula

a(n) = A369321(2n,n).

A369476 Total number of weak ascents in all length-n weak ascent sequences.

Original entry on oeis.org

0, 1, 4, 17, 83, 461, 2873, 19846, 150418, 1240398, 11051017, 105740309, 1081101474, 11758967146, 135544030566, 1650178088102, 21155166649234, 284821038726404, 4017445572746953, 59238368957321225, 911319667593472401, 14600491369553323529, 243205500769215401307
Offset: 0

Views

Author

Alois P. Heinz, Jan 23 2024

Keywords

Comments

See A369321 for definitions.

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1,
          add(b(n-1, j, t+`if`(j>=i, 1, 0)), j=0..t+1))
        end:
    a:= n-> b(n+1, -1$2)-b(n, -1$2):
    seq(a(n), n=0..23);

Formula

a(n) = Sum_{k=0..n} k * A369321(n,k).
a(n) = A336070(n+1) - A336070(n).
Showing 1-4 of 4 results.