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 13 results. Next

A052980 Expansion of (1 - x)/(1 - 2*x - x^3).

Original entry on oeis.org

1, 1, 2, 5, 11, 24, 53, 117, 258, 569, 1255, 2768, 6105, 13465, 29698, 65501, 144467, 318632, 702765, 1549997, 3418626, 7540017, 16630031, 36678688, 80897393, 178424817, 393528322, 867954037, 1914332891, 4222194104, 9312342245, 20539017381, 45300228866
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

a(n) counts permutations of length n which embed into the (infinite) increasing oscillating sequence given by 4,1,6,3,8,5,...,2k+2,2k-1,...; these are also the permutations which avoid {321, 2341, 3412, 4123}. - Vincent Vatter, May 23 2008
a(n) is the top left entry of the n-th power of any of the 3X3 matrices [1, 1, 0; 1, 1, 1; 1, 0, 0] or [1, 1, 1; 1, 1, 0; 0, 1, 0] or [1, 1, 1; 0, 0, 1; 1, 0, 1] or [1, 0, 1; 1, 0, 0; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
a(n) is the number of possible tilings of a 2 X n board, using dominoes and L-shaped trominoes. - Michael Tulskikh, Aug 21 2019
a(n) = A190512(n-1) for n>0. - Greg Dresden, Feb 28 2020

References

  • Kenneth Edwards and Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.

Crossrefs

See A190512 and A110513 for other versions of this sequence.
Column k=2 of A219987.
Cf. A008998.

Programs

  • Magma
    I:=[1,1,2]; [n le 3 select I[n] else 2*Self(n-1)+Self(n-3): n in [1..40]];
    
  • Magma
    R:=PowerSeriesRing(Integers(), 32); Coefficients(R!( (1 - x)/(1 - 2*x - x^3))); // Marius A. Burtea, Feb 14 2020
  • Maple
    spec := [S,{S=Sequence(Prod(Union(Prod(Z,Z,Z),Z),Sequence(Z)))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
  • Mathematica
    CoefficientList[Series[(1 - x)/(1 - 2 x - x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 05 2014 *)
  • PARI
    Vec((1-x)/(1-2*x-x^3)+O(x^99)) \\ Charles R Greathouse IV, Nov 20 2011
    

Formula

Recurrence: a(0)=1, a(1)=1, a(2)=2; thereafter a(n) = 2*a(n-1)+a(n-3).
a(n) = Sum(1/59*(4+3*_alpha^2+17*_alpha)*_alpha^(-1-n), _alpha = RootOf(-1+2*_Z+_Z^3)).
a(n) = A008998(n) - A008998(n-1). - R. J. Mathar, Feb 04 2014
Let u1 = 2.20556943... denote the real root of x^3-2*x^2-1. There is an explicit constant c1 = 0.460719842... such that for n>0, a(n) = nearest integer to c1*u1^n. - N. J. A. Sloane, Nov 07 2016
a(2n) = a(n)^2 - a(n-1)^2 + (1/2)*(a(n+2) - a(n+1) - a(n))^2. - Greg Dresden and Michael Tulskikh, Aug 20 2019
a(n) = 2^(n-1) + Sum_{i=3..n}(2^(n-i)*a(i-3)). - Greg Dresden, Aug 27 2019
a(n+1) = (Sum_{i >= 0} 2^(n-3i-2)*(4*binomial(n-2i, i) + binomial(n-2i-2, i))). - Michael Tulskikh, Feb 14 2020
a(n) = A008998(n-1) + A008998(n-3). - Michael Tulskikh, Feb 14 2020

A219866 Number A(n,k) of tilings of a k X n rectangle using dominoes and straight (3 X 1) trominoes; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 4, 4, 1, 1, 1, 2, 7, 14, 7, 2, 1, 1, 2, 15, 41, 41, 15, 2, 1, 1, 3, 30, 143, 184, 143, 30, 3, 1, 1, 4, 60, 472, 1069, 1069, 472, 60, 4, 1, 1, 5, 123, 1562, 5624, 9612, 5624, 1562, 123, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Nov 30 2012

Keywords

Examples

			A(2,3) = A(3,2) = 4, because there are 4 tilings of a 3 X 2 rectangle using dominoes and straight (3 X 1) trominoes:
  .___.   .___.   .___.   .___.
  | | |   |___|   | | |   |___|
  | | |   |___|   |_|_|   | | |
  |_|_|   |___|   |___|   |_|_|
Square array A(n,k) begins:
  1,  1,  1,    1,     1,      1,        1,         1, ...
  1,  0,  1,    1,     1,      2,        2,         3, ...
  1,  1,  2,    4,     7,     15,       30,        60, ...
  1,  1,  4,   14,    41,    143,      472,      1562, ...
  1,  1,  7,   41,   184,   1069,     5624,     29907, ...
  1,  2, 15,  143,  1069,   9612,    82634,    707903, ...
  1,  2, 30,  472,  5624,  82634,  1143834,  15859323, ...
  1,  3, 60, 1562, 29907, 707903, 15859323, 354859954, ...
		

Crossrefs

Columns (or rows) k=0-10 give: A000012, A000931(n+3), A129682, A219867, A219862, A219868, A219869, A219870, A219871, A219872, A219873.
Main diagonal gives: A219874.

Programs

  • Maple
    b:= proc(n, l) option remember; local k, t;
          if max(l[])>n then 0 elif n=0 or l=[] then 1
        elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
        else for k do if l[k]=0 then break fi od;
             b(n, subsop(k=3, l))+ b(n, subsop(k=2, l))+
             `if`(k `if`(n>=k, b(n, [0$k]), b(k, [0$n])):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    b[n_, l_] := b[n, l] = Module[{k, t}, If [Max[l] > n, 0, If[ n == 0 || l == {}, 1, If[Min[l] > 0, t = Min[l]; b[n-t, l-t], k = Position[l, 0, 1][[1, 1]]; b[n, ReplacePart[l, k -> 3]] + b[n, ReplacePart[l, k -> 2]] + If[k < Length[l] && l[[k+1]] == 0, b[n, ReplacePart[l, {k -> 1, k+1 -> 1}]], 0] + If[k+1 < Length[l] && l[[k+1]] == 0 && l[[k+2]] == 0, b[n, ReplacePart[l, {k -> 1, k+1 -> 1, k+2 -> 1}]], 0]]]]]; a[n_, k_] := If[n >= k, b[n, Array[0&, k]], b[k, Array[0&, n]]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 16 2013, translated from Maple *)

A364457 Number A(n,k) of tilings of a k X n rectangle using dominoes and trominoes (of any shape); square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 6, 6, 1, 1, 1, 2, 17, 30, 17, 2, 1, 1, 2, 43, 145, 145, 43, 2, 1, 1, 3, 108, 733, 1352, 733, 108, 3, 1, 1, 4, 280, 3540, 12688, 12688, 3540, 280, 4, 1, 1, 5, 727, 17300, 115958, 226922, 115958, 17300, 727, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 25 2023

Keywords

Examples

			A(3,2) = A(2,3) = 6:
  .___.   .___.   .___.   .___.   .___.   .___.
  | | |   |___|   | | |   |___|   | ._|   |_. |
  | | |   |___|   |_|_|   | | |   |_| |   | |_|
  |_|_|   |___|   |___|   |_|_|   |___|   |___|  .
.
Square array A(n,k) begins:
  1, 1,   1,     1,       1,        1,          1,            1, ...
  1, 0,   1,     1,       1,        2,          2,            3, ...
  1, 1,   2,     6,      17,       43,        108,          280, ...
  1, 1,   6,    30,     145,      733,       3540,        17300, ...
  1, 1,  17,   145,    1352,    12688,     115958,      1075397, ...
  1, 2,  43,   733,   12688,   226922,    3927233,     68846551, ...
  1, 2, 108,  3540,  115958,  3927233,  128441094,   4263997124, ...
  1, 3, 280, 17300, 1075397, 68846551, 4263997124, 267855152858, ...
		

Crossrefs

Columns (or rows) k=0-10 give: A000012, A182097(n) = A000931(n+3), A019439, A364460, A364155, A364556, A364616, A364617, A364632, A364638, A364640.
Main diagonal gives A364504.

Formula

A(n,k) = A(k,n).

Extensions

Terms n,k>=4 had to be corrected as was pointed out by Martin Fuller and David Radcliffe - Alois P. Heinz, Apr 05 2025

A165716 Number of tilings of a 3 X n rectangle using dominoes and right trominoes.

Original entry on oeis.org

1, 0, 5, 8, 55, 140, 633, 1984, 7827, 26676, 99621, 351080, 1283247, 4583580, 16611505, 59652624, 215457835, 775371268, 2796772765, 10073343672, 36315180295, 130843331180, 471599612393, 1699398816608, 6124635653443, 22071172760532, 79541846573973
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2009

Keywords

Examples

			a(2) = 5, because there are 5 tilings of a 3 X 2 rectangle using dominoes and right trominoes:
.___. .___. ._._. .___. .___.
|___| |_._| | | | | ._| |_. |
|___| | | | |_|_| |_| | | |_|
|___| |_|_| |___| |___| |___|
		

Crossrefs

Column k=3 of A219987.

Programs

  • Maple
    a:= n-> (Matrix([[55, 8, 5, 0, 1]]). Matrix(5, (i,j)-> if i=j-1 then 1 elif j=1 then [2, 6, -4, 11, 2][i] else 0 fi)^n)[1,5]: seq(a(n), n=0..25);
  • Mathematica
    a[n_] := Last[{55, 8, 5, 0, 1} . MatrixPower[ Table[ Which[i == j - 1, 1, j == 1, {2, 6, -4, 11, 2}[[i]], True, 0], {i, 1, 5}, {j, 1, 5}], n]]; Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Jul 19 2012, translated from Maple *)
    LinearRecurrence[{2,6,-4,11,2},{1,0,5,8,55},30] (* Harvey P. Dale, Mar 19 2013 *)

Formula

G.f.: (2*x^4 - 2*x^3 + x^2 + 2*x - 1) / (2*x^5 + 11*x^4 - 4*x^3 + 6*x^2 + 2*x - 1).
a(0)=1, a(1)=0, a(2)=5, a(3)=8, a(4)=55, a(n) = 2*a(n-1) + 6*a(n-2) - 4*a(n-3) + 11*a(n-4) + 2*a(n-5). - Harvey P. Dale, Mar 19 2013

A165791 Number of tilings of a 4 X n rectangle using dominoes and right trominoes.

Original entry on oeis.org

1, 1, 11, 55, 380, 2319, 15171, 96139, 619773, 3962734, 25445515, 163048957, 1045897075, 6705473761, 43001795070, 275730928993, 1768128097215, 11337760387473, 72702310606249, 466192677008538, 2989403530821497, 19169143325987983, 122919655766448729
Offset: 0

Views

Author

Alois P. Heinz, Sep 26 2009

Keywords

Examples

			a(2) = 11, because there are 11 tilings of a 4 X 2 rectangle using dominoes and right trominoes:
  .___. .___. .___. ._._. ._._. .___. .___. .___. .___. .___. .___.
  |___| |___| |_._| | | | | | | |___| |___| | ._| |_. | | ._| |_. |
  |___| |_._| | | | |_|_| |_|_| | ._| |_. | |_| | | |_| |_| | | |_|
  |___| | | | |_|_| |___| | | | |_| | | |_| |___| |___| | |_| |_| |
  |___| |_|_| |___| |___| |_|_| |___| |___| |___| |___| |___| |___|  .
		

Crossrefs

Column k=4 of A219987.

Programs

  • Maple
    a:= n-> (Matrix([[619773, 96139, 15171, 2319, 380, 55, 11, 1, 1]]). Matrix(9, (i,j)-> if i=j-1 then 1 elif j=1 then [4, 21, -25, -65, -17, 24, -11, -15, 9][i] else 0 fi)^n)[1,9]: seq(a(n), n=0..25);
  • Mathematica
    a[n_] := {619773, 96139, 15171, 2319, 380, 55, 11, 1, 1} . MatrixPower[ Table[ Which[i == j-1, 1, j == 1, {4, 21, -25, -65, -17, 24, -11, -15, 9}[[i]], True, 0], {i, 1, 9}, {j, 1, 9}], n] // Last; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Dec 04 2013, translated and adapted from Alois P. Heinz's Maple program *)

Formula

G.f.: (2*x^8-5*x^7+2*x^6-x^5-19*x^4-15*x^3+14*x^2+3*x-1) / (9*x^9-15*x^8-11*x^7+24*x^6-17*x^5-65*x^4-25*x^3+21*x^2+4*x-1).

A219994 Number of tilings of an n X n square using dominoes and right trominoes.

Original entry on oeis.org

1, 0, 2, 8, 380, 21272, 5350806, 3238675344, 6652506271144, 38896105985522272, 711716770252031164458, 38776997923112110535353528, 6460929292946758939597712150496, 3245656750963660788826395580466708824, 4953412325525289651086730443567098343730966, 22873302288206466754758793232467436030071524731072
Offset: 0

Views

Author

Alois P. Heinz, Dec 02 2012

Keywords

Examples

			a(3) = 8, because there are 8 tilings of a 3 X 3 square using dominoes and right trominoes:
  .___._.   .___._.   .___._.   .___._.
  |___| |   |___| |   |___| |   |_. | |
  | ._|_|   | | |_|   | |___|   | |_|_|
  |_|___|   |_|___|   |_|___|   |_|___|
  ._.___.   ._.___.   ._.___.   ._.___.
  | |___|   | | ._|   | |___|   | |___|
  |___| |   |_|_| |   |_|_. |   |_| | |
  |___|_|   |___|_|   |___|_|   |___|_|  .
		

Crossrefs

Main diagonal of A219987.

A353877 Triangle read by rows: T(n,k) = number of tilings of a n X k rectangle using right trominoes, dominoes and 1 X 1 tiles, n >= 0, k = 0..n.

Original entry on oeis.org

1, 1, 1, 1, 2, 11, 1, 3, 44, 369, 1, 5, 189, 3633, 83374, 1, 8, 798, 34002, 1817897, 90916452, 1, 13, 3383, 323293, 40220893, 4635661331, 546063639624, 1, 21, 14328, 3058623, 886130549, 235025597912, 63919977468729, 17259079054003609, 1, 34, 60697, 28982628, 19546906987, 11935601703140, 7495901454256347, 4669873251135795702, 2916019543694306398589
Offset: 0

Views

Author

Gerhard Kirchner, May 09 2022

Keywords

Comments

Tiling algorithm, see A351322.
Reading the sequence {T(n,k)} for k>n, use T(k,n) instead of T(n,k).

Examples

			Triangle begins
n\k_0__1____2______3________4__________5____________6
0:  1
1:  1  1
2:  1  2   11
3:  1  3   44    369
4:  1  5  189   3633    83374
5:  1  8  798  34002  1817897   90916452
6:  1 13 3383 323293 40220893 4635661331 546063639624
		

Crossrefs

Row/columns 0..4 are A000012, A000045(n+1), A110679, A353878, A353879.
Main diagonal is A353934.

Programs

A219988 Number of tilings of a 5 X n rectangle using dominoes and right trominoes.

Original entry on oeis.org

1, 0, 24, 140, 2319, 21272, 262191, 2746048, 31411948, 342302244, 3830482893, 42241878920, 469601959777, 5197411955932, 57664560160890, 638914582091712, 7084373947760105, 78520055192688696, 870480364546718647, 9649003719594586976, 106963676725852631636
Offset: 0

Views

Author

Alois P. Heinz, Dec 02 2012

Keywords

Crossrefs

Column k=5 of A219987.

Programs

  • Maple
    gf:= (2*x^18 +52*x^17 -358*x^16 +1396*x^15 -3682*x^14 +4644*x^13 -2629*x^12 -1426*x^11 +906*x^10 +4146*x^9 -2315*x^8 -2804*x^7 +4106*x^6 -1636*x^5 +245*x^4 +178*x^3 -52*x^2 -6*x +1) /
    (20*x^19 +216*x^18 -2920*x^17 +8422*x^16 -13616*x^15 +5915*x^14 +4330*x^13 +4832*x^12 -10814*x^11 +482*x^10 +15910*x^9 -17717*x^8 +1636*x^7 +6151*x^6 -2722*x^5 +590*x^4 +182*x^3 -76*x^2 -6*x +1):
    a:= n-> coeff (series (gf, x, n+1), x, n):
    seq (a(n), n=0..30);

Formula

G.f.: see Maple program.

A219989 Number of tilings of a 6 X n rectangle using dominoes and right trominoes.

Original entry on oeis.org

1, 1, 53, 633, 15171, 262191, 5350806, 100578811, 1973546988, 37873593799, 735394314429, 14191155767741, 274752269763958, 5310160930571538, 102725211030603178, 1986240719213420369, 38415016070710912599, 742863889918219971720, 14366465865750557446408
Offset: 0

Views

Author

Alois P. Heinz, Dec 02 2012

Keywords

Crossrefs

Column k=6 of A219987.

Programs

  • Maple
    gf:= (144*x^33 -16884*x^32 -172332*x^31 +37368*x^30 +1446802*x^29 +1843379*x^28 +3892967*x^27 -4330825*x^26 -7997135*x^25 +2597250*x^24 +20344704*x^23 +1683173*x^22 -102335065*x^21 -11071738*x^20
    +108818264*x^19 +20558409*x^18 -23625389*x^17 -12070930*x^16 +22478862*x^15 -21548636*x^14 -14801976*x^13 +5193535*x^12 +6957072*x^11 +1167575*x^10 -1273601*x^9 -201269*x^8 -40977*x^7 +40180*x^6 -17860*x^5 +2794*x^4 +1014*x^3 -158*x^2 -12*x +1) /
    (3524*x^34 -83096*x^33 -106664*x^32 +1460964*x^31 +2491759*x^30 -10066106*x^29 +16579985*x^28 +52063405*x^27 -114723369*x^26 -189274778*x^25 +179637116*x^24 +795173421*x^23 -341486785*x^22
    -1428249826*x^21 +545218943*x^20 +815649290*x^19 -214359517*x^18 -112821018*x^17 -21043915*x^16 +130787555*x^15 -134747676*x^14 -11727284*x^13 +9444877*x^12 +20759881*x^11 -561821*x^10 -1798776*x^9 -498954*x^8 -78279*x^7 +59713*x^6 -29776*x^5 +5078*x^4 +1268*x^3 -198*x^2 -13*x +1):
    a:= n-> coeff (series (gf, x, n+1), x, n):
    seq (a(n), n=0..30);

Formula

G.f.: see Maple program.

A219990 Number of tilings of a 7 X n rectangle using dominoes and right trominoes.

Original entry on oeis.org

1, 0, 117, 1984, 96139, 2746048, 100578811, 3238675344, 111496884663, 3704964324320, 125449223494157, 4205142104025144, 141722416759943105, 4762489676605782896, 160291284486676070239, 5390369708368427166312, 181353331398435867957049, 6099936611677114512527724
Offset: 0

Views

Author

Alois P. Heinz, Dec 02 2012

Keywords

Crossrefs

Column k=7 of A219987.

Formula

G.f.: see link above. - Vaclav Kotesovec, Dec 03 2012
Showing 1-10 of 13 results. Next