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-7 of 7 results.

A006506 Number of n X n binary matrices with no 2 adjacent 1's, or number of configurations of non-attacking princes on an n X n board, where a "prince" attacks the four adjacent (non-diagonal) squares. Also number of independent vertex sets in an n X n grid.

Original entry on oeis.org

1, 2, 7, 63, 1234, 55447, 5598861, 1280128950, 660647962955, 770548397261707, 2030049051145980050, 12083401651433651945979, 162481813349792588536582997, 4935961285224791538367780371090, 338752110195939290445247645371206783, 52521741712869136440040654451875316861275
Offset: 0

Views

Author

Keywords

Comments

A two-dimensional generalization of the Fibonacci numbers.
Also the number of vertex covers in the n X n grid graph P_n X P_n.
A181030 (Number of n X n binary matrices with no leading bitstring in any row or column divisible by 4) is the same sequence. Proof from Steve Butler, Jan 26 2015: This is trivially true. A181030 is equivalent to this sequence by interchanging the roles of 0 and 1. In particular, A181030 looks for binary matrices with no leading bitstring divisible by 4, but a bitstring is divisible by 4 if and only if its last two digits is 0; in a binary matrix this can only be avoided if there are no two adjacent 0's (i.e., for any two adjacent 0's take the bitstring starting in that row or column and we are done); the present sequence looks for no two adjacent 1's. Similar reasons show that the array A181031 is equivalent to the array A089980.
Let R(n) be the set of squares that have vertices at integer coordinates and lie in the region of the plane |x|+|y| <= n+1, and let S(n) be the set of squares that have vertices at integer coordinates and lie in the region of the plane |x|+|y-1/2| <= n+2. Further let T be the collection of rectangular tiles with dimensions i X 1 or 1 X i with i arbitrary. Then a(2n) is the number of ways to tile R(n) using tiles from T and a(2n+1) is the number of ways to tile S(n) using tiles from T. (Note R(n) is the Aztec diamond of order n.) - Steve Butler, Jan 26 2015

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 342-349.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A027683 for toroidal version.
Table of values for n x m matrices: A089934.
Cf. A232833 for refinement by number of 1's.
Cf. also A191779.

Programs

  • Maple
    A006506 := proc(N) local i,j,p,q; p := 1+x11;
    if n=0 then return 1 fi;
    for i from 2 to N do
       q := p-select(has,p,x||(i-1)||1);
       p := p+expand(q*x||i||1)
    od;
    for j from 2 to N do
       q := p-select(has,p,x1||(j-1));
       p := subs(x1||(j-1)=1,p)+expand(q*x1||j);
       for i from 2 to N do
          q := p-select(has,p,{x||(i-1)||j,x||i||(j-1)});
          p := subs(x||i||(j-1)=1,p)+expand(q*x||i||j);
       od
    od;
    map(icontent,p)
    end:
    seq(A006506(n), n=0..15);
  • Mathematica
    a[n_] := a[n] = (p = 1 + x[1, 1]; Do[q = p - Select[p, ! FreeQ[#, x[i-1, 1]] &]; p = p + Expand[q*x[i, 1]], {i, 2, n}]; Do[q = p - Select[p, ! FreeQ[#, x[1, j-1]] &]; p = (p /. x[i, j-1] :> 1) + Expand[q*x[1, j]]; Do[q = p - Select[ p, ! FreeQ[#, x[i-1, j]] || ! FreeQ[#, x[i, j-1]] &]; p = (p /. x[i, j-1] :> 1) + Expand[q*x[i, j]], {i, 2, n}], {j, 2, n}]; p /. x[, ] -> 1); a /@ Range[14] (* Jean-François Alcover, May 25 2011, after Maple prog. *)
    Table[With[{g = GridGraph[{n, n}]}, Count[Subsets[Range[n^2], Length @ First @ FindIndependentVertexSet[g]], ?(IndependentVertexSetQ[g, #] &)]], {n, 5}] (* _Eric W. Weisstein, May 28 2017 *)
  • PARI
    a(n)=L=fibonacci(n+2);p=v=vector(L,i,1);c=0; for(i=0,2^n-1,j=i;while(j&&j%4<3,j\=2);if(j%4<3,p[c++]=i)); for(i=2,n,w=vector(L,j,0); for(j=1,L, for(k=1,L,if(bitand(p[j],p[k])==0,w[j]+=v[k])));v=w); sum(i=1,L,v[i]) \\ Robert Gerbicz, Jun 17 2011

Formula

Limit_{n->oo} a(n)^(1/n^2) = c1 = 1.50304... is the hard square entropy constant A085850. - Benoit Cloitre, Nov 16 2003
a(n) appears to behave like A * c3^n * c1^(n^2) where c1 is as above, c3 = 1.143519129587 approximately, A = 1.0660826 approximately. This is based on numerical analysis of a(n) for n up to 19. - Brendan McKay, Nov 16 2003
From n up to 39 we have A = 1.06608266035... - Vaclav Kotesovec, Jan 29 2024

Extensions

Sequence extended by Paul Zimmermann, Mar 15 1996
Maple program updated and sequence extended by Robert Israel, Jun 16 2011
a(0)=1 prepended by Alois P. Heinz, Jan 29 2024

A089980 Array read by antidiagonals: T(n,m) = number of independent sets in the grid graph P_n X P_m.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 7, 5, 1, 1, 8, 17, 17, 8, 1, 1, 13, 41, 63, 41, 13, 1, 1, 21, 99, 227, 227, 99, 21, 1, 1, 34, 239, 827, 1234, 827, 239, 34, 1, 1, 55, 577, 2999, 6743, 6743, 2999, 577, 55, 1, 1, 89, 1393, 10897, 36787, 55447, 36787, 10897, 1393, 89, 1
Offset: 0

Views

Author

Mitch Harris, Nov 17 2003

Keywords

Comments

This table is indexed starting at 0. The table in A089934 is 1 based.
A181031 is essentially the same array (see the Comments by Steve Butler in A006506). - N. J. A. Sloane, Jan 27 2015

Examples

			Square array T(n,m) begins:
  1,  1,  1,   1,    1,     1, ...
  1,  2,  3,   5,    8,    13, ...
  1,  3,  7,  17,   41,    99, ...
  1,  5, 17,  63,  227,   827, ...
  1,  8, 41, 227, 1234,  6743, ...
  1, 13, 99, 827, 6743, 55447, ...
		

Crossrefs

Main entry: A089934.
Main diagonal gives A006506.
Cf. A181031.

A181030 Duplicate of A006506.

Original entry on oeis.org

1, 2, 7, 63, 1234, 55447, 5598861, 1280128950, 660647962955, 770548397261707, 2030049051145980050, 12083401651433651945979, 162481813349792588536582997, 4935961285224791538367780371090, 338752110195939290445247645371206783
Offset: 1

Views

Author

Keywords

Crossrefs

Diagonal of A181031.

Formula

Conjecture: a(n) = A006506(n-1), n>1. - R. J. Mathar, Oct 02 2010

A181032 Number of nX(n+1) binary matrices with no initial bit string in any row or column divisible by 4.

Original entry on oeis.org

1, 3, 17, 227, 6743, 454385, 69050253, 23720149995, 18403310404291, 32260116141540213, 127750070550172845235, 1142905840646183024996181, 23099457587377397021217958619, 1054727887880873003123899368746005
Offset: 1

Views

Author

R. H. Hardin Sep 30 2010

Keywords

Comments

Superdiagonal 1 of A181031

Examples

			Some solutions for 4X5
..1..1..1..1..1....1..1..1..1..1....1..1..1..1..1....1..1..1..1..1
..1..0..1..0..1....1..0..1..0..1....1..0..1..0..1....1..0..1..0..1
..1..1..0..1..0....1..1..0..1..0....1..1..0..1..0....1..1..0..1..0
..1..0..1..0..1....1..0..1..1..1....1..1..1..0..1....1..1..1..1..1
		

A181033 Number of nX(n+2) binary matrices with no initial bit string in any row or column divisible by 4.

Original entry on oeis.org

1, 5, 41, 827, 36787, 3729091, 851302029, 439621976195, 512615852515459, 1350668111471923517, 8039144604242883698707, 108102244692016476122031505, 3283958267007000189206675439393, 225377046019121585326666765445484971
Offset: 1

Views

Author

R. H. Hardin Sep 30 2010

Keywords

Comments

Superdiagonal 2 of A181031

Examples

			Some solutions for 4X6
..1..1..1..1..1..1....1..1..1..1..1..1....1..1..1..1..1..1....1..1..1..1..1..1
..1..0..1..0..1..0....1..0..1..0..1..0....1..0..1..0..1..0....1..0..1..0..1..0
..1..1..0..1..0..1....1..1..0..1..0..1....1..1..0..1..0..1....1..1..0..1..0..1
..1..0..1..0..1..0....1..0..1..0..1..1....1..0..1..1..1..0....1..0..1..1..1..1
		

A181034 Number of nX(n+3) binary matrices with no initial bit string in any row or column divisible by 4.

Original entry on oeis.org

1, 8, 99, 2999, 200798, 30584687, 10496827403, 8147000813446, 14279081380626859, 56548869471250924613, 505895767712482884973116, 10224865987802162338842130221, 466867871514396686081152537710131
Offset: 1

Views

Author

R. H. Hardin Sep 30 2010

Keywords

Comments

Superdiagonal 3 of A181031

Examples

			Some solutions for 4X7
..1..1..1..1..1..1..1....1..1..1..1..1..1..1....1..1..1..1..1..1..1
..1..0..1..0..1..0..1....1..0..1..0..1..0..1....1..0..1..0..1..0..1
..1..1..0..1..0..1..0....1..1..0..1..0..1..0....1..1..0..1..0..1..0
..1..0..1..0..1..0..1....1..0..1..0..1..1..1....1..0..1..1..1..0..1
		

A181035 Number of nX(n+4) binary matrices with no initial bit string in any row or column divisible by 4.

Original entry on oeis.org

1, 13, 239, 10897, 1095851, 250916131, 129422885699, 150985649174085, 397743903151933881, 2367568471466798904283, 31835463913062005686452609, 967121732734103600475330208107, 66372797708066134019183673485369717
Offset: 1

Views

Author

R. H. Hardin Sep 30 2010

Keywords

Comments

Superdiagonal 4 of A181031

Examples

			Some solutions for 4X8
..1..1..1..1..1..1..1..1....1..1..1..1..1..1..1..1....1..1..1..1..1..1..1..1
..1..0..1..0..1..0..1..0....1..0..1..0..1..0..1..0....1..0..1..0..1..0..1..0
..1..1..0..1..0..1..0..1....1..1..0..1..0..1..0..1....1..1..0..1..0..1..0..1
..1..0..1..0..1..0..1..0....1..0..1..0..1..0..1..1....1..0..1..0..1..1..1..0
		
Showing 1-7 of 7 results.