%I #25 Jan 10 2023 08:32:39
%S 1,4,15,1,56,8,209,46,1,780,232,12,2911,1091,93,1,10864,4912,592,16,
%T 40545,21468,3366,156,1,151316,91824,17784,1200,20,564719,386373,
%U 89238,8010,235,1,2107560,1604984,430992,48624,2120,24,7865521,6598282,2021103,275724,16255,330,1
%N Triangle read by rows: T(n,k) is the number of words over alphabet {0,1,2,3} having exactly k occurrences of the string 01, where n>=0 and k>=0.
%H Alois P. Heinz, <a href="/A261711/b261711.txt">Rows n = 0..200, flattened</a>
%H Rigoberto Flórez, Leandro Junes, and José L. Ramírez, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL21/Florez/florez4.html">Further Results on Paths in an n-Dimensional Cubic Lattice</a>, Journal of Integer Sequences, Vol. 21 (2018), Article 18.1.2.
%H Ran Pan, <a href="http://www.math.ucsd.edu/~projectp/problems/p5.html">Problem 5</a>, Project P.
%F G.f.: 1/(1-4*x-(y-1)*x^2).
%e 1
%e 4
%e 15 1
%e 56 8
%e 209 46 1
%e 780 232 12
%e 2911 1091 93 1
%e 10864 4912 592 16
%e 40545 21468 3366 156 1
%e 151316 91824 17784 8010 20
%p b:= proc(n, t) option remember; expand(`if`(n=0, 1,
%p add(b(n-1, i)*`if`(t=1 and i=2, x, 1), i=1..4)))
%p end:
%p T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
%p seq(T(n), n=0..12); # _Alois P. Heinz_, Aug 29 2015
%t CoefficientList[#, y]& /@ CoefficientList[1/(1-4x-(y-1)x^2) + O[x]^13, x] // Flatten (* _Jean-François Alcover_, Jan 10 2023 *)
%Y Column k=0 is A001353(n+1). The triangle is shifted from A207823.
%K easy,nonn,tabf
%O 0,2
%A _Ran Pan_, Aug 29 2015
|