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

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

Original entry on oeis.org

1, 1, 1, 1, 2, 8, 1, 3, 26, 163, 1, 5, 90, 1125, 15623, 1, 8, 306, 7546, 210690, 5684228, 1, 13, 1046, 51055, 2865581, 154869092, 8459468955, 1, 21, 3570, 344525, 38879777, 4207660108, 460706560545, 50280716999785, 1, 34, 12190, 2326760, 527889422, 114411435032, 25111681648122, 5492577770367562, 1202536689448371122
Offset: 0

Views

Author

Gerhard Kirchner, Mar 22 2022

Keywords

Comments

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

Examples

			Triangle T(n,k) begins
  n\k_0__1____2______3________4__________5___________6
  0:  1
  1:  1  1
  2:  1  2    8
  3:  1  3   26    163
  4:  1  5   90   1125    15623
  5:  1  8  306   7546   210690    5684228
  6:  1 13 1046  51055  2865581  154869092  8459468955
		

Crossrefs

Row/columns 0..5 are A000012, A000045(n+1), A052543, A226351, A352590, A352591.
Main diagonal is A353777.
Cf. A351322.

Programs

  • Maple
    b:= proc(n, l) option remember; local k, t;
          if 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 while l[k]>0 do od; b(n, subsop(k=1, l))+
             `if`(n>1, b(n, subsop(k=2, l)), 0)+ `if`(k1, b(n, subsop(k=2, k+1=2, l)), 0), 0)
          fi
        end:
    T:= (n, k)-> b(max(n, k), [0$min(n, k)]):
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, May 06 2022
  • Mathematica
    b[n_, l_List] := b[n, l] = Module[{k, t}, Which[
         n == 0 || l == {}, 1,
         Min[l] > 0, t = Min[l]; b[n - t, l - t],
         True, For[k = 1, l[[k]] > 0, k++]; b[n, ReplacePart[l, k -> 1]] +
               If[n > 1, b[n, ReplacePart[l, k -> 2]], 0] + If[k < Length[l] &&
               l[[k + 1]] == 0, b[n, ReplacePart[l, {k -> 1, k + 1 -> 1}]] +
               If[n > 1, b[n, ReplacePart[l, {k -> 2, k+1 -> 2}]], 0], 0]]];
    T[n_, k_] := b[Max[n, k], Array[0&, Min[n, k]]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, May 16 2022, after Alois P. Heinz *)
  • Maxima
    /* See Maxima code link. */

A214996 Power floor-ceiling sequence of 2+sqrt(2).

Original entry on oeis.org

3, 11, 37, 127, 433, 1479, 5049, 17239, 58857, 200951, 686089, 2342455, 7997641, 27305655, 93227337, 318298039, 1086737481, 3710353847, 12667940425, 43251054007, 147668335177, 504171232695, 1721348260425, 5877050576311, 20065505784393, 68507921984951
Offset: 0

Views

Author

Clark Kimberling, Nov 10 2012

Keywords

Comments

See A214992 for a discussion of power floor-ceiling sequence and power floor-ceiling function, p2(x) = limit of a(n,x)/x^n. The present sequence is a(n,r), where r = 2+sqrt(2), and the limit p2(r) = (11 + 8*sqrt(2))/7.
From Greg Dresden, Jun 02 2020: (Start)
a(n) is the number of ways to tile a 2 X (n+1) strip, with one extra square at the top left corner, using 1 X 1 squares, 2 X 2 squares, and 1 X 2 dominoes (either horizontal or vertical). This picture shows a(1) = 11.
|| || | | ||_ || || || | | | | || ||
||| | | ||| | || || | |_| ||| ||| || | |__| | | |
||| |_| ||| ||| ||| ||| |_| |_| ||| |_| |||
(End)

Examples

			a(0) = floor(r) = 3, where r = 2+sqrt(2).
a(1) = ceiling(3*r) = 11; a(2) = floor(11*r) = 37.
		

Crossrefs

Programs

  • Magma
    Q:=Rationals(); R:=PowerSeriesRing(Q, 40); Coefficients(R!((3+2*x-2*x^2)/(1-3*x-2*x^2+2*x^3))) // G. C. Greubel, Feb 02 2018
  • Mathematica
    x = 2 + Sqrt[2]; z = 30; (* z = # terms in sequences *)
    z1 = 100; (* z1 = # digits in approximations *)
    f[x_] := Floor[x]; c[x_] := Ceiling[x];
    p1[0] = f[x]; p2[0] = f[x]; p3[0] = c[x]; p4[0] = c[x];
    p1[n_] := f[x*p1[n - 1]]
    p2[n_] := If[Mod[n, 2] == 1, c[x*p2[n - 1]], f[x*p2[n - 1]]]
    p3[n_] := If[Mod[n, 2] == 1, f[x*p3[n - 1]], c[x*p3[n - 1]]]
    p4[n_] := c[x*p4[n - 1]]
    Table[p1[n], {n, 0, z}]  (* A007052 *)
    Table[p2[n], {n, 0, z}]  (* A214996 *)
    Table[p3[n], {n, 0, z}]  (* A214997 *)
    Table[p4[n], {n, 0, z}]  (* A007070 *)
  • PARI
    Vec((3 + 2*x - 2*x^2) / ((1 + x)*(1 - 4*x + 2*x^2)) + O(x^40)) \\ Colin Barker, Nov 13 2017
    

Formula

a(n) = ceiling(x*a(n-1)) if n is odd, a(n) = floor(x*a(n-1)) if n is even, where x = 2+sqrt(2) and a(0) = floor(x).
a(n) = 3*a(n-1) + 2*a(n-2) - 2*a(n-3).
G.f.: (3 + 2*x - 2*x^2)/(1 - 3*x - 2*x^2 + 2*x^3).
a(n) = (1/7)*((-1)^(1+n) + (11-8*sqrt(2))*(2-sqrt(2))^n + (2+sqrt(2))^n*(11+8*sqrt(2))). - Colin Barker, Nov 13 2017

A052674 Expansion of e.g.f. (1-x)/(1-3*x-2*x^2+2*x^3).

Original entry on oeis.org

1, 2, 16, 156, 2160, 36720, 753120, 17992800, 491500800, 15102339840, 515630707200, 19365156518400, 793401964185600, 35214960849868800, 1683239666985676800, 86204093846846976000, 4709107007890661376000, 273324248772505362432000, 16797372435596048744448000
Offset: 0

Views

Author

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

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!(Laplace( (1-x)/((1+x)*(1-4*x+2*x^2)) ))); // G. C. Greubel, Jun 12 2022
    
  • Maple
    spec := [S,{S=Sequence(Prod(Union(Z,Z),Union(Z,Sequence(Z))))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    Table[(n!/7)*(2*(-1)^n + 2^(n/2)*(5*ChebyshevU[n, Sqrt[2]] - 2*Sqrt[2]*ChebyshevU[n - 1, Sqrt[2]])), {n, 0, 30}] (* G. C. Greubel, Jun 12 2022 *)
  • SageMath
    [factorial(n)*(2^(n/2)*(5*chebyshev_U(n,sqrt(2)) - 2*sqrt(2)*chebyshev_U(n-1, sqrt(2))) + 2*(-1)^n)/7 for n in (0..30)] # G. C. Greubel, Jun 12 2022

Formula

E.g.f.: (1 - x)/((1 + x)*(1 - 4*x + 2*x^2)).
Recurrence: a(0)=1, a(1)=2, a(2)=16, a(n) = 3*n*a(n-1) + 2*n*(n-1)*a(n-2) - 2*n*(n-1)*(n-2)*a(n-3).
a(n) = (n!/98)*Sum_{alpha=RootOf(1 -3*Z -2*Z^2 +2*Z^3)} (13 + 25*alpha - 16*alpha^2)*alpha^(-1-n).
a(n) = n!*A052543(n). - R. J. Mathar, Nov 27 2011
a(n) = (n!/7)*(2*(-1)^n + 2^(n/2)*( 5*ChebyshevU(n, sqrt(2)) - 2*sqrt(2)*ChebyshevU(n-1, sqrt(2)) )). - G. C. Greubel, Jun 12 2022
Showing 1-3 of 3 results.