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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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, 12, 5, 2, 1, 773, 136, 65, 30, 12, 5, 2, 1, 1490, 294, 145, 68, 31, 12, 5, 2, 1, 2872, 628, 319, 154, 71, 32, 12, 5, 2, 1, 5536, 1328, 694, 344, 163, 74, 33, 12, 5, 2, 1, 10671, 2787
Offset: 0

Views

Author

Emeric Deutsch, May 04 2006

Keywords

Comments

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).

Examples

			T(7,2) = 5 because we have 0000010, 0000011, 0100000, 1100000 and 1000001.
Triangle starts:
    1;
    2;
    4;
    8;
   15,  1;
   29,  2, 1;
   56,  5, 2, 1;
  108, 12, 5, 2, 1;
  ...
		

Crossrefs

Programs

  • Maple
    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
    # second Maple program:
    b:= proc(n, t) option remember; `if`(n=0, 1,
          expand(b(n-1, min(3, t+1))*`if`(t>2, x, 1))+b(n-1, 0))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Sep 17 2019
  • Mathematica
    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 *)

Formula

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)].

A202193 Triangle read by rows: T(n,m) = coefficient of x^n in expansion of (x/(1 - x - x^2 - x^3 - x^4))^m.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 5, 3, 1, 8, 12, 9, 4, 1, 15, 28, 25, 14, 5, 1, 29, 62, 66, 44, 20, 6, 1, 56, 136, 165, 129, 70, 27, 7, 1, 108, 294, 401, 356, 225, 104, 35, 8, 1, 208, 628, 951, 944, 676, 363, 147, 44, 9, 1, 401, 1328, 2211, 2424, 1935, 1176, 553, 200, 54, 10, 1
Offset: 1

Views

Author

Vladimir Kruchinin, Dec 14 2011

Keywords

Comments

From Philippe Deléham, Feb 16 2014: (Start)
As a Riordan array, this is (1/(1 - x - x^2 - x^3 - x^4), x/(1 - x - x^2 - x^3 - x^4)).
T(n,0) = A000078(n+3); T(n+1,1) = A118898(n+4).
Row sums are A103142(n).
Diagonal sums are A077926(n)*(-1)^n.
Tetranacci convolution triangle. (End)

Examples

			Triangle begins:
   1;
   1,  1;
   2,  2,  1;
   4,  5,  3,  1;
   8, 12,  9,  4,  1;
  15, 28, 25, 14,  5,  1;
  29, 62, 66, 44, 20,  6,  1;
		

Crossrefs

Similar sequences : A037027 (Fibonacci convolution triangle), A104580 (tribonacci convolution triangle). - Philippe Deléham, Feb 16 2014

Programs

  • Maxima
    T(n,m):=if n=m then 1 else sum(sum((-1)^i*binomial(k,k-i)*binomial(n-m-4*i-1,k-1),i,0,(n-m-k)/4)*binomial(k+m-1,m-1),k,1,n-m);

Formula

T(n,m) = Sum_{k=1..n-m} (Sum_{i=0..floor((n-m-k)/4)} (-1)^i*binomial(k,k-i)*binomial(n-m-4*i-1,k-1))*binomial(k+m-1,m-1), n > m, T(n,n)=1.
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-3,k) + T(n-4,k), T(0,0) = 1, T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Feb 16 2014
G.f. for column m: (x/(1 - x - x^2 - x^3 - x^4))^m. - Jason Yuen, Feb 17 2025
Showing 1-2 of 2 results.