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.

A230621 Number of permutations of [n] with exactly two (possibly overlapping) occurrences of the consecutive step pattern {up}^2.

This page as a plain text file.
%I A230621 #16 Dec 21 2020 02:32:08
%S A230621 0,0,0,0,1,8,86,803,8221,86214,966114,11405511,142934124,1892755874,
%T A230621 26487024478,390658292572,6063383527327,98824236282650,
%U A230621 1688354110698402,30179347977813309,563462569163994435,10970288500929001986,222384832378410907480
%N A230621 Number of permutations of [n] with exactly two (possibly overlapping) occurrences of the consecutive step pattern {up}^2.
%H A230621 Alois P. Heinz, <a href="/A230621/b230621.txt">Table of n, a(n) for n = 0..462</a>
%F A230621 a(n) ~ c * (3*sqrt(3)/(2*Pi))^n * n! * n^2, where c = 0.0359701024355206... . - _Vaclav Kotesovec_, Sep 06 2014
%e A230621 a(4) = 1: 1234.
%e A230621 a(5) = 8: 12354, 12453, 13452, 21345, 23451, 31245, 41235, 51234.
%e A230621 a(6) = 86: 123546, 123645, 123654, ..., 631245, 641235, 651234.
%e A230621 a(7) = 803: 1235476, 1236475, 1236547, ..., 7631245, 7641235, 7651234.
%p A230621 b:= proc(u, o, t) option remember;
%p A230621       `if`(t=7, 0, `if`(u+o=0, `if`(t in [4, 6], 1, 0),
%p A230621       add(b(u-j, o+j-1, [1, 1, 5, 6, 5, 6][t]), j=1..u)+
%p A230621       add(b(u+j-1, o-j, [2, 3, 4, 7, 3, 4][t]), j=1..o)))
%p A230621     end:
%p A230621 a:= n-> b(n, 0, 1):
%p A230621 seq(a(n), n=0..25);
%t A230621 b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1,
%t A230621     Sum[b[u - j, o + j - 1, 1], {j, 1, u}] +
%t A230621     Sum[b[u + j - 1, o - j, 2]*If[t == 2, x, 1], {j, 1, o}] // Expand];
%t A230621 a[n_] := Coefficient[b[n, 0, 1], x, 2];
%t A230621 a /@ Range[0, 25] (* _Jean-François Alcover_, Dec 21 2020, after _Alois P. Heinz_ in A162975 *)
%Y A230621 Column k=2 of A162975.
%Y A230621 Cf. A230620.
%K A230621 nonn
%O A230621 0,6
%A A230621 _Alois P. Heinz_, Oct 25 2013