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

A195971 Number of n X 1 0..4 arrays with each element x equal to the number its horizontal and vertical neighbors equal to 2,0,1,3,4 for x=0,1,2,3,4.

Original entry on oeis.org

0, 1, 3, 4, 5, 9, 16, 25, 39, 64, 105, 169, 272, 441, 715, 1156, 1869, 3025, 4896, 7921, 12815, 20736, 33553, 54289, 87840, 142129, 229971, 372100, 602069, 974169, 1576240, 2550409, 4126647, 6677056, 10803705, 17480761, 28284464, 45765225
Offset: 0

Views

Author

R. H. Hardin, Sep 25 2011

Keywords

Comments

Every 0 is next to 0 2's, every 1 is next to 1 0's, every 2 is next to 2 1's, every 3 is next to 3 3's, every 4 is next to 4 4's.
Column 1 of A195978.
a(n) is the number of total dominating sets in the (n+1)-path graph. - Eric W. Weisstein, Apr 10 2018
Equivalently, a(n) is the number of 0-1 sequences (every term is "0" or "1") of length n+1 whose every term is adjacent to a term "1". - Yuda Chen, Apr 06 2022
From Wajdi Maaloul, Jun 23 2022: (Start)
For n > 1, a(n) is the number of ways to tile the figure below using squares and dominoes: a horizontal strip of length n-1 that contains a central vertical strip of length 3. Below are figures for a(2) through a(5):
|| |_| ||_ |_|_
|| ||_| |||_| |||_|_|
|| || || ||
(End)
a(n) is the number of compositions of n+2 with 1's, 3's and 4's, with the restriction that you cannot begin with two 1's. - Greg Dresden and Yuan Shen, Aug 10 2024

Examples

			All solutions for n=4:
  0   0   1   1   0
  0   0   0   0   1
  0   0   0   0   1
  1   0   1   0   0
		

Crossrefs

Cf. A195978.

Programs

  • GAP
    a:=[1,3,4,5];; for n in [5..40] do a[n]:=a[n-1]+a[n-3]+a[n-4]; od; Concatenation([0], a); # G. C. Greubel, Apr 03 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x*(1+x)^2/(1-x-x^3-x^4) )); // G. C. Greubel, Apr 03 2019
    
  • Mathematica
    Table[(LucasL[n + 3] - 2 Sin[n Pi/2] - 4 Cos[n Pi/2])/5, {n, 0, 40}] (* Eric W. Weisstein, Apr 10 2018 *)
    LinearRecurrence[{1, 0, 1, 1}, {0, 1, 3, 4, 5}, 40] (* Eric W. Weisstein, Apr 10 2018; amended for a(0) by Georg Fischer, Apr 03 2019 *)
    CoefficientList[Series[x*(1+x)^2/(1-x-x^3-x^4), {x, 0, 40}], x] (* Eric W. Weisstein, Apr 10 2018 *)
  • PARI
    my(x='x+O('x^40)); concat([0], Vec(x*(1+x)^2/(1-x-x^3-x^4))) \\ G. C. Greubel, Apr 03 2019
    
  • Sage
    (x*(1+x)^2/(1-x-x^3-x^4)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 03 2019
    

Formula

a(n) = a(n-1) + a(n-3) + a(n-4).
G.f.: x*(1 + x)^2 / ((1 + x^2)*(1 - x - x^2)). - Colin Barker, Feb 17 2018
a(n) = (A000032(n + 3) - 2*sin(n*Pi/2) - 4*cos(n*Pi/2))/5. - Eric W. Weisstein, Apr 10 2018
a(n) = (Lucas(n+3) - (-1)^(floor(n/2))*(3+(-1)^n))/5. - G. C. Greubel, Apr 03 2019
From Wajdi Maaloul, Jun 23 2022: (Start)
a(2n) = A226205(n+1) = - A121646(n+1) = Fibonacci(n+1)^2 - Fibonacci(n)^2 = Fibonacci(n+2)*Fibonacci(n-1);
a(2n+1) = Fibonacci(n+2)^2 = A007598(n+2).
(End)

A195972 Number of n X 2 0..4 arrays with each element x equal to the number its horizontal and vertical neighbors equal to 2,0,1,3,4 for x=0,1,2,3,4.

Original entry on oeis.org

3, 9, 14, 23, 43, 78, 139, 249, 450, 815, 1475, 2674, 4859, 8841, 16102, 29359, 53587, 97894, 178971, 327425, 599394, 1097871, 2011875, 3688402, 6764595, 12410585, 22775742, 41808791, 76765147, 140977582, 258949451, 475718009, 874068802
Offset: 1

Views

Author

R. H. Hardin, Sep 25 2011

Keywords

Comments

Every 0 is next to 0 2's, every 1 is next to 1 0's, every 2 is next to 2 1's, every 3 is next to 3 3's, every 4 is next to 4 4's.
Column 2 of A195978.

Examples

			Some solutions for n=4:
..0..1....2..1....1..1....1..0....0..1....1..0....1..2....0..1....0..0....0..1
..1..1....1..0....0..0....1..0....1..1....1..0....0..1....0..1....0..0....0..1
..1..0....1..0....0..0....1..0....1..0....1..1....0..1....1..1....0..0....0..1
..1..0....2..1....1..1....1..0....2..1....0..1....1..2....1..0....0..0....0..1
		

Crossrefs

Cf. A195978.

Formula

Empirical: a(n) = 2*a(n-1) +a(n-3) -a(n-4) -2*a(n-5) -2*a(n-6) -a(n-7).
Empirical g.f.: x*(1 + x)^2*(3 - 3*x - x^2 - 3*x^3 - 2*x^4) / ((1 + x^2)*(1 - x - x^2)*(1 - x - x^2 - x^3)). - Colin Barker, May 08 2018

A195973 Number of n X 3 0..4 arrays with each element x equal to the number its horizontal and vertical neighbors equal to 2,0,1,3,4 for x=0,1,2,3,4.

Original entry on oeis.org

4, 14, 24, 36, 67, 134, 240, 432, 803, 1501, 2764, 5118, 9519, 17718, 32927, 61310, 114257, 213023, 397223, 741197, 1383497, 2583168, 4824204, 9012010, 16838364, 31466993, 58813148, 109939804, 205534006, 384287357, 718564103, 1343717638
Offset: 1

Views

Author

R. H. Hardin, Sep 25 2011

Keywords

Comments

Every 0 is next to 0 2's, every 1 is next to 1 0's, every 2 is next to 2 1's, every 3 is next to 3 3's, every 4 is next to 4 4's.
Column 3 of A195978.

Examples

			Some solutions for n=4:
..0..1..2....1..0..0....0..0..1....0..0..1....1..1..0....1..0..1....1..0..0
..1..1..1....2..1..1....0..0..1....0..0..1....0..1..1....1..0..1....1..1..1
..1..0..0....2..1..1....0..0..1....1..1..1....1..1..1....1..0..1....0..1..1
..2..1..1....1..0..0....0..0..1....2..1..0....1..0..0....1..0..1....1..1..0
		

Crossrefs

Cf. A195978.

Formula

Empirical: a(n) = 2*a(n-1) +a(n-3) +a(n-4) -6*a(n-5) -a(n-6) -4*a(n-7) +2*a(n-8) +2*a(n-9) +5*a(n-10) +2*a(n-11) -2*a(n-14) -a(n-15).
Empirical g.f.: x*(4 + 6*x - 4*x^2 - 16*x^3 - 23*x^4 - 14*x^5 + 23*x^7 + 26*x^8 + 19*x^9 + 9*x^10 - x^11 - 7*x^12 - 5*x^13 - x^14) / ((1 - x)*(1 + x^2)*(1 - x - x^2)*(1 - x^2 - 2*x^3 - 4*x^4 - 2*x^5 - x^6 + x^7 + x^8 + 2*x^9 + x^10)). - Colin Barker, May 08 2018

A195974 Number of n X 4 0..4 arrays with each element x equal to the number its horizontal and vertical neighbors equal to 2,0,1,3,4 for x=0,1,2,3,4.

Original entry on oeis.org

5, 23, 36, 67, 133, 256, 455, 931, 1830, 3565, 7001, 13872, 27433, 54401, 108164, 215285, 428869, 855426, 1707759, 3411577, 6819860, 13640635, 27294311, 54635604, 109402661, 219127235, 438997334, 879659285, 1762952379, 3533677212
Offset: 1

Views

Author

R. H. Hardin, Sep 25 2011

Keywords

Comments

Every 0 is next to 0 2's, every 1 is next to 1 0's, every 2 is next to 2 1's, every 3 is next to 3 3's, every 4 is next to 4 4's.
Column 4 of A195978.

Examples

			Some solutions for n=5:
..2..1..0..1....2..1..1..2....2..1..1..0....2..1..0..1....0..1..1..1
..1..1..0..1....1..0..0..1....1..0..1..1....1..1..1..2....1..1..0..0
..0..1..1..1....2..1..1..2....1..0..1..1....0..0..1..2....1..1..1..1
..0..1..1..0....2..1..1..2....1..1..1..0....1..1..1..1....0..0..1..1
..0..1..1..0....1..0..0..1....0..1..1..0....2..1..0..0....1..1..1..0
		

Formula

Empirical: a(n) = 4*a(n-1) -7*a(n-2) +13*a(n-3) -17*a(n-4) +9*a(n-5) -7*a(n-6) -11*a(n-7) +28*a(n-8) -20*a(n-9) +37*a(n-10) -7*a(n-11) +11*a(n-13) -41*a(n-14) +14*a(n-15) -32*a(n-16) +19*a(n-18) -14*a(n-19) +30*a(n-20) -10*a(n-21) +9*a(n-22) +7*a(n-23) -9*a(n-24) +10*a(n-25) -11*a(n-26) +3*a(n-28) -4*a(n-29) +a(n-30) -2*a(n-31) -2*a(n-32).

A195975 Number of nX5 0..4 arrays with each element x equal to the number its horizontal and vertical neighbors equal to 2,0,1,3,4 for x=0,1,2,3,4.

Original entry on oeis.org

9, 43, 67, 133, 244, 519, 1072, 2225, 4456, 9098, 19066, 39689, 82372, 171498, 358146, 748911, 1567225, 3279792, 6866722, 14390098, 30170057, 63261378, 132676528, 278340227, 584041659, 1225661652, 2572438981, 5399619168, 11334969352
Offset: 1

Views

Author

R. H. Hardin Sep 25 2011

Keywords

Comments

Every 0 is next to 0 2's, every 1 is next to 1 0's, every 2 is next to 2 1's, every 3 is next to 3 3's, every 4 is next to 4 4's
Column 5 of A195978

Examples

			Some solutions for n=4
..1..2..2..1..2....0..0..1..1..0....0..1..1..1..2....1..1..1..0..0
..0..1..1..0..1....0..0..1..1..0....1..1..0..0..1....0..0..1..1..1
..1..1..1..0..1....1..1..1..1..0....1..1..1..1..1....1..1..1..1..1
..1..0..1..1..2....2..1..0..1..1....0..0..1..1..0....2..1..0..0..0
		

Formula

Empirical: a(n) = 5*a(n-1) -9*a(n-2) +11*a(n-3) -6*a(n-4) -36*a(n-5) +90*a(n-6) -142*a(n-7) +197*a(n-8) -46*a(n-9) -183*a(n-10) +478*a(n-11) -942*a(n-12) +792*a(n-13) -498*a(n-14) -210*a(n-15) +1415*a(n-16) -1639*a(n-17) +1834*a(n-18) -709*a(n-19) -862*a(n-20) +1990*a(n-21) -3015*a(n-22) +1957*a(n-23) -374*a(n-24) -1742*a(n-25) +3816*a(n-26) -3839*a(n-27) +2182*a(n-28) -480*a(n-29) -3921*a(n-30) +3721*a(n-31) -4788*a(n-32) +2840*a(n-33) +2416*a(n-34) -577*a(n-35) +7322*a(n-36) -1770*a(n-37) +1322*a(n-38) -1236*a(n-39) -6838*a(n-40) -789*a(n-41) -4538*a(n-42) -89*a(n-43) +3459*a(n-44) +1446*a(n-45) +4611*a(n-46) +1551*a(n-47) -859*a(n-48) -465*a(n-49) -2777*a(n-50) -1070*a(n-51) +363*a(n-52) -79*a(n-53) +1222*a(n-54) -43*a(n-55) -809*a(n-56) -357*a(n-57) -616*a(n-58) +368*a(n-59) +965*a(n-60) +619*a(n-61) +408*a(n-62) -203*a(n-63) -570*a(n-64) -385*a(n-65) -205*a(n-66) +35*a(n-67) +181*a(n-68) +122*a(n-69) +57*a(n-70) +5*a(n-71) -33*a(n-72) -26*a(n-73) -14*a(n-74) -8*a(n-75) -2*a(n-76)

A195976 Number of nX6 0..4 arrays with each element x equal to the number its horizontal and vertical neighbors equal to 2,0,1,3,4 for x=0,1,2,3,4.

Original entry on oeis.org

16, 78, 134, 256, 519, 1280, 2718, 5830, 12799, 28969, 64536, 144480, 323887, 730358, 1647281, 3720888, 8406355, 19026721, 43091379, 97668401, 221445855, 502417344, 1140305840, 2589100946, 5880051614, 13357939515, 30351874554, 68979138844
Offset: 1

Views

Author

R. H. Hardin Sep 25 2011

Keywords

Comments

Every 0 is next to 0 2's, every 1 is next to 1 0's, every 2 is next to 2 1's, every 3 is next to 3 3's, every 4 is next to 4 4's
Column 6 of A195978

Examples

			Some solutions for n=4
..1..2..2..1..1..2....0..1..1..0..0..1....1..0..1..2..1..0....0..1..2..1..0..0
..0..1..1..0..0..1....0..1..1..0..0..1....1..1..2..2..1..1....0..1..2..1..0..0
..0..1..1..1..1..1....1..1..1..0..0..1....0..1..2..1..0..1....0..1..2..1..0..0
..1..1..0..1..1..0....1..0..1..1..1..2....0..1..2..1..0..1....0..1..2..1..0..0
		

A195977 Number of nX7 0..4 arrays with each element x equal to the number its horizontal and vertical neighbors equal to 2,0,1,3,4 for x=0,1,2,3,4.

Original entry on oeis.org

25, 139, 240, 455, 1072, 2718, 5637, 12823, 30486, 72042, 166884, 390514, 917562, 2167323, 5114140, 12071815, 28523614, 67538866, 159964100, 378996636, 898240293, 2130429190, 5054033816, 11993264778, 28464315995, 67574829560
Offset: 1

Views

Author

R. H. Hardin Sep 25 2011

Keywords

Comments

Every 0 is next to 0 2's, every 1 is next to 1 0's, every 2 is next to 2 1's, every 3 is next to 3 3's, every 4 is next to 4 4's
Column 7 of A195978

Examples

			Some solutions for n=4
..1..0..1..1..0..0..1....0..0..1..1..0..0..1....1..0..0..0..0..1..2
..2..1..2..2..1..1..1....0..0..1..1..0..0..1....2..1..1..1..1..1..1
..2..1..2..2..1..1..0....1..1..1..1..1..1..1....2..1..1..1..1..0..0
..1..0..1..1..0..1..1....2..1..0..0..1..1..0....1..0..0..0..1..1..1
		

A195970 Number of n X n 0..4 arrays with each element x equal to the number of its horizontal and vertical neighbors equal to 2,0,1,3,4 for x=0,1,2,3,4.

Original entry on oeis.org

1, 9, 24, 67, 244, 1280, 5637, 32909, 212185, 1609756, 13476199, 134461394
Offset: 1

Views

Author

R. H. Hardin Sep 25 2011

Keywords

Comments

Every 0 is next to 0 2's, every 1 is next to 1 0's, every 2 is next to 2 1's, every 3 is next to 3 3's, every 4 is next to 4 4's
Diagonal of A195978

Examples

			Some solutions for n=4
..1..0..0..1....1..2..2..1....1..0..1..1....1..0..1..1....1..0..0..0
..1..0..0..1....0..1..1..0....1..1..1..0....2..1..1..0....2..1..1..1
..1..0..0..1....0..1..1..1....0..1..1..0....2..1..1..0....2..1..1..1
..1..0..0..1....1..1..0..1....0..1..1..0....1..0..1..1....1..0..0..0
		
Showing 1-8 of 8 results.