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.

A279565 Number of length n inversion sequences avoiding the patterns 100, 110, 120, 201, and 210.

Original entry on oeis.org

1, 1, 2, 6, 21, 81, 332, 1420, 6266, 28318, 130412, 609808, 2887582, 13818590, 66726628, 324713196, 1590853485, 7840315329, 38843186366, 193342353214, 966409013021, 4848846341569, 24412146213116, 123290812268404, 624448756434476, 3171046361310556
Offset: 0

Views

Author

Megan A. Martinez, Feb 09 2017

Keywords

Comments

A length n inversion sequence e_1e_2...e_n is a sequence of integers where 0 <= e_i <= i-1. The term a(n) counts those length n inversion sequences with no entries e_i, e_j, e_k (where i e_k. This is the same as the set of length n inversion sequences avoiding 100, 110, 120, 201, and 210.

Examples

			The length 4 inversion sequences avoiding (100, 110, 120, 201, 210) are 0000, 0001, 0002, 0003, 0010, 0011, 0012, 0013, 0020, 0021, 0022, 0023, 0101, 0102, 0103, 0111, 0112, 0113, 0121, 0122, 0123.
		

Crossrefs

Programs

  • Magma
    I:=[6, 21, 81]; [1,1,2] cat [n le 3 select I[n] else ( (n+1)*(17*n+6)*Self(n-1) +(49*n^2+11*n+22)*Self(n-2) +3*(3*n-1)*(3*n-2)*Self(n-3) )/(5*(n+2)*(n+1)) : n in [1..30]]; // G. C. Greubel, Mar 29 2019
    
  • Maple
    a:= proc(n) option remember; `if`(n<3, n!,
          ((n-1)*(17*n-28)*a(n-1) +(49*n^2-185*n+196)*a(n-2)
           +(3*(3*n-7))*(3*n-8)*a(n-3)) / (5*n*(n-1)))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Feb 22 2017
  • Mathematica
    a[n_] := a[n] = If[n < 3, n!, (((n - 1)*(17*n - 28)*a[n-1] + (49*n^2 - 185*n + 196)*a[n-2] + (3*(3*n - 7))*(3*n - 8)*a[n-3]) / (5*n*(n - 1)))]; Array[a, 30, 0] (* Jean-François Alcover, Nov 06 2017, after Alois P. Heinz *)
    Join[{1}, Table[(1/n)*Sum[m*Sum[Binomial[k, n-m-k]*Binomial[n+k-1, k], {k, 0, n-m}], {m, 1, n}], {n, 1, 30}]] (* G. C. Greubel, Mar 29 2019 *)
  • Maxima
    a(n):=if n=0 then 1 else sum(m*sum(binomial(k,n-m-k)*binomial(n+k-1,k),k,0,n-m),m,1,n)/n; /* Vladimir Kruchinin, Mar 26 2019 */
    
  • PARI
    my(x='x+O('x^30)); Vec(round(3/(4-4*sin(asin((27*x+11)/16)/3)))) \\ G. C. Greubel, Mar 29 2019
    
  • Sage
    [1] +[(1/n)*(sum(sum(k*binomial(j,n-k-j)*binomial(n+j-1,j) for j in (0..n-k)) for k in (1..n))) for n in (1..30)] # G. C. Greubel, Mar 29 2019

Formula

G.f.: 3/(4-4*sin(asin((27*x+11)/16)/3)). - Vladimir Kruchinin, Mar 25 2019
a(n) = (1/n)*Sum_{m=1..n} m*Sum_{k=0..n-m} C(k,n-m-k)*C(n+k-1,k), n>0, a(0)=1. - Vladimir Kruchinin, Mar 26 2019
a(n) ~ 3^(3*n + 1/2) / (2^(7/2) * sqrt(Pi) * n^(3/2) * 5^(n - 1/2)). - Vaclav Kotesovec, Oct 07 2021
Conjecture: a(n) = (v_n + v_{n+1})/2 for n > 0 with a(0) = 1 where we start with vector v of fixed length m with elements v_i = 1 and for i=1..m-2, for j=i+2..m apply v_j := Sum_{k=0..2} v_{j-k}. - Mikhail Kurkov, Sep 03 2024

Extensions

a(10)-a(25) from Alois P. Heinz, Feb 22 2017