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

A242861 Triangle T(n,k) by rows: number of ways k dominoes can be placed on an n X n chessboard, k>=0.

Original entry on oeis.org

1, 1, 1, 4, 2, 1, 12, 44, 56, 18, 1, 24, 224, 1044, 2593, 3388, 2150, 552, 36, 1, 40, 686, 6632, 39979, 157000, 407620, 695848, 762180, 510752, 192672, 35104, 2180, 1, 60, 1622, 26172, 281514, 2135356, 11785382, 48145820, 146702793, 333518324, 562203148
Offset: 0

Views

Author

Ralf Stephan, May 24 2014

Keywords

Comments

Also, coefficients of the matching-generating polynomial of the n X n grid graph.
In the n-th row there are floor(n^2/2)+1 values.

Examples

			Triangle starts:
  1
  1
  1  4   2
  1 12  44   56    18
  1 24 224 1044  2593   3388   2150    552     36
  1 40 686 6632 39979 157000 407620 695848 762180 510752 192672 35104 2180
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, l) option remember; local k;
          if n=0 then 1
        elif min(l[])>0 then b(n-1, map(h->h-1, l))
        else for k while l[k]>0 do od; expand(`if`(n>1,
             x*b(n, subsop(k=2, l)), 0) +`if`(k (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$n])):
    seq(T(n), n=0..8); # Alois P. Heinz, Jun 01 2014
  • Mathematica
    b[n_, l_List] := b[n, l] =  Module[{k}, Which[n == 0, 1, Min[l]>0, b[n-1, l-1], True, For[k=1, l[[k]]>0, k++]; Expand[If[n>1, x*b[n, ReplacePart[l, k -> 2]], 0] + If[k 1, k + 1 -> 1}]], 0] + b[n, ReplacePart[l, k -> 1]]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, Array[0&, n]]]; Table[T[n], {n, 0, 8}] // Flatten (* Jean-François Alcover, Jun 16 2015, after Alois P. Heinz *)
  • Sage
    def T(n,k):
       G = Graph(graphs.Grid2dGraph(n,n))
       G.relabel()
       mu = G.matching_polynomial()
       return abs(mu[n^2-2*k])

Formula

T(n,1) = A046092(n-1), T(n,2) = A242856(n).
T(n,floor(n^2/2)) = A137308(n), T(2n,2n^2) = A004003(n).
sum(k>=0, T(n,k)) = A210662(n,n) = A028420(n).
T(n,3) = A243206(n), T(n,4) = A243215(n), T(n,5) = A243217(n), T(n,floor(n^2/4)) = A243221(n). - Alois P. Heinz, Jun 01 2014

A344679 Number of 2-matchings of the n-th centered square grid graph.

Original entry on oeis.org

0, 0, 86, 544, 1854, 4688, 9910, 18576, 31934, 51424, 78678, 115520, 163966, 226224, 304694, 401968, 520830, 664256, 835414, 1037664, 1274558, 1549840, 1867446, 2231504, 2646334, 3116448, 3646550, 4241536, 4906494, 5646704, 6467638, 7374960, 8374526, 9472384, 10674774
Offset: 1

Views

Author

Nicolas Bělohoubek, Aug 17 2021

Keywords

Comments

Number of ways two dominoes can be placed on an "other" Aztec Diamonds chessboard.

Examples

			For n=1 there is no way to place 2 dominoes in the centered square grid graphs, because they don't have enough space to be placed, so a(1)=0.
For n=2 there is no way to place 2 dominoes in the centered square grid graphs, because the first domino will cover the center square every time, so a(2)=0.
		

Crossrefs

Formula

a(n) = 2*(n-2)*(4n^3-8n^2+n+4) for n > 1.
From Stefano Spezia, Aug 17 2021: (Start)
G.f.: 2*x^3*(43 + 57*x - 3*x^2 - x^3)/(1 - x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n > 6. (End)

A348134 Number of ways two L-tiles (with rotation) can be placed on an n X n square.

Original entry on oeis.org

0, 0, 22, 336, 1422, 3952, 8790, 16992, 29806, 48672, 75222, 111280, 158862, 220176, 297622, 393792, 511470, 653632, 823446, 1024272, 1259662, 1533360, 1849302, 2211616, 2624622, 3092832, 3620950, 4213872, 4876686, 5614672, 6433302, 7338240, 8335342, 9430656
Offset: 1

Views

Author

Nicolas Bělohoubek, Oct 02 2021

Keywords

Comments

All terms are even, because groups of ways, which are connected by 90 degrees rotation symmetry, are made up from 4 or 2 ways, so the number of ways will be some 4m+2n, and 4m+2n is even.

Examples

			For a(1) and a(2) there are fewer squares on the main square then squares of the 2 L-tiles, so a(1) = a(2) = 0.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,-10,10,-5,1},{0,0,22,336,1422,3952},40] (* Harvey P. Dale, Mar 04 2023 *)

Formula

a(n) = 2*(n - 2)*(4*n^3 - 8*n^2 - 19*n + 32) for n > 1.
G.f.: 2*x^3*(11 + 113*x - 19*x^2 - 9*x^3)/(1 - x)^5. - Stefano Spezia, Oct 03 2021
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Wesley Ivan Hurt, Aug 05 2025

A372855 Number of ways two dihexes can be placed on an n-th regular hexagonal board.

Original entry on oeis.org

0, 33, 702, 3630, 11409, 27603, 56748, 104352, 176895, 281829, 427578, 623538, 880077, 1208535, 1621224, 2131428, 2753403, 3502377, 4394550, 5447094, 6678153, 8106843, 9753252, 11638440, 13784439, 16214253, 18951858, 22022202, 25451205, 29265759, 33493728
Offset: 1

Views

Author

Nicolas Bělohoubek, May 15 2024

Keywords

Examples

			Regular hexagonal boards n = 1...4:
. ___
./   \
.\___/
.     ___
. ___/   \___
./   \___/   \
.\___/   \___/
./   \___/   \
.\___/   \___/
.    \___/
.         ___
.     ___/   \___
. ___/   \___/   \___
./   \___/   \___/   \
.\___/   \___/   \___/
./   \___/   \___/   \
.\___/   \___/   \___/
./   \___/   \___/   \
.\___/   \___/   \___/
.    \___/   \___/
.        \___/
.             ___
.         ___/   \___
.     ___/   \___/   \___
. ___/   \___/   \___/   \___
./   \___/   \___/   \___/   \
.\___/   \___/   \___/   \___/
./   \___/   \___/   \___/   \
.\___/   \___/   \___/   \___/
./   \___/   \___/   \___/   \
.\___/   \___/   \___/   \___/
./   \___/   \___/   \___/   \
.\___/   \___/   \___/   \___/
.    \___/   \___/   \___/
.        \___/   \___/
.            \___/
For n = 2 the a(2) = 33: (without grid)
. . . . . . . . . . . . . . . . . . .
.   x---x   .   x---x   .   x---x   .
.           .           .           .
. x---x   o . o   x---x . o   o   o .
.           .           .           .
.   o   o   .   o   o   .   x---x   .
. . . . . . . . . . . . . . . . . . .
.   x---x   .   x---x   .   x---x   .
.           .           .           .
. x   o   o . o   x   o . o   x   o .
.  \        .      \    .    /      .
.   x   o   .   o   x   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   x---x   .   o   o   .   o   x   .
.           .           .        \  .
. o   o   x . x---x   o . x---x   x .
.        /  .           .           .
.   o   x   .   x---x   .   o   o   .
. . . . . . . . . . . . . . . . . . .
.   o   o   .   o   o   .   o   o   .
.           .           .           .
. x---x   x . o   x---x . x   x---x .
.        /  .           .  \        .
.   o   x   .   x---x   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   x   o   .   o   x   .
.  /        .    \      .        \  .
. x   x---x . o   x   o . o   o   x .
.           .           .           .
.   o   o   .   x---x   .   x---x   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   o   x   .   x   x   .
.  /        .      /    .    \   \  .
. x   o   o . o   x   o . o   x   x .
.           .           .           .
.   x---x   .   x---x   .   o   o   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   x   o   .   o   x   .
.    \      .    \      .        \  .
. x   x   o . o   x   x . x   o   x .
.  \        .        /  .  \        .
.   x   o   .   o   x   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   o   x   .   x   x   .   o   x   .
.        \  .  /     \  .        \  .
. o   x   x . x   o   x . o   x   x .
.      \    .           .    /      .
.   o   x   .   o   o   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   o   o   .   o   x   .   o   o   .
.           .      /    .           .
. x   x   o . x   x   o . x   o   x .
.  \   \    .  \        .  \     /  .
.   x   x   .   x   o   .   x   x   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   x   x   .   x   o   .
.  /        .  /   /    .  /        .
. x   x   o . x   x   o . x   x   o .
.      \    .           .    /      .
.   o   x   .   o   o   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   o   x   .   o   o   .
.  /        .      /    .           .
. x   o   x . o   x   x . o   x   x .
.        /  .        /  .    /   /  .
.   o   x   .   o   x   .   x   x   .
. . . . . . . . . . . . . . . . . . .
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5, -10, 10, -5, 1}, {0, 33, 702, 3630, 11409, 27603}, 50] (* Paolo Xausa, Aug 28 2024 *)

Formula

a(n) = (3/2)*(27*n^4 - 90*n^3 + 78*n^2 + 11*n - 24), for n > 1.
a(n) = 5*a(n - 1) - 10*a(n - 2) + 10*a(n - 3) - 5*a(n - 4) + a(n - 5) for n > 6.
G.f.: 3*x^2*(11 + 179*x + 150*x^2 - 17*x^3 + x^4)/(1 - x)^5.
E.g.f.: 36 - 3*x + 3*exp(x)*(27*x^4 + 72*x^3 - 3*x^2 + 26*x - 24)/2. - Stefano Spezia, Jun 04 2024

A242983 n/2 * (n^3 - 2*n^2 - 2*n + 5).

Original entry on oeis.org

0, 1, 1, 12, 58, 175, 411, 826, 1492, 2493, 3925, 5896, 8526, 11947, 16303, 21750, 28456, 36601, 46377, 57988, 71650, 87591, 106051, 127282, 151548, 179125, 210301, 245376, 284662, 328483, 377175, 431086, 490576, 556017
Offset: 0

Views

Author

Ralf Stephan, Jun 09 2014

Keywords

Comments

For n>1, number of ways to place two dominoes horizontally on an n X n chessboard.

Crossrefs

Programs

  • Mathematica
    Table[n/2 (n^3-2n^2-2n+5),{n,0,40}] (* or *) LinearRecurrence[{5,-10,10,-5,1},{0,1,1,12,58},40] (* Harvey P. Dale, Jul 19 2018 *)

Formula

a(n) = A019582(n) + A077414(n-2), n>1.
G.f.: x*(-2*x^3 + 17*x^2 - 4*x + 1) / (1-x)^5.
Showing 1-5 of 5 results.