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.

A145111 Square array A(n,k) of numbers of length n binary words with fewer than k 0-digits between any pair of consecutive 1-digits (n,k >= 0), read by antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 4, 4, 1, 2, 4, 7, 5, 1, 2, 4, 8, 11, 6, 1, 2, 4, 8, 15, 16, 7, 1, 2, 4, 8, 16, 27, 22, 8, 1, 2, 4, 8, 16, 31, 47, 29, 9, 1, 2, 4, 8, 16, 32, 59, 80, 37, 10, 1, 2, 4, 8, 16, 32, 63, 111, 134, 46, 11, 1, 2, 4, 8, 16, 32, 64, 123, 207, 222, 56, 12, 1, 2, 4, 8, 16, 32, 64, 127, 239, 384, 365, 67, 13
Offset: 0

Views

Author

Alois P. Heinz, Oct 02 2008

Keywords

Examples

			A(4,1) = 11, because 11 binary words of length 4 have fewer than 1 0-digit between any pair of consecutive 1-digits: 0000, 0001, 0010, 0100, 1000, 0011, 0110, 1100, 0111, 1110, 1111.
Square array A(n,k) begins:
  1,  1,  1,  1,  1,  1, ...
  2,  2,  2,  2,  2,  2, ...
  3,  4,  4,  4,  4,  4, ...
  4,  7,  8,  8,  8,  8, ...
  5, 11, 15, 16, 16, 16, ...
  6, 16, 27, 31, 32, 32, ...
		

Crossrefs

Columns 0-9 give: A000027(n+1), A000124, A000126(n+1), A007800(n+1), A145112, A145113, A145114, A145115, A145116, A145117.
Main diagonal gives A000079.
Cf. A141539.

Programs

  • Maple
    f:= proc(n,k) option remember; local j; if n=0 then 1 elif n<=k then 2^(n-1) else add(f(n-j, k), j=1..k) fi end: g:= proc(n,k) option remember; if n<0 then 0 else g(n-1,k) +f(n,k) fi end: A:= (n,k)-> `if`(n=0, g(0,k), A(n-1,k) +g(n-1,k)): seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    a[n_, k_] := SeriesCoefficient[(1 - x + x^(k+1))/(1 - 3*x + 2*x^2 + x^(k+1) - x^(k+2)), {x, 0, n}]; a[0, ] = 1; Table[a[n-k, k], {n, 0, 14}, {k, n, 0, -1}] // Flatten (* _Jean-François Alcover, Jan 15 2014 *)

Formula

G.f. of column k: (1-x+x^(k+1))/(1-3*x+2*x^2+x^(k+1)-x^(k+2)).

A242235 Number of length n+4+1 0..4 arrays with every value 0..4 appearing at least once in every consecutive 4+2 elements, and new values 0..4 introduced in order.

Original entry on oeis.org

15, 35, 71, 139, 271, 531, 1047, 2059, 4047, 7955, 15639, 30747, 60447, 118835, 233623, 459291, 902943, 1775139, 3489831, 6860827, 13488031, 26516771, 52130599, 102486059, 201482287, 396103747, 778719463, 1530922155, 3009713711
Offset: 1

Views

Author

R. H. Hardin, May 08 2014

Keywords

Examples

			Some solutions for n=5:
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  1  1  1  1  1  1  1  1  0  1  1  0  1  1  1
  1  2  2  2  2  0  2  0  0  1  2  2  1  2  2  2
  2  3  0  1  3  2  3  2  2  2  2  3  2  0  3  0
  3  2  3  3  4  3  0  3  3  3  3  4  3  3  0  3
  4  4  4  4  1  4  4  4  4  4  4  1  4  4  4  4
  1  0  1  0  0  1  1  0  0  2  0  0  0  0  1  2
  0  1  2  3  2  2  2  1  1  0  1  2  1  1  2  1
  4  3  3  2  2  0  3  1  3  1  2  4  2  2  3  0
  2  0  0  1  3  1  4  2  2  0  1  3  2  2  0  1
		

Crossrefs

Column 4 of A242239.

Formula

Empirical: a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5).
Conjecture: a(n) = 16*A145113(n-1) + A004767(n-2), n > 1. - R. J. Mathar, Aug 16 2017
Empirical g.f.: x*(15 + 20*x + 21*x^2 + 18*x^3 + 11*x^4) / (1 - x - x^2 - x^3 - x^4 - x^5). - Colin Barker, Oct 31 2018
Showing 1-2 of 2 results.