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.

A006980 Compositions: 6th column of A048004.

Original entry on oeis.org

1, 2, 5, 12, 28, 64, 143, 315, 687, 1485, 3186, 6792, 14401, 30391, 63872, 133751, 279177, 581040, 1206151, 2497895, 5161982, 10646564, 21919161, 45052841, 92461171, 189489255, 387830160, 792810956, 1618840800, 3301999647
Offset: 6

Views

Author

Keywords

Comments

a(n) is the number of binary strings of length n-1 whose longest run of 1s has length 5. - Félix Balado, May 20 2025

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • J. L. Yucas, Counting special sets of binary Lyndon words, Ars Combin., 31 (1991), 21-29.

Crossrefs

Programs

  • Maple
    a:= n-> (Matrix(11, (i,j)-> if i=j-1 then 1 elif j=1 then [2, 1, 0, -1, -2, -4, -5, -4, -3, -2, -1][i] else 0 fi)^n) [1,7]: seq(a(n), n=6..40); # Alois P. Heinz, Oct 29 2008
  • PARI
    Vec(1/(1-x-x^2-x^3-x^4-x^5)/(1-x-x^2-x^3-x^4-x^5-x^6)+O(x^99)) \\ Charles R Greathouse IV, Jan 10 2013

Formula

G.f.: x^6 / ((1-x-x^2-x^3-x^4-x^5) * (1-x-x^2-x^3-x^4-x^5-x^6)). - Alois P. Heinz, Oct 29 2008
G.f.: x^6 * (1-x)^2 / ((1-2*x+x^6) * (1-2*x+x^7)). - Félix Balado, May 20 2025

Extensions

Corrected definition: 6th column of A048004. - Geoffrey Critzer, Nov 09 2008

A048003 Triangular array T read by rows: T(h,k) = number of binary words of length h and maximal runlength k.

Original entry on oeis.org

2, 2, 2, 2, 4, 2, 2, 8, 4, 2, 2, 14, 10, 4, 2, 2, 24, 22, 10, 4, 2, 2, 40, 46, 24, 10, 4, 2, 2, 66, 94, 54, 24, 10, 4, 2, 2, 108, 188, 118, 56, 24, 10, 4, 2, 2, 176, 370, 254, 126, 56, 24, 10, 4, 2, 2, 286, 720, 538, 278, 128, 56, 24, 10, 4, 2, 2, 464, 1388, 1126, 606, 286, 128, 56, 24, 10, 4, 2
Offset: 1

Views

Author

Keywords

Examples

			Rows: {2}; {2,2}; {2,4,2}; {2,8,4,2}; ...
T(3,2) = 4, because there are 4 binary words of length 3 and maximal runlength 2: 001, 011, 100, 110. - _Alois P. Heinz_, Oct 29 2008
		

Crossrefs

T(h,2) = 2*a(h+1) for h=2, 3, ..., where a=A000071.
T(h,3) = 2*b(h) for h=3, 4, ..., where b=A000100.
T(h,4) = 2*c(h) for h=4, 5, ..., where c=A000102.
Cf. A048004.
Columns 5, 6 give: 2*A006979, 2*A006980. Row sums give: A000079.
Cf. A229756.

Programs

  • Maple
    gf:= proc(n) 2*x^n/ (1-add(x^i, i=1..n-1))/ (1-add(x^j, j=1..n)) end:
    T:= (h,k)-> coeff(series(gf(k), x, h+1), x, h):
    seq(seq(T(h,k), k=1..h), h=1..13);  # Alois P. Heinz, Oct 29 2008
  • Mathematica
    gf[n_] := 2*x^n*(x^2-2*x+1) / (x^(2*n+1)-2*x^(n+2)-x^(n+1)+x^n+4*x^2-4*x+1); t[h_, k_] := Coefficient[ Series[ gf[k], {x, 0, h+1}], x, h]; Table[ Table[ t[h, k], {k, 1, h}], {h, 1, 13}] // Flatten (* Jean-François Alcover, Oct 07 2013, after Alois P. Heinz *)

Formula

G.f. of column k: 2*x^k / ((1-Sum_{i=1..k-1} x^i) * (1-Sum_{j=1..k} x^j)). - Alois P. Heinz, Oct 29 2008
T(n, k) = 0 if k < 1 or k > n, 2 if k = 1 or k = n, 2T(n-1, k) + T(n-1, k-1) - 2T(n-2, k-1) + T(n-k, k-1) - T(n-k-1, k) otherwise (cf. similar formula for A048004). This is a simplification of the L-shaped sum T(n-1, k) + ... + T(n-k, k) + ... + T(n-k,1). - Andrew Woods, Oct 11 2013
For n > 2k, T(n, n-k) = 2*A045623(k). - Andrew Woods, Oct 11 2013

Extensions

More terms from Alois P. Heinz, Oct 29 2008
Showing 1-2 of 2 results.