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.

Previous Showing 21-30 of 31 results. Next

A316726 The number of ways to tile (with squares and rectangles) a 2 X (n+2) strip with the upper left and upper right squares removed.

Original entry on oeis.org

2, 4, 15, 46, 150, 480, 1545, 4964, 15958, 51292, 164871, 529946, 1703418, 5475328, 17599457, 56570280, 181834970, 584475732, 1878691887, 6038716422, 19410365422, 62391120800, 200545011401, 644615789580, 2072001259342, 6660074556204, 21407609138375
Offset: 0

Views

Author

Zijing Wu, Jul 11 2018

Keywords

Comments

Each number in the sequence is the partial sum of A033505 (n starts at 0, each number add one if n is even). We can also find the recursion relation a(n) = 2*a(n-1) + 4*a(n-2) - a(n-4) for the sequence, which can be proved by induction.

Examples

			For n=4, a(4) = 150 = 2*a(3) + 4*a(2) - a(0).
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[ Series[(-x^2 + 1)/(x^4 - 4x^2 - 2x + 1), {x, 0, 27}], x] (* or *) LinearRecurrence[{2, 4, 0, -1}, {2, 4, 15, 46}, 27] (* Robert G. Wilson v, Jul 15 2018 *)
  • PARI
    Vec((2 - x^2) / ((1 + x)*(1 - 3*x - x^2 + x^3)) + O(x^30)) \\ Colin Barker, Jul 12 2018

Formula

a(n) = 2*a(n-1) + 4*a(n-2) - a(n-4) for n>=4.
G.f.: (2 - x^2) / ((1 + x)*(1 - 3*x - x^2 + x^3)). - Colin Barker, Jul 12 2018
a(n) = A030186(n) + 2*A033505(n-1) + a(n-2). - Greg Dresden and Ge Ma, Jul 12 2025

Extensions

More terms from Colin Barker, Jul 12 2018

A353879 Number of tilings of a 4 X n rectangle using right trominoes, dominoes and 1 X 1 tiles.

Original entry on oeis.org

1, 5, 189, 3633, 83374, 1817897, 40220893, 886130549, 19546906987, 431024540644, 9505433227293, 209617856008535, 4622624792880217, 101940750143038657, 2248057208102711472, 49575464007447758483, 1093267021618939507743, 24109360928450426884813, 531673668551361276666101
Offset: 0

Views

Author

Gerhard Kirchner, May 09 2022

Keywords

Comments

For tiling algorithm see A351322.

Examples

			a(2)=189.
The number of tilings (mirroring included) using r trominoes
      ___   ___   ___   ___
r=1: |  _| |  _| | |_| |_2_|    r=0: 71 = A030186(4)
     |_|_| |_| | |___| |_  |
     | 7 | |3|_| | 7 | |3|_|
     |___| |___| |___| |___|
      4*7 + 4*3 + 4*7 + 4*6 = 92
      ___   ___   ___   ___   ___   ___   ___
r=2: |  _| |  _| |  _| |  _| |  _| | |_| | |_|
     |_| | |_|2| |_|_| |_|_| |_|_| |___| |___|
     |___| | |_| |  _|_|_| | |_  | |_  | |  _|
     |_2_| |___| |_|_| |___| |_|_| |_|_| |_|_|
      4*2 + 2*2 + 4*1 + 2*1 + 4*1 + 2*1 + 2*1 = 26
Result: a(2) = 71+92+26 = 189.
Legend:
   ___              ___      ___
  |_2_| stands for |___| or |_|_|
     _                _        _        _
   _|3|             _| |     _|_|     _|_|
  |___| stands for |_|_| or |___| or |_|_|
   ___              ___   ___   ___   ___   ___   ___      ___
  | 7 |            |___| |_|_| |___| | | | |_| | | |_|    |_|_|
  |___| stands for |___|,|___|,|_|_|,|_|_|,|_|_|,|_|_| or |_|_|
		

Crossrefs

Programs

Formula

G.f.: (1 - 9*x - 64*x^2 + 109*x^3 + 39*x^4 + 41*x^5 + 12*x^6 - 7*x^7 - 2*x^8) / (1 - 14*x - 183*x^2 + 37*x^3 + 1929*x^4 - 2419*x^5 + 212*x^6 + 333*x^7 - 25*x^8-15*x^9).
a(n) = 14*a(n-1) + 183*a(n-2) - 37*a(n-3) - 1929*a(n-4) + 2419*a(n-5) - 212*a(n-6) - 333*a(n-7) + 25*a(n-8) + 15*a(n-9).

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

Original entry on oeis.org

1, 2, 14, 132, 1704, 27360, 527760, 11874240, 305343360, 8833224960, 283928198400, 10038995366400, 387222498432000, 16180539927552000, 728132005791590400, 35106736224688128000, 1805508406018437120000
Offset: 0

Views

Author

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

Keywords

Crossrefs

Cf. A030186.

Programs

  • GAP
    a:=[1,2,14];; for n in [4..30] do a[n]:=3*(n-1)*a[n-1]+(n-1)*(n-2)*a[n-2]-(n-1)*(6-5*n+n^2)*a[n-3]; od; a; # G. C. Greubel, Oct 28 2019
  • Magma
    m:=20; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (1-x)/(1-3*x-x^2+x^3) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Oct 28 2019
    
  • Maple
    spec:= [S,{S=Sequence(Prod(Z,Union(Z,Sequence(Z),Sequence(Z))))}, labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    seq(coeff(series((1-x)/(1-3*x-x^2+x^3), x, n+1)*n!, x, n), n = 0..20); # G. C. Greubel, Oct 28 2019
  • Mathematica
    With[{nn=20},CoefficientList[Series[(1-x)/(1-3x-x^2+x^3),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Aug 26 2017 *)
  • PARI
    my(x='x+O('x^20)); Vec(serlaplace( (1-x)/(1-3*x-x^2+x^3) )) \\ G. C. Greubel, Oct 28 2019
    
  • Sage
    [factorial(n)*( (1-x)/(1-3*x-x^2+x^3) ).series(x,n+1).list()[n] for n in (0..20)] # G. C. Greubel, Oct 28 2019
    

Formula

E.g.f.: (1-x)/(1-3*x-x^2+x^3).
a(n+3) = 3*(n+3)*a(n+2) + (6+5*n+n^2)*a(n+1) - (6+11*n+6*n^2+n^3)*a(n).
a(n) = n! * Sum_{alpha=RootOf(1-3*z-z^2+z^3)} (1/74)*(11 + 16*_alpha - 7*alpha^2)*alpha^(-1-n).
a(n) = n!*A030186(n). - R. J. Mathar, Nov 27 2011

A123518 Number of dumbbells in all possible arrangements of dumbbells on a 2 X n rectangular array of compartments.

Original entry on oeis.org

1, 8, 38, 166, 671, 2602, 9792, 36068, 130697, 467556, 1655406, 5811290, 20255279, 70172502, 241839184, 829685064, 2835099649, 9653650752, 32768012102, 110913651342, 374469646511, 1261386990850, 4240037471152, 14225209349036
Offset: 1

Views

Author

Emeric Deutsch, Oct 16 2006

Keywords

Examples

			a(2)=8 because in a 2 X 2 array of compartments, numbered clockwise starting from the NW one, we have 7 (=A030186(2)) possible arrangements of dumbbells: [ ], [14], [23], [12], [34], [14,23] and [12,34] (ij indicates a dumbbell placed in the compartments i and j); these contain altogether 8 dumbbells.
		

Crossrefs

Programs

  • GAP
    a:=[1,8,38,166,671,2602];; for n in [7..30] do a[n]:=6*a[n-1] -7*a[n-2]-8*a[n-3]+5*a[n-4]+2*a[n-5]-a[n-6]; od; a; # G. C. Greubel, Oct 28 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( x*(1+2*x-3*x^2+2*x^3)/(1-3*x-x^2+x^3)^2 )); // G. C. Greubel, Oct 28 2019
    
  • Maple
    G:=z*(1+2*z-3*z^2+2*z^3)/(1-3*z-z^2+z^3)^2: Gser:=series(G,z=0,30): seq(coeff(Gser,z,n),n=1..27);
  • Mathematica
    LinearRecurrence[{6,-7,-8,5,2,-1}, {1,8,38,166,671,2602}, 30] (* G. C. Greubel, Oct 28 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec(x*(1+2*x-3*x^2+2*x^3)/(1-3*x-x^2+x^3)^2) \\ G. C. Greubel, Oct 28 2019
    
  • Sage
    def A123518_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+2*x-3*x^2+2*x^3)/(1-3*x-x^2+x^3)^2 ).list()
    a=A123518_list(30); a[1:] # G. C. Greubel, Oct 28 2019
    

Formula

a(n) = Sum_{k=0..n} k*A046741(n,k).
G.f.: x*(1 + 2*x - 3*x^2 + 2*x^3)/(1 - 3*x - x^2 + x^3)^2.

A174323 Numbers n such that omega(Fibonacci(n)) is a square.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 11, 13, 17, 20, 23, 24, 27, 28, 29, 32, 43, 47, 52, 55, 74, 77, 80, 83, 84, 85, 87, 88, 91, 93, 96, 97, 100, 108, 115, 123, 131, 132, 137, 138, 143, 146, 149, 156, 157, 161, 163, 178, 184, 187, 189, 196, 197, 209, 211, 214, 215, 221, 222, 223, 232
Offset: 1

Views

Author

Michel Lagneau, Mar 15 2010

Keywords

Comments

Numbers n such that omega(A000045(n)) is a square, where omega(p) is the number of distinct prime factors of p (A001221). Remark: for the larger Fibonacci numbers F(n) (n > 300), the Maple program (below) is very slow. So we use a two-step process: factoring F(n) with the elliptic curve method, and then calculate the distinct prime factors.

Examples

			omega(Fibonacci(1)) = omega(Fibonacci(2)) = omega(1) = 0,
omega(Fibonacci(3)) = omega(2) = 1,
omega(Fibonacci(20)) = omega(6765) = 4,
omega(Fibonacci(80)) = omega(23416728348467685) = 9.
		

References

  • Majorie Bicknell and Verner E Hoggatt, Fibonacci's Problem Book, Fibonacci Association, San Jose, Calif., 1974.
  • Alfred Brousseau, Fibonacci and Related Number Theoretic Tables, The Fibonacci Association, 1972, pages 1-8.

Crossrefs

Cf. A038575 (number of prime factors of n-th Fibonacci number, with multiplicity).
Cf. A022307 (number of distinct prime factors of n-th Fibonacci number), A086597 (number of primitive prime factors).

Programs

  • Magma
    [k:k in [1..240]| IsSquare(#PrimeDivisors(Fibonacci(k)))]; // Marius A. Burtea, Oct 15 2019
  • Maple
    with(numtheory):u0:=0:u1:=1:for p from 2 to 400 do :s:=u0+u1:u0:=u1:u1:=s: s1:=nops( ifactors(s)[2]): w1:=sqrt(s1):w2:=floor(w1):if w1=w2 then print (p): else fi:od:
    # alternative:
    P[1]:= {}: count:= 1: res:= 1:
    for i from 2 to 300 do
      pn:= map(t -> i/t, numtheory:-factorset(i));
      Cprimes:= `union`(seq(P[t],t=pn));
      f:= combinat:-fibonacci(i);
      for p in Cprimes do f:= f/p^padic:-ordp(f,p) od;
      P[i]:= Cprimes union numtheory:-factorset(f);
      if issqr(nops(P[i])) then
         count:= count+1;
         res:= res, i;
      fi;
    od:
    res; # Robert Israel, Oct 13 2016
  • Mathematica
    Select[Range[200], IntegerQ[Sqrt[PrimeNu[Fibonacci[#]]]] &] (* G. C. Greubel, May 16 2017 *)
  • PARI
    is(n)=issquare(omega(fibonacci(n))) \\ Charles R Greathouse IV, Oct 13 2016
    

A183712 1/20 of the number of (n+1) X 3 0..4 arrays with every 2 X 2 subblock strictly increasing clockwise or counterclockwise with one decrease.

Original entry on oeis.org

5, 17, 54, 174, 559, 1797, 5776, 18566, 59677, 191821, 616574, 1981866, 6370351, 20476345, 65817520, 211558554, 680016837, 2185791545, 7025832918, 22583273462, 72589861759, 233327025821, 749987665760, 2410700161342, 7748761123965, 24906995867477
Offset: 1

Views

Author

R. H. Hardin, Jan 06 2011

Keywords

Comments

Column 2 of A183719. [Corrected by M. F. Hasler, Oct 07 2014]
This sequence counts closed walks of length (n+2) at the vertex of a triangle, to which a loop has been added to one of the remaining vertices and two loops has been added to the third vertex. - David Neil McGrath, Sep 04 2014
From Greg Dresden, Mar 02 2025: (Start)
a(n) is the number of ways to tile, with squares and dominoes, a 2 X n board with two extra spaces at the end. Here is the board for n=3:
|||_|
|||_|||,
and here is one of the a(3)=54 possible tilings of this board:
|_| |_
|||_|_|.
Compare to A033505 (tilings of 2 X n board with one extra space at the end) and A030186 (tilings of 2 X n board with no extra spaces at the end). (End)

Examples

			Some solutions for 5 X 3:
..0..1..4....1..2..0....4..0..4....4..3..4....4..0..4....1..4..0....3..4..2
..3..2..3....0..3..4....2..1..3....0..2..0....3..2..3....2..3..1....1..0..1
..4..1..0....1..2..1....4..0..4....4..3..4....0..1..0....0..4..0....2..4..3
..3..2..3....0..3..4....3..2..3....0..2..1....4..2..3....1..3..1....1..0..1
..4..0..4....1..2..1....4..1..0....4..3..0....0..1..0....0..4..0....2..3..2
...
...R..L.......R..L.......R..L.......L..R.......R..L.......L..R.......R..L...
...L..R.......L..R.......L..R.......R..L.......L..R.......R..L.......L..R...
...R..L.......R..L.......R..L.......L..R.......R..L.......L..R.......R..L...
...L..R.......L..R.......L..R.......R..L.......L..R.......R..L.......L..R...
		

Crossrefs

Programs

Formula

a(n) = 3*a(n-1) + a(n-2) - a(n-3).
The top left element of A^(n+2) where A=(0,1,1;1,1,1;1,1,2). - David Neil McGrath, Sep 04 2014
a(n) ~ c*k^n where k = 1.629316... is the largest root of x^3 - 3x^2 - x + 1 and c = 1.6293... is conjecturally the largest root of 148x^3 - 296x^2 + 90x - 1. - Charles R Greathouse IV, Sep 15 2014
G.f.: x*(5+2*x-2*x^2) / (1-3*x-x^2+x^3). - Colin Barker, Mar 16 2016
a(n) = A030186(n) + A033505(n). - Greg Dresden, Mar 02 2025

A278815 Number of tilings of a 2 X n grid with monomers, dimers, and trimers.

Original entry on oeis.org

1, 2, 7, 29, 109, 416, 1596, 6105, 23362, 89415, 342193, 1309593, 5011920, 19180976, 73406985, 280933906, 1075154535, 4114694797, 15747237101, 60265824784, 230641706484, 882682631025, 3378090801226, 12928199853783, 49477163668857, 189352713633433
Offset: 0

Views

Author

Kathryn Haymaker, Nov 28 2016

Keywords

Comments

The first three terms are the same as A030186 because there are only monomers and dimers in boards with n<3.

Crossrefs

Programs

  • GAP
    a:=[1,2,7,29,109,416];; for n in [7..30] do a[n]:=3*a[n-1]+2*a[n-2] +5*a[n-3]-2*a[n-4]-a[n-6]; od; a; # G. C. Greubel, Oct 28 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x-x^2-x^3)/(1-3*x-2*x^2-5*x^3+2*x^4+x^6) )); // G. C. Greubel, Oct 28 2019
    
  • Maple
    seq(coeff(series((1-x-x^2-x^3)/(1-3*x-2*x^2-5*x^3+2*x^4+x^6), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 28 2019
  • Mathematica
    LinearRecurrence[{3,2,5,-2,0,-1}, {1,2,7,29,109,416}, 30] (* G. C. Greubel, Oct 28 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-x-x^2-x^3)/(1-3*x-2*x^2-5*x^3+ 2*x^4 +x^6)) \\ G. C. Greubel, Oct 28 2019
    
  • Sage
    def A278815_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-x-x^2-x^3)/(1-3*x-2*x^2-5*x^3+2*x^4+x^6) ).list()
    A278815_list(30) # G. C. Greubel, Oct 28 2019
    

Formula

a(n) = 3*a(n-1) + 2*a(n-2) + 5*a(n-3) - 2*a(n-4) - a(n-6).
G.f.: (1 - x - x^2 - x^3)/(1 - 3*x - 2*x^2 - 5*x^3 + 2*x^4 + x^6).

A355327 Number of ways to tile a 2 X n board with squares and dominoes where vertical dominoes are only allowed in even-numbered locations.

Original entry on oeis.org

1, 1, 5, 10, 39, 83, 317, 678, 2585, 5531, 21085, 45116, 171987, 368005, 1402873, 3001764, 11443033, 24484957, 93339173, 199720270, 761354199, 1629089495, 6210256613, 13288248522, 50656169297, 108390330503
Offset: 0

Views

Author

Greg Dresden and Zijie He, Jun 28 2022

Keywords

Comments

Similar in spirit to A030186, which counts all tilings of a 2 X n board without any restrictions on locations of vertical dominoes.

Examples

			This is one of the a(4)=39 possible tilings of a 2 X 4 board. Note that vertical dominoes can only occur in the second or fourth location (we have one vertical domino in the second location in this picture).
    _______
   |_| |___|
   |_|_|_|_|
		

Crossrefs

Cf. A030186.

Programs

  • Mathematica
    LinearRecurrence[{0, 9, 0, -7, 0, 1}, {1, 1, 5, 10, 39, 83}, 20]

Formula

a(2*n-1) = Sum_{k=1..2*n-1} k*a(2*n-1-k).
a(2*n-1) = a(2*n-2) + 4*a(2n-3) + a(2*n-4) - a(2*n-5).
a(2*n) = 2*a(2*n-1) + 4*a(2n-2) - a(2*n-4).
G.f.: (1 + 3*x + x^2)*(1 - x)^2/(1 - 9*x^2 + 7*x^4 - x^6).
a(n) = 9*a(n-2) - 7*a(n-4) + a(n-6).

A187152 Triangle T(m,n), read by rows: Number of bipartite labeled graphs (V,E) with vertices A={a_1,...,a_m} and B={b_1,...,b_n} where for any vertex in V at most one edge in E is allowed. Additionally, an edge {a_k,b_l} is allowed only when |k-l|<=1.

Original entry on oeis.org

2, 3, 7, 3, 10, 22, 3, 10, 32, 71, 3, 10, 32, 103, 228, 3, 10, 32, 103, 331, 733, 3, 10, 32, 103, 331, 1064, 2356, 3, 10, 32, 103, 331, 1064, 3420, 7573, 3, 10, 32, 103, 331, 1064, 3420, 10993, 24342, 3, 10, 32, 103, 331, 1064, 3420, 10993, 35335, 78243
Offset: 1

Views

Author

Steffen Eger, Mar 06 2011

Keywords

Comments

This also has the obvious corresponding string alignment interpretation where we allow only one-to-one alignments between strings a_1...a_m and b_1...b_n, and additionally demand that aligned characters have a distance of at most 1.

Examples

			2;
3 7;
3 10 22;
3 10 32 71;
3 10 32 103 228;
3 10 32 103 331 733;
3 10 32 103 331 1064 2356;
3 10 32 103 331 1064 3420 7573;
3 10 32 103 331 1064 3420 10993 24342;
3 10 32 103 331 1064 3420 10993 35335 78243;
3 10 32 103 331 1064 3420 10993 35335 113578 251498;
		

Crossrefs

Formula

For m >= n:
T(m,n) =
A030186(m) if m = n
A033505(n+1) if m >= n+1
Symmetrically extended by T(n,m)=T(m,n).
Both the diagonal and the off-diagonals follow the recurrence a(n) = 3*a(n-1) + a(n-2) - a(n-3), n >= 3, with different initial conditions; 2,7,22 and 3,10,32, respectively.

A386489 Expansion of (1-x)/((1+x+2*x^2)*(1-4*x+x^2)).

Original entry on oeis.org

1, 2, 7, 30, 109, 402, 1511, 5638, 21021, 78474, 292887, 1093006, 4079181, 15223810, 56815879, 212039702, 791343293, 2953333114, 11021988791, 41134623134, 153516503405, 572931388658, 2138209053735, 7979904827430, 29781410249821, 111145736175722
Offset: 0

Views

Author

Greg Dresden and Madison Lingchen Zhou, Aug 20 2025

Keywords

Comments

a(n) is the number of ways to tile a 2 X n board with squares, dominoes, and L-shaped quadrominoes. Here is one of the a(4)=109 possible tilings of a 2 X 4 board:
| | |||
Compare to A030186 which counts the tilings with just squares and dominos.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, 1, 7, -2}, {1, 2, 7, 30}, 30]

Formula

a(n) = 3*a(n-1) + a(n-2) + 7*a(n-3) - 2*a(n-4).
a(n) = A030186(n) + 2*sum_{i=0..n-2}(A033505(n-i-3)*a(i) + A030186(n-i-3)*(a(i)+2*sum_{j=0..i} a(j)).
a(n) ~ (2 + sqrt(3))^(n+2) / (18 + 4*sqrt(3)). - Vaclav Kotesovec, Aug 21 2025
23*a(n) = -4*A001353(n)+13*A001353(n+1) +10*A001607(n+1)+8*A001607(n) . - R. J. Mathar, Aug 26 2025
Previous Showing 21-30 of 31 results. Next