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-10 of 12 results. Next

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

A172225 Number of ways to place 2 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 2, 24, 96, 260, 570, 1092, 1904, 3096, 4770, 7040, 10032, 13884, 18746, 24780, 32160, 41072, 51714, 64296, 79040, 96180, 115962, 138644, 164496, 193800, 226850, 263952, 305424, 351596, 402810, 459420, 521792, 590304
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

A wazir is a (fairy chess) leaper [0,1].

References

  • Christian Poisson, Echecs et mathematiques, Rex Multiplex 29/1990, p. 829.

Crossrefs

Programs

  • Magma
    I:=[0, 2, 24, 96, 260]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Magma
    [n*(n-1)*(n^2+n-4)/2: n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
  • Mathematica
    Table[n (n - 1) (n^2 + n - 4) / 2, {n, 40}] (* Vincenzo Librandi, Apr 30 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,2,24,96,260},40] (* Harvey P. Dale, Jun 04 2023 *)

Formula

Explicit formula (Christian Poisson, 1990): a(n) = n*(n-1)*(n^2+n-4)/2.
G.f.: 2*x^2*(2*x^2-7*x-1)/(x-1)^5. - Vaclav Kotesovec, Mar 25 2010
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Vincenzo Librandi, Apr 30 2013
a(n) = 2*A239352(n). - R. J. Mathar, Jan 09 2018
a(n) = A232833(n,2). - R. J. Mathar, Apr 11 2024

A201511 Number of ways to place n nonattacking wazirs on an n X n board.

Original entry on oeis.org

1, 1, 2, 22, 405, 10741, 368868, 15516804, 771464278, 44218721793, 2868879752822, 207739939478618, 16602826428818482, 1451305771147909684, 137715836041691050398, 14096224186664736126206, 1547966111897855935957132, 181519663430661533452513680, 22636566614411901986006002896
Offset: 0

Views

Author

Vaclav Kotesovec, Dec 02 2011

Keywords

Comments

Wazir is a leaper [0,1].

Crossrefs

Formula

Asymptotics (Vaclav Kotesovec, Nov 29 2011): a(n) ~ n^(2n)/n!*exp(-5/2).

Extensions

a(19)-a(20) from Vaclav Kotesovec, Aug 30 2016
a(0)=1 prepended by Alois P. Heinz, Apr 16 2024

A172226 Number of ways to place 3 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 22, 276, 1474, 5248, 14690, 35012, 74326, 144544, 262398, 450580, 739002, 1166176, 1780714, 2642948, 3826670, 5420992, 7532326, 10286484, 13830898, 18336960, 24002482, 31054276, 39750854, 50385248, 63287950
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

A wazir is a (fairy chess) leaper [0,1].

Crossrefs

Programs

  • Magma
    I:=[0, 0, 22, 276, 1474, 5248, 14690, 35012]; [n le 8 select I[n] else 7*Self(n-1)-21*Self(n-2)+35*Self(n-3)-35*Self(n-4)+21*Self(n-5)-7*Self(n-6)+Self(n-7): n in [1..40]]; // Vincenzo Librandi, Apr 30 2013
    
  • Magma
    [0] cat [(n-2)*(n^5+2*n^4-11*n^3-10*n^2+42*n-12)/6: n in [2..30]]; // Vincenzo Librandi, Apr 30 2013
  • Maple
    A172226:=n->`if`(n=1, 0, (n-2)*(n^5 + 2*n^4 - 11*n^3 - 10*n^2 + 42*n - 12)/6); seq(A172226(n), n=1..60); # Wesley Ivan Hurt, Feb 06 2014
  • Mathematica
    CoefficientList[Series[2 x^2 (x^5 - 9 x^4 + 22 x^3 - 2  x^2 - 61 x - 11) / (x-1)^7, {x, 0, 60}], x] (* Vincenzo Librandi, Apr 30 2013 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,0,22,276,1474,5248,14690,35012},30] (* Harvey P. Dale, Apr 08 2022 *)

Formula

a(n) = (n-2)*(n^5 + 2*n^4 - 11*n^3 - 10*n^2 + 42*n - 12)/6, n>=2.
G.f.: 2*x^3*(x^5-9*x^4+22*x^3-2*x^2-61*x-11)/(x-1)^7. - Vaclav Kotesovec, Mar 25 2010
a(n) = 7*a(n-1)-21*a(n-2)+35*a(n-3)-35*a(n-4)+21*a(n-5)-7*a(n-6)+a(n-7). - Vincenzo Librandi, Apr 30 2013
a(n) = A232833(n,3). - R. J. Mathar, Apr 11 2024

A172227 Number of ways to place 4 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 6, 405, 5024, 31320, 133544, 446421, 1258590, 3126724, 7042930, 14669709, 28658436, 53069000, 93909924, 159819965, 262913874, 419816676, 652912510, 991835749, 1475233800, 2152832664, 3087838016, 4359706245, 6067321574, 8332617060, 11304678954
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

A wazir is a (fairy chess) leaper [0,1].

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- x^2 (4 x^8 - 26 x^7 + 3 x^6 + 303 x^5 - 736 x^4 + 180 x^3 + 1595 x^2 + 351 x + 6) / (x - 1)^9, {x, 0, 50}], x] (* Vincenzo Librandi, May 28 2013 *)

Formula

a(n) = (n^8-30n^6+24n^5+323n^4-504n^3-1110n^2+2760n-1224)/24, n>=3.
G.f.: -x^3*(4*x^8-26*x^7+3*x^6+303*x^5-736*x^4+180*x^3+1595*x^2+351*x+6)/(x-1)^9. - Vaclav Kotesovec, Apr 29 2011
a(n) = A232833(n,4). - R. J. Mathar, Apr 11 2024

Extensions

Corrected a(3) and g.f., Vaclav Kotesovec, Apr 29 2011

A172228 Number of ways to place 5 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 1, 304, 10741, 127960, 870589, 4197456, 16005187, 51439096, 145085447, 369074128, 863338777, 1883786680, 3875953561, 7583888944, 14206566327, 25617069208, 44663199283, 75572017136, 124485188701, 200156902936, 314851577749, 485484612496, 735056106571, 1094434774968
Offset: 1

Views

Author

Vaclav Kotesovec, Jan 29 2010

Keywords

Comments

Wazir is a (fairy chess) leaper [0,1].

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^2 (6 x^11 - 26 x^10 - 93 x^9 + 527 x^8 + 490 x^7 - 6710 x^6 + 13630 x^5 - 3954 x^4 - 26364 x^3 - 7452 x^2 - 293 x - 1) / (x - 1)^11, {x, 0, 50}], x] (* Vincenzo Librandi, May 28 2013 *)

Formula

a(n) = (n^10-50n^8+40n^7+995n^6-1560n^5-8890n^4+21080n^3+24264n^2-97440n+59520)/120, n>=4.
For any fixed value of k > 1, a(n) = n^(2k)/k! - 5/2/(k-2)!*n^(2k-2) + ...
G.f.: x^3 * (6*x^11 -26*x^10 -93*x^9 +527*x^8 +490*x^7 -6710*x^6 +13630*x^5 -3954*x^4 -26364*x^3 -7452*x^2 -293*x -1) / (x-1)^11. - Vaclav Kotesovec, Apr 29 2011
a(n) = A232833(n,5). - R. J. Mathar, Apr 11 2024

Extensions

Corrected a(4) and g.f., Vaclav Kotesovec, Apr 29 2011.
More terms from Vincenzo Librandi, May 28 2013

A178409 Number of ways to place 6 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 0, 114, 14650, 368868, 4216498, 30222074, 158918030, 669582340, 2387463550, 7470004954, 21036576578, 54315955588, 130382565930, 294116445082, 628800849110, 1282821452132, 2511317339446, 4739431178170
Offset: 1

Views

Author

Vaclav Kotesovec, May 27 2010

Keywords

Comments

Wazir is a (fairy chess) leaper [0,1].

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[- 2 x^3 (4 x^13 - 17 x^12 + 3 x^11 - 469 x^10 + 4084 x^9 - 10233 x^8 - 3482 x^7 + 66494 x^6 - 125152 x^5 + 35457 x^4 + 265655 x^3 + 93655 x^2 + 6584 x + 57) / (x - 1)^13, {x, 0, 50}], x] (* Vincenzo Librandi, May 31 2013 *)

Formula

Explicit formula: a(n) = 1/720 * (n^12 -75*n^10 +60*n^9 +2365*n^8 -3720*n^7 -38085*n^6 +89580*n^5 +292834*n^4 -984960*n^3 -552240*n^2 +4128960*n -3160800), n >= 5.
G.f.: -2*x^4 * (4*x^13 -17*x^12 +3*x^11 -469*x^10 +4084*x^9 -10233*x^8 -3482*x^7 +66494*x^6 -125152*x^5 +35457*x^4 +265655*x^3 +93655*x^2 +6584*x +57)/(x-1)^13.
a(n) = A232833(n,6). - R. J. Mathar, Apr 11 2024

A371967 Irregular triangle T(r,w) read by rows: number of ways of placing w non-attacking wazirs on a 3 X r board.

Original entry on oeis.org

1, 1, 3, 1, 1, 6, 8, 2, 1, 9, 24, 22, 6, 1, 1, 12, 49, 84, 61, 18, 2, 1, 15, 83, 215, 276, 174, 53, 9, 1, 1, 18, 126, 442, 840, 880, 504, 158, 28, 2, 1, 21, 178, 792, 2023, 3063, 2763, 1478, 472, 93, 12, 1, 1, 24, 239, 1292, 4176, 8406, 10692, 8604, 4374, 1416, 297, 38, 2, 1, 27, 309
Offset: 0

Views

Author

R. J. Mathar, Apr 14 2024

Keywords

Examples

			The triangle starts with r>=0 rows and w>=0 wazirs as
  1 ;
  1 3 1 ;
  1 6 8 2  ;
  1 9 24 22 6 1 ;
  1 12 49 84 61 18 2  ;
  1 15 83 215 276 174 53 9 1 ;
  1 18 126 442 840 880 504 158 28 2  ;
  1 21 178 792 2023 3063 2763 1478 472 93 12 1 ;
  1 24 239 1292 4176 8406 10692 8604 4374 1416 297 38 2  ;
  1 27 309 1969 7731 19591 32716 36257 26674 13035 4264 945 142 15 1 ;
  ...
		

Crossrefs

Cf. A051736 (row sums), A035607 (on 2Xr board), A011973 (on 1Xr board), A232833 (on rXr board).
T(n,n) gives A371978.
Row maxima give A371979.
Cf. A007494.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, 1,
          add(`if`(Bits[And](j, l)>0, 0, expand(b(n-1, j)*
          x^add(i, i=Bits[Split](j)))), j=[0, 1, 2, 4, 5]))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Apr 14 2024
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, 1, Sum[If[BitAnd[j, l] > 0, 0, Expand[b[n - 1, j]*x^DigitCount[j, 2, 1]]], {j, {0, 1, 2, 4, 5}}]];
    T[n_] := CoefficientList[b[n, 0], x];
    Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Jun 05 2024, after Alois P. Heinz *)

Formula

T(r,0) = 1.
T(r,1) = 3*r.
T(r,2) = A064225(r-1).
T(r,3) = A172229(r).
T(r,4) = 27*r^4/8 -117*r^3/4 +829*r^2/8 -715*r/4 +126. [Siehler Table 3]
T(3,w) = A232833(3,w).
G.f.: (1+x*y) *(1 +x*y +x*y^2 -x^2*y^3)/(1 -x -x*y -x^2*y^3 -2*x^2*y -3*x^2*y^2 -x^3*y^2 +x^3*y^4 +x^4*y^4). - R. J. Mathar, Apr 21 2024

A232569 Triangle T(n, k) = number of non-equivalent (mod D_4) binary n X n matrices with k pairwise not adjacent 1's; k=0,...,n^2.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 0, 1, 3, 6, 6, 3, 1, 0, 0, 0, 0, 1, 3, 17, 40, 62, 45, 20, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 43, 210, 683, 1425, 1936, 1696, 977, 366, 101, 21, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 84, 681, 4015, 16149, 46472, 95838, 143657
Offset: 1

Views

Author

Heinrich Ludwig, Nov 29 2013

Keywords

Comments

Also number of non-equivalent ways to place k non-attacking wazirs on an n X n board.
Two matrix elements are considered adjacent, if the difference of their row indices is 1 and the column indices are equal, or vice versa (von Neumann neighborhood).
Counted for this sequence are equivalence classes induced by the dihedral group D_4. If equivalent matrices are being destinguished, the corresponding numbers are A232833(n).
Row index starts from n = 1, column index k ranges from 0 to n^2.
T(n, 1) = A008805(n-1); T(n, 2) = A232567(n) for n >= 2; T(n, 3) = A232568(n) for n >= 2;
Into an n X n binary matrix there can be placed maximally A000982(n) = ceiling(n^2/2) pairwise not adjacent 1's.

Examples

			Triangle begins:
1,1;
1,1,1,0,0;
1,3,6,6,3,1,0,0,0,0;
1,3,17,40,62,45,20,4,1,0,0,0,0,0,0,0,0;
1,6,43,210,683,1425,1936,1696,977,366,101,21,5,1,0,0,0,0,0,0,0,0,0,0,0,0;
...
There are T(3, 2) = 6 non-equivalent binary 3 X 3 matrices with 2 not adjacent 1's (and no other 1's):
  [1 0 0]   [0 1 0]   [1 0 0]   [0 1 0]   [1 0 1]   [1 0 0]
  |0 0 0|   |0 0 0|   |0 1 0|   |1 0 0|   |0 0 0|   |0 0 1|
  [0 0 1]   [0 1 0]   [0 0 0]   [0 0 0]   [0 0 0]   [0 0 0]
		

Crossrefs

A201507 Number of ways to place 7 nonattacking wazirs on an n X n board.

Original entry on oeis.org

0, 0, 0, 20, 12798, 763144, 15516804, 170842828, 1264750240, 7084450248, 32251861624, 125030824732, 426265242412, 1308045124808, 3675893768908, 9586626461484, 23445303141400, 54219244028296, 119372323892736, 251614892723068, 510130577706724, 998740710435208
Offset: 1

Views

Author

Vaclav Kotesovec, Dec 02 2011

Keywords

Comments

Wazir is a leaper [0,1].

Crossrefs

Formula

Explicit formula: n^14/5040 - n^12/48 + n^11/60 + 137*n^10/144 - 3*n^9/2 - 1139*n^8/48 + 223*n^7/4 + 59293*n^6/180 - 3191*n^5/3 - 8719*n^4/4 + 51737*n^3/5 + 10914*n^2/7 - 40708*n + 37228, n>=6.
G.f.: 2*x^4*(5*x^16 - 31*x^15 + 193*x^14 - 1683*x^13 + 5093*x^12 + 12431*x^11 - 111239*x^10 + 214181*x^9 + 187845*x^8 - 1518841*x^7 + 2546483*x^6 - 775465*x^5 - 6212549*x^4 - 2702167*x^3 - 286637*x^2 - 6249*x - 10)/(x-1)^15.
a(n) = A232833(n,7). - R. J. Mathar, Apr 11 2024
Showing 1-10 of 12 results. Next