login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118897 Triangle read by rows: T(n,k) is the number of binary sequences of length n containing k subsequences 0000 (n,k>=0). 2

%I #16 Jul 23 2024 09:01:19

%S 1,2,4,8,15,1,29,2,1,56,5,2,1,108,12,5,2,1,208,28,12,5,2,1,401,62,29,

%T 12,5,2,1,773,136,65,30,12,5,2,1,1490,294,145,68,31,12,5,2,1,2872,628,

%U 319,154,71,32,12,5,2,1,5536,1328,694,344,163,74,33,12,5,2,1,10671,2787

%N Triangle read by rows: T(n,k) is the number of binary sequences of length n containing k subsequences 0000 (n,k>=0).

%C Row n has n-2 terms (n>=3). Sum of entries in row n is 2^n (A000079). T(n,0) = A000078(n+4) (tetranacci numbers). T(n,1) = A118898(n). Sum(k*T(n,k),n>=0) = (n-3)*2^(n-4) (A001787).

%H Alois P. Heinz, <a href="/A118897/b118897.txt">Rows n = 0..143, flattened</a>

%F G.f.: G(t,z) = [1+(1-t)(z+z^2+z^3)]/[1-(1+t)z-(1-t)(z^2+z^3+z^4)].

%e T(7,2) = 5 because we have 0000010, 0000011, 0100000, 1100000 and 1000001.

%e Triangle starts:

%e 1;

%e 2;

%e 4;

%e 8;

%e 15, 1;

%e 29, 2, 1;

%e 56, 5, 2, 1;

%e 108, 12, 5, 2, 1;

%e ...

%p G:=(1+(1-t)*(z+z^2+z^3))/(1-(1+t)*z-(1-t)*(z^2+z^3+z^4)): Gser:=simplify(series(G,z=0,17)): P[0]:=1: for n from 1 to 14 do P[n]:=sort(coeff(Gser,z^n)) od: 1;2;4;8; for n from 4 to 14 do seq(coeff(P[n],t,j),j=0..n-3) od; # yields sequence in triangular form

%p # second Maple program:

%p b:= proc(n, t) option remember; `if`(n=0, 1,

%p expand(b(n-1, min(3, t+1))*`if`(t>2, x, 1))+b(n-1, 0))

%p end:

%p T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):

%p seq(T(n), n=0..14); # _Alois P. Heinz_, Sep 17 2019

%t nn=15;a=x^3/(1-y x)+x+x^2;b=1/(1-x);f[list_]:=Select[list,#>0&];Map[f,CoefficientList[Series[b (1+a)/(1-a x/(1-x)) ,{x,0,nn}],{x,y}]]//Grid (* _Geoffrey Critzer_, Nov 18 2012 *)

%Y Cf. A000079, A000078, A118898, A001787, A076791, A118390.

%K nonn,tabf

%O 0,2

%A _Emeric Deutsch_, May 04 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 4 07:24 EDT 2024. Contains 375679 sequences. (Running on oeis4.)