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.

A328409 Number of inversion sequences of length n where all consecutive subsequences i,j,k satisfy i > j < k or i <= j >= k.

This page as a plain text file.
%I A328409 #20 Feb 26 2020 09:56:07
%S A328409 1,1,2,3,6,16,57,245,1248,7151,46104,325560,2523437,21106494,
%T A328409 190806861,1842347541,19018910502,208088481921,2414462433024,
%U A328409 29512737830802,380156646308541,5133381861786182,72678441538790901,1074324277172134786,16581261996774703606
%N A328409 Number of inversion sequences of length n where all consecutive subsequences i,j,k satisfy i > j < k or i <= j >= k.
%H A328409 Alois P. Heinz, <a href="/A328409/b328409.txt">Table of n, a(n) for n = 0..485</a>
%H A328409 Juan S. Auli and Sergi Elizalde, <a href="https://arxiv.org/abs/1906.07365">Consecutive patterns in inversion sequences II: avoiding patterns of relations</a>, arXiv:1906.07365 [math.CO], 2019.
%F A328409 a(n) ~ n! * c * 2^n * n^(Pi/4 - 1/2) / Pi^n, where c = 0.52096414784... - _Vaclav Kotesovec_, Oct 31 2019
%e A328409 a(0) = 1: the empty sequence.
%e A328409 a(1) = 1: 0.
%e A328409 a(2) = 2: 00, 01.
%e A328409 a(3) = 3: 000, 010, 011.
%e A328409 a(4) = 6: 0000, 0101, 0102, 0103, 0110, 0111.
%e A328409 a(5) = 16: 00000, 01010, 01011, 01020, 01021, 01022, 01030, 01031, 01032, 01033, 01101, 01102, 01103, 01104, 01110, 01111.
%p A328409 b:= proc(n, j, t, c) option remember; `if`(n=0, 1, add(`if`((i>j
%p A328409      xor t) and c=0, 0, b(n-1, i, is(i<j), max(0, c-1))), i=1..n))
%p A328409     end:
%p A328409 a:= n-> b(n, 0, true, 2):
%p A328409 seq(a(n), n=0..24);
%t A328409 b[n_, j_, t_, c_] := b[n, j, t, c] = If[n == 0, 1, Sum[If[Xor[i>j, t] && c == 0, 0, b[n - 1, i, i<j, Max[0, c - 1]]], {i, 1, n}]];
%t A328409 a[n_] := b[n, 0, True, 2];
%t A328409 a /@ Range[0, 24] (* _Jean-François Alcover_, Feb 26 2020, after _Alois P. Heinz_ *)
%Y A328409 Cf. A000108, A328357, A328358, A328425, A328491.
%K A328409 nonn
%O A328409 0,3
%A A328409 _Alois P. Heinz_, Oct 14 2019